Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ programming assignment Hello all, please help with my C++ programming assignment. The sample output is in the picture. really appreciate it! Design a class

C++ programming assignment

Hello all, please help with my C++ programming assignment. The sample output is in the picture. really appreciate it!

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 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.

  1. 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.

(2) Print all customer data for all customers

(3) Update customer data as follows:

Request the user account number (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.

  1. Include error checking (invalid menu choices, subtraction errors, etc.)
  2. Include menus and submenus indicating all the menu options available for (1)(4) above.

All classes must have a class definition header file (*.h) and a class implementation file (*.cpp). You must have a main program that exercises these classes (*.cpp). You must create a project in your IDE. You must submit all header files, source files (*.cpp) and the project file (*.dev, *.cpb). Submit a README file that contains: The names of all your files including all the files in the project; how to compile; and how to run.

image text in transcribed

1: Enter 1 to add a new customer. 2: Enter 2 for an existing customer. 3: Enter 3 to print customer data. 9: Enter 9 to exit the program. 2 2 Account Holder Name: hello Account Number: 100 Balance: $50.00 Interest Rate: 2.50% Enter account number: 300 Invalid customer id. 1: Enter 1 to add a new customer. 2: Enter 2 for an existing customer. 3: Enter 3 to print customer data. 9: Enter 9 to exit the program. 100 Invalid choice. 1: Enter 1 to add a new customer. 2: Enter 2 for an existing customer. 3: Enter 3 to print customer data. 9: Enter 9 to exit the program. 2 Account Holder Name: hello Account Number: 100 Balance: $50.00 Interest Rate: 2.50% Enter account number: 100 1: Enter 1 to make a deposit. 2: Enter 2 to withdraw. 3: Enter 3 to check balance. 4: Enter 4 to update balance with interest. 9: Enter 9 to 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

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

2. To compare the costs of alternative training programs.

Answered: 1 week ago