Answered step by step
Verified Expert Solution
Link Copied!

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

Classes_Objects - Project Module 1
Please create below mentioned classes and please make sure you include all data members and methods.
Book and Library:
Class 1: Book
Attributes: title, author, ISBN
Methods: getDetailsO, borrowBookO, returnBook0
Class 2: Library
Attributes: listorBooks, borrowedBooks
Methods: addBook(Book book), borrowBook(String ISBN), returnBook(String 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:
2. Bank and Account:
@ Class 1: Account
Attributes: accountNumber, balance
Methods: deposit(double amount), withdraw(double amount), checkBalance 0
Class 2: Bank
Attributes: listofAccounts
Methods: createAccount(int accountNumber), deposit(int account Number, double amount), withdraw(int accountNumber, double amount), checkAccountBalance(int 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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions

Question

A 300N F 30% d 2 m Answered: 1 week ago

Answered: 1 week ago