Create a Library class. Include vectors of Books and Patrons. Include a struct called Transaction. Have it
Question:
Create a Library class. Include vectors of Books and Patrons. Include a struct called Transaction. Have it include a Book, a Patron, and a Date from the chapter. Make a vector of Transactions. Create functions to add books to the library, add patrons to the library, and check out books. Whenever a user checks out a book, have the library make sure that both the user and the book are in the library. If they aren’t, report an error. Then check to make sure that the user owes no fees. If the user does, report an error. If not, create a Transaction, and place it in the vector of Transactions. Also write a function that will return a vector that contains the names of all Patrons who owe fees.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 87% (8 reviews)
Answer class Library public void addbookOfBook1 voi...View the full answer
Answered By
Ram krishan saini
hello, my name is ram krishan saini, I have completed my graduation from Delhi university. I have completed my graduation in physics honers.
I have worked on many graduation projects to understand physics better.
I got a chance to do my internships at IIT Kanpur.
currently helping students through online teaching.
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
What am I required to do in this assignment? Shared Power is an information system to help tradesmen share expensive and specialist tools rather than buying them themselves. Registered owners add...
-
Figure 13-31 is an SSD for the use case Check out books in the university library system. Do the following: a. Develop a first-cut sequence diagram that only includes the actor and problem domain...
-
write a job description for Bill Ryan's job. What other information would you need to write a better job description? Remember, this is a job description, not a help wanted ad. Please do your own...
-
Riffa Football Club is planning to organize a football tournament to raise charity funds. The estimated costs per match Amount paid to Players, Coaches and Referees BHD 1,400; Ground Rent BHD 250;...
-
Which one of these statements is NOT a factor in classifying a deal as specialized lending: a) The primary source of loan repayment is the repayment capacity of an up-and-running company. b) The...
-
Workers in the petrochemical industry often wear flame-retardant jumpsuits. Unfortunately, the material from which they are made hinders evaporation of perspiration, and consequently heat stress can...
-
Draw a box-and-whisker plot that represents the data set in Example 1. What do you observe? Data from Example 1 Each year in the U.S., automobile commuters waste fuel due to traffic congestion. The...
-
Research by Harvard Medical School experts suggests that boys are more likely than girls to grow out of childhood asthma when they hit their teenage years (BBC News, August 15, 2008). Scientists...
-
Applying analytical synthesis of mechanisms, design a four-bar mechanism to move the object shown in the figure, through the three positions indicated in their numbered order without taking into...
-
Allie has bought a new apple orchard. The orchard has a single file of trees, numbered from 1 to N. Each tree has a certail number of ripe apples. Allie has a rule she wants to follow. She wants to...
-
What does adding const to a member function do?
-
Why are helper functions best placed outside the class definition?
-
Match the equation with its graph. [The graphs are labeled (a)-(f).] (a) (b) (c) (d) (e) (f) 1. x2 = - 2y 2. y2 = 2x 3. x2 / y + y2 = 1 4. x2 - y2 / y = 1 -8 -4 4 8 -4 -4
-
A proposed cost-saving device has an installed cost of $59,400. It will be depreciated for tax purposes on a straight-line basis over three years (zero salvage), although its actual life will be five...
-
Savannah Products, a small integrated wood and lumber products company with substantial timber holdings, has two divisions: Forest and Lumber. Forest Division manages the timber holdings, maintains...
-
A large corporation has a manufacturing division with 40 parts departments and 20 assembly departments. The parts departments manufacture most of the parts for the products, and the assembly...
-
It is often argued that private country clubs tend to have low-quality food operations because the members do not join or frequent their clubs for the food but rather for the golf and fellowship. (A...
-
William Company owns and operates a nationwide chain of movie theaters. The 500 properties in the William chain vary from low-volume, small-town, single-screen theaters to high-volume, big-city,...
-
How can the payroll module of an AIS be breached? What controls should be set up to help prevent this?
-
Juarez worked for Westarz Homes at construction sites for five years. Bever was a superintendent at construction sites, supervising subcontractors and moving trash from sites to landfills. He...
-
What are some of the physical media that Ethernet can run over?
-
(a) Suppose N packets arrive simultaneously to a link at which no packets are currently being transmitted or queued. Each packet is of length L and the link has transmission rate R. What is the...
-
Why will two ISPs at the same level of the hierarchy often peer with each other? How does an TXP earn money?
-
How do threads facilitate inter-process communication in modern operating systems, and what are some of the common IPC mechanisms used with threads?
-
Mr. Rafael is a sole trade who maintain his non-current asset at cost. On 31 December 2020, he owned the following non-current asset which had been depreciated on a yearly basis: Asset Lorry...
-
5 11 ints Print Problem: Module 3 Textbook Problem 11 Learning Objectives: 3-9 Identify the primary characteristics of sole proprietorships, partnerships, and corporations 3-12 Show how issuing...
Study smarter with the SolutionInn App