Writing Class definitions
-
Hi there Can someone help me with this? I need to write a program which simulates a computer system in a public library. Working on these four objects - Customer, Books and loans and the library itself. The library needs to collect info about Customer and add customers. Books title, isdn number and so forth. Loans = the date loaned and date returned. Customers must be able to loan books from and return books to the library. Library needs to print out a report containg details of each book and customer for each loan. I would apreciate if some can just give me a starting point example of how to implement this. Also links to places where i can go thru similar code thanks in advance Bhangie
-
Hi there Can someone help me with this? I need to write a program which simulates a computer system in a public library. Working on these four objects - Customer, Books and loans and the library itself. The library needs to collect info about Customer and add customers. Books title, isdn number and so forth. Loans = the date loaned and date returned. Customers must be able to loan books from and return books to the library. Library needs to print out a report containg details of each book and customer for each loan. I would apreciate if some can just give me a starting point example of how to implement this. Also links to places where i can go thru similar code thanks in advance Bhangie
It's been a while since I did homework. Here are some hints for my version. Each object should encapsulate the data about the instance of the object. For a book, this would be title, author, isbn etc. You'd probably want a unique book id too, since a library may have multiple copies of popular books. For a loan, you want to record the book, the customer, and the start/return dates. If you want history you have to save these after books are returned. A library is really a collection of other objects. You need some way for objects to persist. A librarian wouldn't type in the names of all the borrowers every day at system startup, or all the books. Steve S