Practical Work 04 Object Oriented Programming
Practical Work 04 Object Oriented Programming
Practical Work 04
Create a simple e-library management system with different types of library members, each
having unique permissions and actions.
• Library:
The Library class should manage a collection of books and support adding, borrowing, and
returning books.
• Books:
Each book should have a title, author, and availability status.
Books can be borrowed if they are available and returned when borrowed.
• Members:
Implement a base class Member to represent general library members.
Create subclasses for different types of members:
StandardMember: Can borrow books but has a borrowing limit.
PremiumMember: Can borrow books without a borrowing limit and receives
recommendations.
• Polymorphism and Method Overriding:
Use polymorphism by defining a borrow() method in each member class, where each type of
member can borrow books according to their specific rules.
Page 1 sur 1