Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Client Account ATM Lavailable: double -max double -name: String account. int balance: int Client Account ClientAccount(String int int) #setAvailable double), void #setMax(double): void #getawajlakleo double

image text in transcribed

Client Account ATM Lavailable: double -max double -name: String account. int balance: int Client Account ClientAccount(String int int) #setAvailable double), void #setMax(double): void #getawajlakleo double getMax 0:double setName(String): void SetAccount(int): void setBalance(int): void getNameo: String getAccountOi int it getBalance: int +displayO:void deposit(int). void withdraw(int). void to Stango: String Note: You may assume static methods for the ATM as we have only one machine in this problem. USING JAVA Tasks: 2 Implement the class diagram (UML) as given above. Follow the following steps to implement a driver method (main) in a separate class named Driver to test your classes and have a similar output like the sample one below Set the attributes of the ATM using setter methods and then print its contents. Use display method to print: ATM Available money: 4000 AED ATM Max money: 5000 AED b. Create 2 client objects using the default and full constructors. Use a toString() method that returns a string of the details for each object Name: Unknown, Account number: 0. Balance: 0 Name: your name, Account number: Your D number, Balance: 2000 AED c. Change the details of the default object using accessor methods to the values below and print the details of the 2 clients objects. User Name: John Smith Account No. 1111, Balance: 2500 Name. your name, Account imber: Your ID number, Balan 2000 AED d. Try to Withdraw 3000 from your account. e. Deposit 500 AED to the other account. f. Deposit 2000 AED to your account g Display the available balance in the two accounts and the available and maximum money in the ATM h Withdraw 2000 AED form the second user account and display his balance and the ATM available and maximum amount Create a third client account object with the same name as you and different id number. Then Compare the two objects to see if they are the same

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

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions