Provide one example of where you might use polymorphism in your design of the library system and say which classes would be involved. Which class would be the base class?

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Provide one example of where you might use polymorphism in your design of the library system and say which classes would be involved. Which class would be the base class?

Essential NonEssential
IDCard
LateFee
Fine
Loan
StudyRoom
Returns
Euro
Lecturer
PostGraduate
Collection
Reference
Librarian
Вook
DVD
Libraryltem
Shelf
UnderGraduate
Borrower
Transcribed Image Text:Essential NonEssential IDCard LateFee Fine Loan StudyRoom Returns Euro Lecturer PostGraduate Collection Reference Librarian Вook DVD Libraryltem Shelf UnderGraduate Borrower
A university library has a stock of books and video DVDS which can be lent to lecturers, postgraduate students and
undergraduate students. Books can be lent to lecturers for up to eight weeks, to postgraduate students for four weeks
and to undergraduate students for two weeks. DVDS can be lent to lecturers for up to four weeks, to postgraduate
students for two weeks and to undergraduate students for one week.
A lecturer who is late returning an item is fined €1 per day, postgraduate students are fined 50c per day and
undergraduate students are fined 25c.
The library wants a software system to be able to monitor the loans and the fines.
You are asked to produce such a system using an object oriented design.
Fill up the table below to indicate which classes are important to the design. For example, if you think a Book class would
be essential in a good 00 design, then put it in the Essential column. If it is non essential, put it in the Non Essential
column.
Note that this will be a relatively basic implementation. We just want a design that will allow the library to record details
about the Books and DVDS which are borrowed and to whom and which fines are due.
Hint: the "Essential" column means that any reasonable design would include such a class. The "Non-Essential" column
means that any reasonable design would not include such a class.
Transcribed Image Text:A university library has a stock of books and video DVDS which can be lent to lecturers, postgraduate students and undergraduate students. Books can be lent to lecturers for up to eight weeks, to postgraduate students for four weeks and to undergraduate students for two weeks. DVDS can be lent to lecturers for up to four weeks, to postgraduate students for two weeks and to undergraduate students for one week. A lecturer who is late returning an item is fined €1 per day, postgraduate students are fined 50c per day and undergraduate students are fined 25c. The library wants a software system to be able to monitor the loans and the fines. You are asked to produce such a system using an object oriented design. Fill up the table below to indicate which classes are important to the design. For example, if you think a Book class would be essential in a good 00 design, then put it in the Essential column. If it is non essential, put it in the Non Essential column. Note that this will be a relatively basic implementation. We just want a design that will allow the library to record details about the Books and DVDS which are borrowed and to whom and which fines are due. Hint: the "Essential" column means that any reasonable design would include such a class. The "Non-Essential" column means that any reasonable design would not include such a class.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY