0% found this document useful (0 votes)
286 views

Java Assignment 3 OOP ATM 1

The document describes an assignment to create an ATM simulation application using object-oriented programming. The application uses an Account class to represent customer accounts, with attributes like account number, owner name, amount, and account type. It also uses an ATM class to implement ATM functions like withdraw, deposit, transfer, and view amount by accepting Account objects as parameters and performing operations that update the account amounts. The main method runs the application by calling the ATM class methods.

Uploaded by

Thái Thông
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
286 views

Java Assignment 3 OOP ATM 1

The document describes an assignment to create an ATM simulation application using object-oriented programming. The application uses an Account class to represent customer accounts, with attributes like account number, owner name, amount, and account type. It also uses an ATM class to implement ATM functions like withdraw, deposit, transfer, and view amount by accepting Account objects as parameters and performing operations that update the account amounts. The main method runs the application by calling the ATM class methods.

Uploaded by

Thái Thông
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

ATM ASSIGNMENT 2 – OOP ATM1

1. Write an application to simulator an ATM which is design as below:

Note:
In Account Class:
- accountNo: is a String number which is determines account.
- ownerName: is name of customer who owner account.
- amount: is amount of account.
- AccountType: is type of account like “Saving account” or “Transaction account”.
- Deposit method accept an double value like a parametter and decrease value of amount
of current object.
- Withdraw method accept an double value like a parametter and inrement value of
amount of current object.
ATM Class:
- Using Account class and implement ATM function like withdraw, deposit, view amount,
transfer money…
- Withdraw method accepts an account object as a parameter then asks the user enter an
amount to withdraw. After that check the amount in account, if it greater than amount
withdraw then subtraction amount in account else an error message will be display in
screen.
- Deposit method accepts an account object as a parameter then asks the user enter an
amount. After that add deposit amount to account amount.
- Transfer method accepts two account objects as a parameter then asks the user enter
an amount. After that check the amount in first account, if it greater than amount
withdraw then reduce amount in first account and plus to second account else an error
message will be display in screen.
- ViewAmount method accepts an account object as a parameter then display
information of account to screen.
- Main method will call the methods to run application.

You might also like