Reference no: EM131396040
You have been developing a BankAccount class for Parkville Bank that contains several fields and functions, including overloaded operators. You have also created child classes derived from the BankAccount class:
CheckingAccount, SavingsAccount, and CheckingWithInterest. Complete these tasks:
a. Create a BankAccountException class. The class contains a BankAccount object and a string message explaining the reason for the exception. Include a constructor that requires values for the BankAccount and the message. Also include a function that displays the message.
b. Modify each BankAccount class constructor and data entry function so that it throws an exception whenever a client attempts to instantiate a BankAccount with an account number that is less than 1000 or greater than 9999.
c. Write a main()function that asks the user to enter values for four BankAccounts. If the user attempts to create a BankAccount with an invalid account number, catch the exception, display a message, and force the account number and balance to 0. Display the four BankAccount objects. Save the file as BankException1.cpp.
d. Write a main()function that declares an array of four CheckingAccounts. (The CheckingAccount constructor calls the BankAccount data entry function, so an exception might be thrown.) If the user attempts to create a CheckingAccount with an invalid account number, catch the exception, and, before ending the program, display two messages. The first message is the string message contained in the BankAccountException object. The second indicates which CheckingAccount (1, 2, 3, or 4) caused the early termination. If all four CheckingAccounts are valid, then display them. Save the file as BankException2.cpp.
e. Alter the SavingsAccount constructor to make sure an exception is thrown when the account number is invalid (based on the same rules for a BankAccount account number) and also when the interest rate is negative. (Make sure the messages are different.) Write a main()function that declares an array of four SavingsAccounts. If the user attempts to create a SavingsAccount with an invalid account number or a negative interest rate, catch the exception, display the appropriate message, and display which account caused the early termination (1, 2, 3, or 4). If all four SavingsAccounts are valid, then display them. Save the file as BankException3.cpp.
Create a fractionexception class
: Create a FractionException class. The class contains a Fraction object and a string message explaining the reason for the exception. Include a constructor that requires values for the Fraction and the message. Also include a function that displays..
|
Perform a mann whitney u test and write a conclusion
: Suppose your friend in given problem arranged for three more cars, labeled the 9 cars A-I, changed a to .05, and conducted the "quiet" test. The results are shown in the accompanying table. Perform a Mann-Whitney U test and write a conclusion.
|
Write a report on network design and management trends
: You will research and report on network design and management trends over the last three years (present year minus 2) in the areas of virtualization and security.
|
My grandmothers dumpling
: Which kind of process is this essay? In other words, what is the author's purpose: Could a reader recreate the dumplings based on reading this? Or is the writer describing the process?
|
Create a bankaccountexception class
: Modify each BankAccount class constructor and data entry function so that it throws an exception whenever a client attempts to instantiate a BankAccount with an account number that is less than 1000 or greater than 9999.
|
What is the issue that article is specifically addressing
: Articles are written to inform, misinform, influence, or misdirect, among other reasons. Sometimes they serve as nothing more than a vehicle for an author to achieve fame, notoriety, and wealth. You should never take at face value the elements o..
|
What are the advantages of complex routing algorithms
: Complex routing algorithms are used to maintain routing tables. What algorithms are used, and how do they work? What are the advantages and disadvantages of each? Which ones are most commonly used in today's networks?
|
What are the advantages of complex routing algorithms
: Complex routing algorithms are used to maintain routing tables. What algorithms are used, and how do they work? What are the advantages and disadvantages of each? Which ones are most commonly used in today's networks?
|
Present the problem that needs to be addressed
: Provide a concluding paragraph that summarizes the stated problems and promises a solution - Develop a coherently structured paper with an introduction, body, and conclusion.
|