Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Account class ) Design a class named Account that contains: A private intdata field named id for the account (default 0). A private String

The Account class) Design a class named Account that contains:

A private intdata field named id for the account (default 0).

A private String data field namefor the account (default No Name yet)

A private doubledata field named balance for the account (default 0).

A private doubledata field named annualInterestRate that stores the current interest rate (default 0).

A private Datedata field named dateCreated that stores the date when the account was created. (You may make this a String field and access the date with the .toString()method in String.

A private int data field named transactionsfor the account (default is 0).

A private intstatic data field named numberOfAccounts that stores the current number of accounts created.

A no-arg constructor that creates a default account.

A constructor that creates an account with the specified id, name, initial balance,and annualInterestRate.

The accessor and mutator methods for id, name, balance, and annualInterestRate.

The accessor method for dateCreated.

A method named withdrawthat withdraws a specified amount from the account.

A method named depositthat deposits a specified amount to the account.

A method named displayAccountwhich will show all the information in the account.

A method name transferFunds which will transfer money from one account to another.

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

More Books

Students also viewed these Databases questions

Question

Discuss the states of accounting

Answered: 1 week ago