In this problem you will implement a simple library system based on object-oriented approach (using inheritance, polymorphism and abstract classes). At the library we have items and people are allowed to borrow them for a while or use them in the library premises. We have 3 types of items at the library. Books, Magazines and Compact Discs (CDs). All items have a unique number called serial number, shelf number that the item put on that shelf and shelf index, the index of the item at the shelf. Items at the library have additional different properties changing to item type. For example books have name, publisher name, and author name. CDs have title property and magazines have name, publisher properties. But people are allowed to borrow only books and CDs, but not magazines. Suppose that two kinds of people using library items. These are students and academic staff. Students can borrow only one item at a time, and academic stuffs can borrow at most 3 items at the same time. Also people that use library items have common properties. For example everyone has a name, surname and unique number for each person. Implement your solution based on the class diagram given below, but consider that this class diagram is just a hint for you. You don’t have to follow it precisely, also you may add more methods and properties to these classes or you can also add extra classes as well. In the accompanying report, provide the complete UML class diagram of your solution. Also provide a tester class which employs the functionalities of the designed classes.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

In this problem you will implement a simple library system based on object-oriented approach (using inheritance, polymorphism and abstract classes). At the library we have items and people are allowed to borrow them for a while or use them in the library premises. We have 3 types of items at the library. Books, Magazines and Compact Discs (CDs). All items have a unique number called serial number, shelf number that the item put on that shelf and shelf index, the index of the item at the shelf. Items at the library have additional different properties changing to item type. For example books have name, publisher name, and author name. CDs have title property and magazines have name, publisher properties. But people are allowed to borrow only books and CDs, but not magazines.

Suppose that two kinds of people using library items. These are students and academic staff. Students can borrow only one item at a time, and academic stuffs can borrow at most 3 items at the same time. Also people that use library items have common properties. For example everyone has a name, surname and unique number for each person.

Implement your solution based on the class diagram given below, but consider that this class diagram is just a hint for you. You don’t have to follow it precisely, also you may add more methods and properties to these classes or you can also add extra classes as well. In the accompanying report, provide the complete UML class diagram of your solution.

Also provide a tester class which employs the functionalities of the designed classes.

  

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Developing computer interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning