Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Program Requirements: For this assignment, you will build a dynamic bank account system with various capabilities using classes in C + + . 1 .
Program Requirements:
For this assignment, you will build a dynamic bank account system with various capabilities using
classes in C
You will create an Account class that defines public and private member data and member
functions, including constructorsdestructors an overloaded operator, etc. In particular, the
Accountclass will be structured as follows:
Account.h
This header file will contain any #includeand using directives along with the actual
classdeclaration containing:
o Three private member variables: an integer pointer for the digit account number,
a string to hold the customers name of the account, and a vector of floatingpoint
numbers to hold the balance of each account under this name eg a customer may
hold several accounts with the bank
o At least one public constructor, a constructor overload, a public destructor, public
accessormutator member functions for each private variable, and any additional
member functions as needed.
o A static integer variable that holds the next account number available that can be used
as an account number. For example, the first created account will use the integer
so the next available account number will be This is done classwide to
keep track of a "global" view of available account numbers.
Account.cpp
o The implementation section will contain the appropriate #include directive to the
Account.h header file as well as applicable constructors destructor, copy
constructor, copy assignment operator, overloaded operator definition, static variable
initialization, accessormutator member function definitions, and any additional
member function definitions declared in the header.
You will organize the rest of your program into two files as follows:
Projecth
o The projecth header file will contain the appropriate #include directive to the
Account.h header file as well as any needed #include and using directives, #define
directives, enumerated data types, structures, type definitions, and the list of function
prototypes ie function definitions
Projectcpp
o The projectcpp implementation source code file will contain the appropriate
#include directive to the Account.h header file all other #include directives should
be in the projecth header file the main function for the program, and any
supporting function definitions as described below.
Implementation of the bank account system will consist of the following:
As with all projects in this course, your programs output will display your name, your
EUID, your email address, the department name, and course number. This means that
your program will print this information to the terminal see Sample Output
You will declare and use either a vector or a dynamically allocated array of your Account
data type as a container to hold all of the instantiated Account objects of customer "bank
accounts".
In a loop of your choice, you will repeatedly display a menu of options until the user enters
the selection to terminate the program as follows:
Open new account
Deposit into account
Withdraw from account
Print a list of all accounts
End transaction Exit
Although you may assume that the user enters an integer in response to this menu, the
integer may be out of range. If the user enters an invalid menu option ie not an integer
between and inclusively your program will display an error message and redisplay
the menu. The variable used to read in the users selection will be implemented as an
integer variable, so memory must be dynamically allocated and freed as appropriate.
For each of the menu options except the End transaction Exit option, you will
implement the functionality in separate functions. For example, when the user selects
option you will perhaps call a function called openAccts that will open a new bank
account for the user. Note that you will not use any global variables in this program, so
you must pass any needed data, such as the container ie the vector or dynamically
allocated array as arguments to the functions.
If the user enters an integer between and inclusively, then your program will perform
the requested operation as follows:
o Open new account
You will prompt the user for and read in the customer account name and initial deposit
amount. The account number will be automatically generated from the static integer
variable defined earlier that holds the next account number available. Using this data,
you will instantiate an Account object for that customer and add it to your container
of customer bank accounts. If successful, you will print a status message with the
account details, formatting any monetary values to dollars and cents with decimal
places.
o Deposit into account
You will prompt the user for and read in the customer account number. If that account number exists in your bank account container, you will then prompt the
user for the customer account name for
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started