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. Im 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 problemtask ensuring that each of the "sections" or java codes have their own separate classes for each program. The instructions are as follows:
Task Create a Book class with the following attributes and methods:
Attributes:
title String
author String
publicationYear int
ISBN String
available boolean
price double
totalAvailableBooks int static
Methods:
Constructor: To initialize each field with given parameters, and increments totalAvailableBooks.
Mutators for each field
Accessors for each field
totalAvailableBooks: returns the value of totalAvailableBooks
displayInfo: Prints the details of the book, including title, author, publication year, ISBN, availability, and price.
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.
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.
calculateLateFeeint daysOverdue: Takes the number of days a book is overdue as a parameter and calculates the late fee. Assume a fixed late fee of $ per day overdue. Print a message indicating the late fee.
Task Create a new class named LibraryTester with the following specific tasks:
main method
Instantiate three different Book objects with your favorite books, including book rental prices.
Use the displayInfo method to print the details of each book.
Demonstrate the functionality of the borrowBook by borrowing the first two books. Print relevant messages.
Print the number of available books using the totalAvailableBooks method.
Use returnBook for returning the second book. Print relevant messages.
Print the number of available books using the totalAvailableBooks method.
Calculate and display the late fee for the second book using the calculateLateFeeint daysOverdue method. You can assume that the rental is overdue by days.
Task 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 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
