•
Requirements:
1.
Create a base class Book with the following fields:
▪
String title
▪
String author
▪
boolean isAvailable
2.
Add a method checkAvailability() that uses an if condition to print if the book is available or not.
3.
Create a derived class LibraryBook that adds:
▪
String libraryCode (a unique identifier).
▪
Override the checkAvailability() method to include the libraryCode in the output.
4.
In the main method:
▪
Create an array of 5 LibraryBook objects.
▪
Use a loop to print the availability of all books.
اسم المستقل | Osama A. |
عدد الإعجابات | 0 |
عدد المشاهدات | 4 |
تاريخ الإضافة | |
تاريخ الإنجاز |