Develop a library program that maintains library book list

Assignment Help Computer Engineering
Reference no: EM131168723

Objectives

For this programming project, you will develop a library management program that maintains the library book list and the library client (i.e., customer) list, as well as the interactions between the two lists. The program allows the librarian to add copies of books, add clients, let a client check out (i.e., borrow) books, and let a client check in (i.e., return) books.

Problem Description

In this programming assignment, you will develop a project that implements an engineering library (or any other library; engineering library is mentioned because all the books I currently include are engineering textbooks). You will implement and test four classes in this assignment. They are the BookType, BookRecord, ClientType, and LibraryType classes. You are to write the four implementation files: BookType.cpp, BookRecord.cpp, ClientType.cpp, and LibraryType.cpp. In the following, we will discuss each class in more detail.

The BookType Class

Each object of the BookType class contains the related information of a book. The BookType.h file is given to you. Carefully read the class definition in BookType.h. The BookType class has five protected data members. They are: a string ISBN13 to store the 13-digit ISBN of a book; a string primaryAuthor to store the primary author's last name; a string title to store the book title; a string publisher to store the publisher's name; and an integer key to indicate the key member used for searching and sorting.

You are to implement and test the following operations for the BookType class. Detailed description and precondition/postcondition for all the BookType's member functions are specified in the given header file.

• A constructor.
• Five set functions: setISBN13, setPrimaryAuthor, setTitle, setPublisher, setKey.
• A setBookInfo function.
• Five get functions: getISBN13, getPrimaryAuthor, getTitle, getPublisher, getKey.
• The six comparison operators.
• The operator << (as a friend function).

The BookType class objects are used to represent books borrowed by a client (this will be discussed in the ClientType class).

The BookRecord Class

The BookRecord class is a subclass inherited from the BookType class. The BookRecord.h file is given to you. Carefully read the class definition in BookRecord.h. In addition to the protected data members of the BookType class, the BookRecord class has two additional protected data members: an integer copiesTotal to store the total number of copies of a book in the library (note that a library book may have multiple copies); an integer copiesAvailable to store the available (i.e., unchecked-out) number of copies of a book in the library.

You are to implement and test the following operations for the BookRecord class. Detailed description and precondition/postcondition for all the BookRecord's member functions are specified in the given header file.

• A constructor.
• Two set functions: setCopiesTotal, setCopiesAvailable.
• A setBookRecord function.
• Two get functions: getCopiesTotal, getCopiesAvailable.
• The operator << (as a friend function).

The BookRecord class objects are used to represent books possessed by the library (this will be discussed in the LibraryType class).

The ClientType Class

Each object of the ClientType class contains the related information of a library client. The ClientType.h file is given to you. Carefully read the class definition in ClientType.h. The ClientType class has five protected data members. They are: a string ID7 to store the 7-digit ID number of a client; a string lastName to store the client's last name; a string firstName to store the client's first name; an integer key to indicate the key member used for searching and sorting clients; a sorted linked list bookList of BookType objects to store the books borrowed by the client.

You are to implement and test the following operations for the ClientType class. Detailed description and precondition/postcondition for all the ClientType's member functions are specified in the given header file.

• A constructor.
• Five set functions: setID7, setLastName, setFirstName, setKey, setBookList.
• A setClientInfo function.
• Five get functions: getID7, getLastName, getFirstName, getKey, getBookList.
• A borrowBook function.
• A returnBook function.
• The six comparison operators.
• The assignment operator=.
• The operator << (as a friend function).

The ClientType class objects are used to represent clients of the library (this will be discussed in the LibraryType class).

The LibraryType Class

Each object of the LibraryType class contains the related information of a library. The LibraryType.h file is given to you. Carefully read the class definition in LibraryType.h. The LibraryType class has two protected data members: a sorted linked list bookRecordList of BookRecord objects to store the books possessed by the library; a sorted linked list clientList of ClientType objects to store the clients of the library.

You are to implement and test the following operations for the LibraryType class. Detailed description and precondition/postcondition for all the LibraryType's member functions are specified in the given header file.

• A default constructor.
• A parameterized constructor.
• Two set functions: setBookRecordList, setClientList.
• Two get functions: getBookRecordList, getClientList.
• An addBook function.
• An addClient function.
• A getBookRecord function.
• A getClient function.
• A borrowBook function.
• A returnBook function.

The LibraryType class is used to generate an engLib object which represents the School of Engineering Library.

Additional Requirements and Hints

The Header Files

Besides the aforementioned four header files, you are also to use the following header files in this project: NodeType.h, LinkedListIterator.h, LinkedListType.h, SortedLinkedList.h. You have been supplied all eight header files in the proj2header.zip file (available on Blackboard).

Note that the LinkedListType.h is slightly different from the LinkedListType.h we discussed in lectures. Here we have made the destructor a virtual function, and also added a template version of operator<<. For SortedLinkedList.h, here we have added a default and a copy constructors and a destructor.

