Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There are only one problem that you need to write java programs to solve. You need to write two classes (two java files) that are

There are only one problem that you need to write java programs to solve. You need to write two classes (two java files) that are in the same package (saved in the same location, under the same directory).

1. Bank Service problem (40 pts) Requirements:

a) You need to write two classes for this problem. Name them Accounts and BankService. The associated java files should be Accounts.java and BankService.java. Make sure the two java files are saved at the same location on your computer.

b) The Accounts class should have two attributes/properties checking balance and saving balance. Both are double values. The Accounts should be able to perform multiple actions:

1. Deposit an amount to checking

2. Deposit an amount to saving

3. Withdraw an amount to checking

4. Withdraw an amount to saving

5. Transfer an amount from checking to saving

6. Transfer an amount from saving to checking

7. Get checking balance

8. Get saving balance

9. Print/display receipt

c) The BankService class should contain only a main method. In this main method, the program instantiates / creates a bank account as an object of the class of Accounts with initialized values. It should greet the customer and display a service menu. Then it will take user input for the service choice and transaction amount. Depending on the user service choice, it will perform the transaction and modify the account balances. Lastly, the program should print a receipt, including current date and time, a message that the transaction has been completed successfully, and the ending balances of checking and saving.

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

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

Students also viewed these Databases questions

Question

Does SDT apply more to certain workers than to others?

Answered: 1 week ago

Question

What are the best practices for managing a large software project?

Answered: 1 week ago

Question

How does clustering in unsupervised learning help in data analysis?

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago