Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Purpose : C++ program that demonstrate the use of classes Program definition: Design a class bankAccount that defines a bank account as an ADT and

Purpose: C++ program that demonstrate the use of classes

Program definition:

Design a class bankAccount that defines a bank account as an ADT and implements the basic properties of a bank account.

The program will be an interactive, menu-driven program.

a. Each object of the class bankAccount will hold the following information about an account:

account holders name

account number

balance

interest rate

The data members MUST be private.

Create an array of the bankAccount class that can hold up to 20 class objects.

b. Include the member functions to perform the various operations on objects of type bankAccount:

Include all appropriate constructors

Include any get and set member functions for member variables.

For the account number, include a separate, private, static member (integer) in the class to automatically assign and keep track of account numbers. Each customer should have a unique account number updated using the static member.

Add member functions to:

Set bank account data

Make a deposit into an account

Withdraw from an account. Be sure to include balance error checking, i.e., cannot withdraw more than is in the account.

Update balance with interest

Print all customer data

ALL member variables must be private and accessed through member functions. The main client program CANNOT access the variables directly.

c. Have the program provide the following capabilities (by user request):

Through a menu system provide the capability to:

(1) Add a customer. Ensure that the addition of a new customer does not cause an array overflow. The capability of entering the customer name, initial deposit amount and interest should be provided for a new customer. The customers account number must be generated from the private static data member and not entered during the add a customer action.

(2) Print all customer data for all customers

(3) Update customer data as follows:

Display the customers already in the banking system.

Request the user account number to update (you may need to display customer names and numbers for the user to choose) and though a submenu:

(a) Make a deposit for the customer number entered

(b) Make a withdrawal (with error checking) for the customer number entered

(c) Print balance of the customer number entered

(d) Update balance with interest for the customer number entered

(e) Exit the submenu

(4) Exit the program

d. Write the definitions of the member functions of the class bankAccount.

c. Write an interactive program that uses the class bankAccount and tests various operations on the objects of the class bankAccount. Declare an array of 25 components of type bankAccount.

f. Include error checking (invalid menu choices, subtraction errors, etc.)

g. Include menus and submenus indicating all the menu options available for (1)(4) above.

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

Students also viewed these Databases questions