Question: Hello. I ' m looking for help regarding a Java program. Regarding the program, I am using Eclipse IDE, and I need to create a

Hello. I'm looking for help regarding a Java program. Regarding the program, I am using Eclipse IDE, and I need to create a ZIP file containing the Java source code (.java files) for each problem/task, ensuring that each of the "sections" or .java codes have their own separate classes for each program. The instructions are as follows:
Task 1) Create a Book class with the following attributes and methods:
Attributes:
1) title (String)
2) author (String)
3) publicationYear (int)
4) ISBN (String)
5) available (boolean)
6) price (double)
7) totalAvailableBooks (int, static)
Methods:
1) Constructor: To initialize each field with given parameters, and increments totalAvailableBooks.
2) Mutators for each field
3) Accessors for each field
4) totalAvailableBooks(): returns the value of totalAvailableBooks
5) displayInfo(): Prints the details of the book, including title, author, publication year, ISBN, availability, and price.
6) borrowBook(): Sets the availability status to false if the book is available and decrements totalAvailableBooks; otherwise, prints a message indicating that the book is already borrowed.
7) returnBook(): Sets the availability status to true if the book is currently not available, and increments totalAvailableBooks; otherwise, prints a message indicating that the book is already in the library.
8) calculateLateFee(int daysOverdue): Takes the number of days a book is overdue as a parameter and calculates the late fee. Assume a fixed late fee of $0.50 per day overdue. Print a message indicating the late fee.
Task 2) Create a new class named LibraryTester with the following specific tasks:
1) main method
2) Instantiate three different Book objects with your favorite books, including book rental prices.
3) Use the displayInfo() method to print the details of each book.
4) Demonstrate the functionality of the borrowBook() by borrowing the first two books. Print relevant messages.
5) Print the number of available books using the totalAvailableBooks() method.
6) Use returnBook() for returning the second book. Print relevant messages.
7) Print the number of available books using the totalAvailableBooks() method.
8) Calculate and display the late fee for the second book using the calculateLateFee(int daysOverdue) method. You can assume that the rental is overdue by 5 days.
Task 3) Create UML diagrams for both Book and LibraryTester classes.
_____________________________________________________
I would greatly appreciate any help with the program. I would also like to emphasize that the 3 tasks would be seperate .java files in a ZIP. Thank you!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!