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

  What are some trends which computer support has witnessed

what are some trends that computer support has witnessed over the past 10 years? how does the cost benefit of

  How can we quickly test if k is even

We say that k is even if and only if |k| mod 2 = 0. How can we quickly test if k is even without using arithmetic operations, and without using mod?

  Write a generic bubble sort method

Write a generic bubble sort method. The bubble sort sorts the elements using the Comparable interface.

  What speedup is achieved if both optimizations are adopted

A memory cache is a small but fast memory where data recently accessed is kept in anticipation of future references.

  What is needed to interface to the lcd

The pin numbers in thedefinition of LcdDriver are critical and are based on the traces from the schematic.

  Explain what is the project

Based on week 13 reading assignment, describe an IT or similar business project you have done or are currently doing. In your discussion, provide information.

  Discuss between eprom and flash eeprom

A manufacturer designs a single-board computer with eight pairs of bytewide EPROMS to hold system firmware. The designer decides to cater for three EPROM sizes.

  Subnet mask and ip addresses

Which subnet mask would they utilize? How many IP addresses would they have per subnet?

  Write a program using a stack abstract datatype

Write a program using a stack abstract datatype to get the correct count for the trees in different parts of the jungle.

  Enter a positive integer for massive reproduction of the pic

Write a program in C++ to reproduce the drawing below called using two user-defined functions (UDF) called tree and eat.

  How many tapes will be required to back up a hard drive

How many 100MB tapes will be required to back up a 9GB hard drive? How long will the backup process require if one tape can be filled in S minutes?

  Express the role of each table

Propose the design of a database. Explain the role of each table in your proposed database and the relationships between the tables.

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