Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

Assignment: Bank Accounts- using Classes with Member Functions and Separate Compilation:

You have been hired as a programmer by a major bank. Your first project is a small banking transaction system. Each account consists of a number and a balance. The user of the program (the teller) can create a new account, as well as perform deposits, withdrawals, balance inquiries, close accounts, etc.

For this assignment, you must use Classes and move functionality into the classes. Specifically, you should have at least the following classes:

1. A Bank class which consists of an array of Accounts and the number of accounts currently active in the bank.

2. An Account class which consists of a Depositor, an account number, an account type, and a balance.

3. A Depositor class which has a Name and a social security number.

4. A Name class which consists of first and last names.

You must add appropriate member functions (or methods) to each class so as to implement the functionality of each of the functions of the previous assignment (HW2). Each of the functions of HW2 should be re-implemented using a class method. (You will have to decide as to which class each method belongs.) In addition, each class should minimally have a default constructor and possibly additional parametized constructors. (Some of the HW2 functions may become constructors.) Also, consider whether any of your classes needs a destructor. Remember, all I/O should be done outside of any class method.

The data members of each class must be private. As such, you may need to provide accessor and mutator functions.

You must use separate compilation of your program modules: Bank.h, Bank.cpp, Account.h, Account.cpp, Depositor.h, Depositor.cpp, Name.h, Name.cpp, as well as the module containing the main() function.

As in previous assignments, initially, the account information of existing customers is to be read into the database. The bank can handle a maximum of MAX_NUM accounts. The program keeps tracks of the actual number of currently active accounts. A table of the initial database of active accounts should be printed.

As before, the program then allows the user to select from the following menu of transactions: Select one of the following:
W - Withdrawal
D - Deposit
N - New account B - Balance
I - Account Info
X - Delete Account Q - Quit

Once the user has entered a selection, appropriate functions should be called to perform the specific transaction. At the end, before the user quits, the program prints the contents of the final database.

As in previous assignments, make sure to use enough test cases so as to completely test program functionality. EXTRA CREDIT:

1. Use a Screen Input Form for entering the new account information.
2. Create and use a TransactionInputForm class for use in entering the new account information.
3. Create and use a TransactionInputForm class for use in all transactions.

HINT: one possible approach

1a. The Bank class should at least have a default constructor that would allow statements of the form: Bank bank;

1b. The Bank class should have at least have the following methods: bool openAccount(...)

int findAccount(...)
int findAccountSSN(...) Account getAccount(...) bool deleteAccount(...)

2a. The Account class should at least have a constructor that would allow statements of the form: account[j] = Account(...);

2b. The Account class should have at least the following methods: double getBalance(...)

Depositor getDepositor(...) int getAccountNumber(...) string getAccountType(...) void makeDeposit(...)
bool makeWithdrawal(...)

3a. The Depositor class should at least have a constructor that would allow statements of the form: depositor = Depositor(...);

3b. The Depositor class should at least the following methods: Name getName(...)
string getSSN(...)

4a. The Name class should at least have a constructor that would allow statements of the form: name = Name(...);

4b. The Name class should at least the following methods: string getFirstname(...)
string getLastname(...)

5. Add additional constructors and methods to each class as necessary.

6. All I/O should be done outside of the class implementations.

Attachment:- BankAccount2.rar

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M92482902
  • Price:- $60

Priced at Now at $60, Verified Solution

Have any Question?


Related Questions in C/C++

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As