2. Create classes with some of the functionality of a bank account. A single account may have (2) one or more joint owners, but one customer can be the owner of only one bank account (for now). Each o

Get perfect grades by consistently using our affordable writing services. Place your order and get a quality paper today. Take advantage of our current 20% discount by using the coupon code GET20


Order a Similar Paper Order a Different Paper

2. Create classes with some of the functionality of a bank account. A single account may have (2) one or more joint owners, but one customer can be the owner of only one bank account (for now). Each of the following should be represented by a class that can have data and functions: • Customer class • Account class 3. • Customer should have the following attributes: Account, Full Name, Work Phone, Home (4) Phone, Cell Phone, Address Line 1, Address Line 2, City, Province, Postal Code. • Customer should always have a full name and also has a default empty string for all of the string values. • Customer should have member functions to set/get all of the data members. • Add validation code to ensure the following: – It is optional for a customer to have an account – A customer must have a full name of at least 1 character in length – One of the phone numbers must be set (any one), and additional phone numbers are optional – Address Line 2 can be blank, but the other address lines can not be blank For each of the above items, write a human readable error message to standard error when validation prevents an action from succeeding. For setter functions, return true if the operation succeeded, and return false if the operation failed. 4. • Account should have the following data members: Account Number, status (can only be (3) one of open, closed, frozen), date opened, branch number, subaccounts • Account should have a constructor that sets reasonable defaults for all of the data members. • Account should have member functions to set/get all of the data members where it makes sense to set the value (add inline comments explaining any decisions to omit get/set functions). In the case of subaccounts add member functions to add and/or remove one subaccount at a time. • Add validation code to ensure the following: – The constructor always requires an account number and a Customer – A newly created account is automatically an open account – An open account can be closed or frozen. A closed account can not be opened or frozen. A frozen account can return to open state and it also can be closed without returning to open state first. – Account balance can be both negative or positive, and must be stored as an integer representing a number of pennies (cents) rather than dollars. – Account deposits and withdrawals must be done using number of pennies (cents) rather than dollars. – Deposits and withdrawals must be positive numbers. – Ensure that the balance can never fall outside of the range of a 32 bit signed integer, but permit as much of this range as possible, including negative values. For each of the above items, write a human readable error message to standard error when validation prevents an action from succeeding. For setter functions, return true if the operation succeeded, and return false if the operation failed. 5. Write a test suite for the above functionality. Use the test suite to verify that your classes are (6) implemented correctly. Ensure that I have access to your git repostory. Please post the path of your git repository to the assignment drop box.

Have your paper completed by a writing expert today and enjoy posting excellent grades. Place your order in a very easy process. It will take you less than 5 minutes. Click one of the buttons below.


Order a Similar Paper Order a Different Paper