Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Classes _ Objects - Project Module 1 Please create below mentioned classes and please make sure you include all data members and methods. Book and
ClassesObjects Project Module
Please create below mentioned classes and please make sure you include all data members and methods.
Book and Library:
Class : Book
Attributes: title, author, ISBN
Methods: getDetailsO, borrowBookO, returnBook
Class : Library
Attributes: listorBooks, borrowedBooks
Methods: addBookBook book borrowBookString ISBN returnBookString ISBN listAvailableBooksO
Goal: Create a small library system where books can be added, borrowed, and returned.
Instructions:
Start by creating the 'Book' class.
Define the attributes: 'title' 'author', and 'ISBN",
Create methods to get book details, borrow a book, and return a book.
Next design the 'Library' class.
Define the attributes: listofBooks" use an Array and "borrowedBooks" also an Array
Implement methods to add books to the library, borrow books using ISBN, return books, and list available books.
In the "main method you can create a separate "Main" class or use any of the two classes demonstrate the functionality by creating books, adding them to the library, borrowing, and returning them.
Screenshots of Code and output:
Bank and Account:
@ Class : Account
Attributes: accountNumber, balance
Methods: depositdouble amount withdrawdouble amount checkBalance
Class : Bank
Attributes: listofAccounts
Methods: createAccountint accountNumber depositint account Number, double amount withdrawint accountNumber, double amount checkAccountBalanceint accountNumber
Goal: Create a simple bank system where accounts can be created, deposits and withdrawals can be made, and balances can be checked.
IN JAVA AND PLEASE ADD NOTES TO SHOW UNDERSTANDING OF THE CODE THANK YOUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started