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.
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.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images