Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ For this assignment you may work on your own or in pairs. Part 5 (Bank class) is only required for people working in pairs.

C++
For this assignment you may work on your own or in pairs. Part 5 (Bank class) is only required for people working in pairs.
Part 1: BankAccount
Create an abstract class BankAccountprivate static field: maxAccountID
Private member fields: accountID, accountHolder (name), address, phoneNumber, email addresscreate getter for all of these
create setter for address, phoneNumber, email address
protected member fields: double accountBalancecreate getter
public virtual method: printStatementprints out all Bank account information in user-friendly manner
public virtual method: depositMoneytakes in parameter double amount
return type void
declare pure virtual method: withdrawMoneytakes in parameter double amount
returns boolean on success or failure
Constructor: create at least one constructor that takes in name, phone, email, initialDeopsit (double)accountID should be set to the next highest ID ( use maxAccountID variable)
set accountBalance to initialDeposit
optional extra constructor takes in other fields
Part 2: Checking
Create class CheckingAccount that is a subclass of BankAccountgetter for available funds
print that the type of account is Checking
add information about available funds
print all other information including account balance
add 70% of money to availableFunds
add 100% of money to accountBalance
[Why is this a requirement? When you deposit a check at a bank it is common that only some of it becomes available to you immediately. In the real world you have to wait a certain amount of time until the full amount is available.]
check if funds available for withdraw - available funds must stay less than or equal to accountBalance
available funds should start the same as initial deposit
private double field: availableFunds
override: printStatement
override: depositMoney
implement withdrawMoney
create a constructor
Part 3: Savings
Create class SavingsAccount that is a subclass of BankAccountimplement getter/setter
print that the type of account is Savings
add information about interest rate
print other account

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

SQL For Data Science Data Cleaning Wrangling And Analytics With Relational Databases

Authors: Antonio Badia

1st Edition

3030575918, 978-3030575915

More Books

Students also viewed these Databases questions