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 o2022-05-16 22:46:01GraduateWriterhelp.com Answers

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.

Do you need an essay written ASAP?
We are a reputable organization around the world.
Place your order today and enjoy our amazing discounts with high quality work.
genius homework essays protects our clients’ privacy and prepares custom made content to suit the requirements of our customers!
Do not be left Behind!
Order Now!

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now