Preconditions

For this assignment, you only need to check the precondition for the setBookRecord function of the BookRecord class. For all other functions, you may simply assume that the preconditions are satisfied.

Existing Book and Client Information

The existing books and clients are given in the files books.txt and clients.txt (available on Blackboard). They are loaded to initialize the two protected members of engLib at the beginning of the EngLibTest.cpp file (available on Blackboard).

Implement and Test Small Pieces

Don't tackle to whole project at once. Start by implementing what you can, using one or several member functions together with a simple test driver client program to test the functionality of the functions.

Test the Completed Programs

After you have tested your programs using your own test driver code, you may test your programs using the given testing program EngLibTest.cpp (available on Blackboard).

What to Turn in

Make sure you name the .cpp files as BookType.cpp, BookRecord.cpp, ClientType.cpp, and LibraryType.cpp. Then zip these four files (if you have modified any other files, include them too) and save it as your_lastname_project2.zip

Attachment:- Help.zip

Reference no: EM131168723

Questions Cloud

Describe how public key cryptography is being applied : Describe how public key cryptography is being applied. Are the ways it is applied secure given the status of factoring algorithms? Will information kept secure using public key cryptography become insecure in the future?
Compare and contrast intrinsic and extrinsic motivation : In a 1-2 page paper, compare and contrast intrinsic and extrinsic motivation. Then, pick a goal that is important to you and discuss whether your motivations for striving are intrinsic or extrinsic, and why. Finally, discuss ways you can improve m..
For what value bound propagation achieve bound completeness : Consider the inequalities x1 + x2 ≥ 1, x1 - x2 ≥ 0 with each xj ∈ [0, α].-For what values of α ≥ 0 does bounds propagation achieve bounds completeness?
Difference between somatoform disorders and malingering : Describe the difference between somatoform disorders and malingering
Develop a library program that maintains library book list : For this programming project, you will develop a library management program that maintains the library book list and the library client (i.e., customer) list, as well as the interactions between the two lists.
Determine the best way to estimate the value of time : Determine the more reliable method to estimate driving speeds and miles per gallon by using (a) official statistics on highway traffic from the Environmental Protection Agency or by using (b) engineering studies of the efficiency of gasoline engin..
Describe the history of the chinese remainder theorem : Describe the history of the Chinese remainder theorem. Describe some of the relevant problems posed in Chinese and Hindu writings and how the Chinese remainder theorem applies to them.
Do such tests have any potential drawbacks : Explain how probabilistic primality tests are used in practice to produce extremely large numbers that are almost certainly prime. Do such tests have any potential drawbacks?
Solve the classical dual by hand : Solve the classical dual by hand and use the solution to obtain the surrogate that provides the tightest bound on the optimal value of the primal.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Which command would you use to take advantage of a drive

Which command would place a level 3 dump of the /var filesystem immediately after the level 0 dump on the tape?

  Design and develop a program that creates a complete set

Design and develop a program that creates complete set of multiplication tables where both the multiplicand and the multiplier vary from 1 through 12. The table should display as 144 rows in the list view control.

  Prove root two is not a rational number

Prove root 2 is not a rational number

  Assume that you know what k is

imagine you are given an array A of n sorted numbers that has been circularly shifted k positions to the right. For example, {35, 42, 5, 15, 27, 29} is a sorted array that has been circularly shifted k = 2 positions, while {27, 29, 35, 42, 5, 15} ..

  Imagine we want to add to the sterling class

a penny may be further divided into halfpennies and farthings -> farthing worth 1/4 of a penny. There was a halfpenny coin, farthing coin, halffarthing coin.

  Three different organizations'' e-business models

How do these organizations' business models affect way they market themselves? How does the target market learn about or find this site (e.g., search engines, referral sites, click-and-mortar advertising).

  How to produce a data model segment

Some mechanics are specialized in engine (EN) maintenance. Some mechanics are specialized in the airframe (AF) maintenance. Some mechanics are specialized in avionics (AV) maintenance.

  Object oriented design of a class

Object oriented design to develop a parent class known as Book which will receive the ISBN, author, title and price of book and select and print the details of all books with the price of more than $50.00.

  Harley-davidson implements rfid

When Harley-Davidson implements RFID, it will likely use the technology to help manage its relationships with its main customers, which are the local dealerships that sell motorcycles and use replacement parts in their shops.

  How to generate the computer code

I have not seen them yet, but the wave appears to be toward a complete English ability to write down computer programs.

  Questionusing python programming 3 do not use many built in

questionusing python programming 3 do not use many built in functions mainly loops and list manipulations i.e. slicing

  Develop a set of six powerpoint

Develop a set of six PowerPoint or MS Word slides or six paragraphs to present the history, current level of usage, typical applications, future prospects and usability for the selected application.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd