Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am incredibly desperate for help! Please please please help with this question! This needs to be completed in Java! Program Requirements (Note: Students program

I am incredibly desperate for help! Please please please help with this question! This needs to be completed in Java!

Program Requirements (Note: Students program must follow these requirements, points will be deducted if your program fails to implement all of the

requirements listed.)

Here is a checklist of things that your program should include:

  • Provide a short introduction to your program and a conclusion.

  • Provided below are the set of classes you will implement and their inheritance

    relationship:

    Account Class General Requirements The generic BASE class Account will serve as the parent class to Checking,

    Savings and CreditCard.

    Variables (protected):

    • name Name of account owner, a string

    • taxID social security number, a long

    • balance an amount in dollars, a double

    • last10withdraws a double array of size 10. The last 10 withdrawal

      amounts.

    • last10deposits a double array of size 10. The last 10 deposit amounts.

    • numdeposits number of deposits, an int

    • numwithdraws number of withdrawals, an int

      Methods:

      SetName, SetTaxID, Setbalance() assigns a new value for each with error checking GetName, GetTaxID, Getbalance() returns a value for each variable. MakeDeposit( double amount ) - adjust the balance and put it in the deposit array display() a method to display the name, taxID and balance.

      Constructor:

      A constructor with no parameters and one with name, taxID and balance as parameters

Checking Class General Requirements

A specific DERIVED class that represents a bank checking account. It must inherit (extends) Account.

Variables (private):

last10checks an int array of size 10. The last 10 check numbers.

Methods:

WriteCheck( int checknum, double amount ) - adjust the balance and list it as a withdraw in the base class

display() - display the accounts check register (number and amount) and deposit record.

Constructor:

A constructor with no parameters and one with name, taxID and balance parameters

Savings Class General Requirements

A specific DERIVED class that represents a bank savings account. It must inherit Account.

Methods:

DoWithdraw( double amount) - adjust the balance and list it as a withdraw in the base class

display() - display the accounts withdrawal and deposit record

Constructor:

A constructor with no parameters and one with name, taxID and balance parameters

CreditCard Class General Requirements

A specific DERIVED class that represents a credit card account. It must inherit Account.

Variables (private) :

cardnumber a long

last10charges a string array of size 10. The last 10 names of the charges.

Methods:

DebitCharge( string name, double amount ) - adjust the balance and list it as a withdraw in the base class

MakePayment( double amount) - adjust the balance and list it as a DEPOSIT in the base class

display() - display the accounts charges ( name and amount ) and deposit record

Constructor:

A constructor with no parameters and one with name, taxID and balance parameters

Note: all display() methods should use the println method to output text to the console.

Write a main() Function RunBank Class

Write a main that creates 3 objects, starts each with a balance of $100. Create a loop that displays the following menu each time through the loop. Make sure the balance is updated each time AND you use the objects to perform the transactions.

Checking balance: $100 Savings balance: $100 Credit Card balance: $100

MENU

1. Savings Deposit 2. Savings withdrawal 3. Checking Deposit 4. Write A Check 5. Credit Card Payment 6. Make A Charge 7. Display Savings 8. Display Checking 9. Display Credit Card

10. Exit

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

Students also viewed these Databases questions

Question

1. Does your voice project confidence? Authority?

Answered: 1 week ago