Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in Java to practice OOP.Do not use break / continue in your loops. Do not use the System.exit ( ) method to

Write a program in Java to practice OOP.Do not use break/continue in your loops.
Do not use the System.exit() method to exit the program.The goal of this assignment is to practice object-oriented programming (OOP)
concepts in Java, including creating classes, using constructors, implementing
accessor (get method) and mutator (set method), and displaying formatted output. You are required to complete the implementation of a bank system that consists of
three main classes: Customer, BankEmployee, and BankAccount. Each class has
specific attributes and methods. You will also need to write a test class that include
the main method to demonstrate the functionality of these classes.
1- Implement the Customer Class
Attributes: Define private attributes for name and emailAddress.
Constructor: Create a constructor that initializes the attributes.
Accessor Methods: Implement getName and getEmailAddress methods.
Mutator Methods: Implement setName and setEmailAddress methods. toString Method: Override the toString method to return a formatted string, display
customer name and email address.
Display Method: Add a method customerDisplay to display customer details in a
tabular format. 2- Implement the BankEmployee Class
Attributes: Define private attributes for name and employeeId.
Constructor: Create a constructor that initializes the attributes.
Accessor Methods: Implement getName and getEmployeeId methods.
Mutator Methods: Implement setName and setEmployeeId methods.
toString Method: Override the toString method to return a formatted string, display employee name and employeeID
Display Method: Add a method employeeDisplay to display employee details in a tabular format.
Implement the BankAccount Class
Attributes: Define private attributes for savingAccount and checkingAccount.
Constructor: Create a constructor that initializes the attributes.
Accessor Methods: Implement getSavingAccount and getCheckingAccount
methods.
Mutator Methods: Implement setSavingAccount and setCheckingAccount
methods. Calculate Method: Add a method getTotalBalance to calculate the total balance,
adding saving and checking accounts.
toString Method: Override the toString method to return a formatted string, display
saving, checking and total balance.
Display Method: Add a method AccountDisplay to display account details in a
tabular format. write a test class that include
the main method to demonstrate the functionality of these classes. n the TestBankSystemOOPHW7 class, you will write the main method to
demonstrate the creation and manipulation of Customer, BankEmployee, and
BankAccount objects. This class will handle user input, perform various
operations, and print a summary report.
Hard coded date for the following 3 steps below
1- Create Bank Employee: Instantiate a BankEmployee object with initial values.
2- Create Customer: Instantiate a Customer object with initial values.
3- Create Bank Account: Instantiate a BankAccount object with initial values for
saving and checking accounts.
Display employee and customer information
Perform Transactions: Simulate transactions by updating the saving and checking
account balances using the get and set methods.
Add checking account balance to the saving account and get total saving
Use set method for the total saving account
Checking account balance will be zero
Deposit $1200.00 to the checking account
Set the checking account with the new balance. Display Updated Information: Print the updated customer and bank account
information.
Input Data for New Customer with same employee
Prompt for Customer Information: Ask the user to input the new customer's name,
email address, saving account, and checking account balances.
Create New Customer and Bank Account: Instantiate new Customer and
BankAccount objects using the user-provided data.
Display New Customer Information: Use the customerDisplay and AccountDisplay
methods to print the new customer's information and their bank account details.
Input Data for Third Customer with New Bank Employee
Prompt for Bank Employee Information: Ask the user to input the new bank
employee's name and employee ID.
Create New Bank Employee: Instantiate a new BankEmployee object using the
user-provided data.
Prompt for Customer Information: Ask the user to input the third customer's name,
email address, saving account, and checking account balances.
Create New Customer and Bank Account: Instantiate new Customer and
BankAccount objects using the user-provided data.
Display Third Customer Information: Use the employeeDisplay, customerDisplay,
and AccountDisplay methods to print the new bank employee's and the third
customer's information and their bank account details. Print Summary Report in a tabular format
Print Summary Header: Print a header for the summary report.
Print Information for All Entries: Use the display methods to print the information or all employees, customers, and bank accounts in a tabular format. Use System.out.printf

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

List the different categories of international employees. page 642

Answered: 1 week ago