Display a message showing the account id and balance

Assignment Help Computer Engineering
Reference no: EM132217458

Written in a C++ version of the program.

This banking system is to be created for this assignment. The program will consist of five(5) classes: MustangBanking (which will contain the main method), Account, CheckingAccount, SavingsAccount and Balance.

Both the CheckingAccount and SavingsAccount classes will inherit from class Account, and they will both have a data member of type Balance.

Within method main, which is within class MustangBanking, create an ArrayList of type Account. You may call this ArrayList accounts. Within a loop, display the messages "Welcome to your Mustang Bank!" and "Please choose from the following options:". These options will be:

1 - Create a new Checking Account

2 - Create a new Savings Account

3 - Delete an existing account

4 - View a specific account

5 - View all accounts

6 - Write a check through a specific Checking Account

7 - Withdraw funds from a specific account

8 - Deposit funds into an account

9 - Exit Program Please enter your option below:

For option 1, call the method xCreateChecking, sending accounts. Upon returning, print out a statement that the Checking Account has been created.

For option 2, call the method xCreteSavings, sending accounts. Upon returning, print out a statement that the Savings Account has been created.

For option 3, call the method xDeleteAccount, sending accounts.

For option 4, call the method xViewSpecific, sending accounts.

For option 5, call the method xViewAll, sending accounts.

For option 6, call the method xWriteCheck, sending accounts.

For option 7, call the method xWithdraw, sending accounts.

For option 8, call the method xDeposit, sending accounts.

Option 9 should have the loop end and the program exit.

Classes:

The Account class will consist of:

-iId (integer)

-dInterestRate (double)

-bBalance (Balance) - Balance is a separate class

With methods: Constructor Account, which takes in the Id, Interest Rate and Balance amounts.

-getId

-setId

-getInterestRate

-setInterestRate

-deposit - which takes in an amount and adds that to the current balance withdraw - takes in an amount and subtracts it from the current balance

NOTE: If funds do not exist for the withdraw, a message must be displayed that funds are not available.

-displayAccount - Displays a message showing the account Id, Balance and Interest Rate

The CheckingAccount class extends, or inherits from class Account. In addition, It has:

-Constructor CheckingAccount that takes in the ID, Balance and Interest Rate (recall, it must then call the super class with the command super() sending it the amounts as well)

It also has the methods:

-xWriteCheck - which accepts the account ID It will first loop through the accounts to determin if the given account exists If so, will prompt the user for the check amount and will withdraw the check amount from the account If the account DOES NOT exist, a message must be displayed indicating the given ID does not exist.

The SavingsAccount class extends the Account class as well. In addition, it has:

-Constructor SavingsAccount - Takes in the ID, Balance and Interest Rate (It too must then call the super class)

-Withdraw - which takes in an amount to withdraw If funds are available, the received amount is subtracted from the Balance Otherwise, a message is displayed indicating funds are not available.

The Balance class will consist of:

-dBalance (double)

with methods:

-Constructor Balance - Have a default constructor which sets the dBalance to 0.0 And a second constructor Balance which takes in an amount that Balance is set to.

-getBalance

-setBalance

PLEASE NOTE: During some of the method processing, you will want to be sure the account you are checking is either a savings or checking account. This can be done with the ‘instanceof' operator.

For example: If (accounts.get(i) instanceof SavingsAccount) { //-- this is a savings account } In addition, please draw/write-out a UML diagram for this program.

NOTE: This specified requirements are written in accommodation of JAVA. If you prefer C++, please modify accordingly (e.g. use C++ array, no need for MustangBanking class).

Reference no: EM132217458

Questions Cloud

Charted data to make informed management decision : Analyze the given charted data to make an informed management decision related to the case study. Support your decision by referencing the data.
Create a menu-driven system to play 1 of 2 games : Create a menu-driven system to play 1 of 2 games, view the scoreboard, restart or exit the game.
What could be done to enhance moviegiong in theaters : Do you think television plays a greater role in uniting us as a culture or in separating us as individuals? How and why? Has this changed over time?
Evaluating prior team performance : Think about a recent team or group project you were part of. This could be a school-based project or a work-based example.
Display a message showing the account id and balance : Have a default constructor which sets the dBalance to 0.0 And a second constructor Balance which takes in an amount that Balance is set to.
How economics and personal lifestyle choice are involved : Prepare a 5- to 8-slide PowerPoint presentation with detailed speaker notes. If you first discuss options with your faculty member, you are also welcome to use.
M-period moving average model to predict product demand : Which of the following statements is/are true about using a M-period moving average model to predict product demand?
Should there be stronger laws outlawing cyberbullying : Does a social networking site catering to teens such as Myspace represent an ethical dilemma? Why or why not?
Perform the appropriate computation and display the results : The program prompts the user for two numeric values. Both values should be passed to functions named sum(), difference(), and product().

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd