Problem In this question, you will implement a program to simulate a series of basic bank...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Problem In this question, you will implement a program to simulate a series of basic bank transactions. When the program is run, the user should asked to input the initial bank balance. Afterwards, the user will be prompted with a text-based menu with three options: 1. Deposit 2. Withdraw 3. Quit If the user enters the number 3, the program should terminate. If the user enters the number 1 or 2, they should be prompted with a request to enter their personal identification number (PIN). If the user enters the correct number (for simplicity, assume the user's pin is "1234"), they should be prompted to enter the amount to Deposit or Withdraw, depending on the command entered. Based on the amount entered, up- date the user's balance accordingly and print a message indicating the new balance in the user's account. Continue presenting the user with the menu until the user quits the program (the user should be able to continue to make withdrawals and deposits within the same session). See the following sample output from the program: Please enter starting balance: 500 The current balance is: 500.0 What would you like to do? 1. Deposit Money 2. Withdraw Money 3. Exit 1 Please enter PIN: 5467 Incorrect PIN. The current balance is: 500.0 What would you like to do? 1. Deposit Money 2. Withdraw Money 3. Exit 1 Please enter PIN: 1234 UNIVERSITY OF SASKATCHEWAN Department of Computer Science 1 da 110 FE T Please enter amount to deposit: 250 The current balance is: 750.0 What would you like to do? 1. Deposit Money 2. Withdraw Money 3. Exit 2 Please enter PIN: 1234 Please enter amount to withdraw: 1000 Insufficient funds The current balance is: 750.0 What would you like to do? 1. Deposit Money 2. Withdraw Money 3. Exit 2 Please enter PIN: 1234 Please enter amount to withdraw: 749.50 The current balance is: 0.5 What would you like to do? 1. Deposit Money 2. Withdraw Money 3. Exit 3 Page 3 Program terminated. Final balance is: 0.5 Process finished with exit code 0 CMPT 270 Fall 2023 Developing Object Oriented Systems Hints: . You will need to use a loop to implement the main menu mechanism . You will need to use the Scanner class to read input from the console (since we have not yet covered exceptions and error handling in class, you can just assume that only valid input will be entered) Problem In this question, you will implement a program to simulate a series of basic bank transactions. When the program is run, the user should asked to input the initial bank balance. Afterwards, the user will be prompted with a text-based menu with three options: 1. Deposit 2. Withdraw 3. Quit If the user enters the number 3, the program should terminate. If the user enters the number 1 or 2, they should be prompted with a request to enter their personal identification number (PIN). If the user enters the correct number (for simplicity, assume the user's pin is "1234"), they should be prompted to enter the amount to Deposit or Withdraw, depending on the command entered. Based on the amount entered, up- date the user's balance accordingly and print a message indicating the new balance in the user's account. Continue presenting the user with the menu until the user quits the program (the user should be able to continue to make withdrawals and deposits within the same session). See the following sample output from the program: Please enter starting balance: 500 The current balance is: 500.0 What would you like to do? 1. Deposit Money 2. Withdraw Money 3. Exit 1 Please enter PIN: 5467 Incorrect PIN. The current balance is: 500.0 What would you like to do? 1. Deposit Money 2. Withdraw Money 3. Exit 1 Please enter PIN: 1234 UNIVERSITY OF SASKATCHEWAN Department of Computer Science 1 da 110 FE T Please enter amount to deposit: 250 The current balance is: 750.0 What would you like to do? 1. Deposit Money 2. Withdraw Money 3. Exit 2 Please enter PIN: 1234 Please enter amount to withdraw: 1000 Insufficient funds The current balance is: 750.0 What would you like to do? 1. Deposit Money 2. Withdraw Money 3. Exit 2 Please enter PIN: 1234 Please enter amount to withdraw: 749.50 The current balance is: 0.5 What would you like to do? 1. Deposit Money 2. Withdraw Money 3. Exit 3 Page 3 Program terminated. Final balance is: 0.5 Process finished with exit code 0 CMPT 270 Fall 2023 Developing Object Oriented Systems Hints: . You will need to use a loop to implement the main menu mechanism . You will need to use the Scanner class to read input from the console (since we have not yet covered exceptions and error handling in class, you can just assume that only valid input will be entered)
Expert Answer:
Answer rating: 100% (QA)
Below is a simple java program that fulfills the requirements outlined in the problem import javauti... View the full answer
Related Book For
Fundamental Financial Accounting Concepts
ISBN: 978-0078025907
9th edition
Authors: Thomas Edmonds, Christopher Edmonds
Posted Date:
Students also viewed these programming questions
-
"If nominal GDP rises, velocity must rise." Is this statement true, false, or uncertain? Explain your answer.
-
Refer to Canadian Tire's financial statements in Appendix A at the end of this book. 1. Canadian Tire's balance sheet reports a current portion of long-term debt under current liabilities. Why is...
-
A flat piece of cast iron 100. mm wide and 150. mm long is to be milled with a feed rate of 200. mm/ minute with a depth of cut of 1.0 mm. The milling cutter rotates at 100. RPM, and is wider than...
-
What is a system property?
-
Selected account balances before adjustment for Newhouse Realty at March 31, 2012, the end of the current year, are as follows: Data needed for year-end adjustments are as follows: a. Unbilled fees...
-
The service division of Culver Industries reported the following results for 2022. Sales $580,000 Variable costs 348,000 Controllable fixed costs 72,500 Average operating assets 725,000 Management is...
-
Slopes Inc. manufactures and sells snowboards. Slopes manufactures a single model, the Pipex. In the summer of 2015, Slopes's accountant gathered the following data to prepare budgets for 2016. These...
-
Connecting the Concepts: Oxidative Phosphorylation 12 o Drag the labels at let into the appropriate targets on the right to complete this concept map about oxidative phosphorylation. Reset Help ATP...
-
A company projects an increase in net income of $30,000 each year for the next five years if it invests $300,000 in new equipment. The equipment has a five-year life and an estimated salvage value of...
-
STS plc collects waste from houses, offices and factories. Most of the waste is burned to produce heat and electricity for the companys own use. This saves costs and reduces the impact on the...
-
The standard variable overhead rate for Unbeatable Toys is $5. Budgeted fixed overhead is $20,000. Unbeatable Toys' budgeted production was 2,000 units for the current period and actual production...
-
A solid sphere that is uniformly positively charged produces an electric field. Assume no other objects are around. What is the magnitude of the electric field a distance r from the center of the...
-
The uniform meterstick has an object with mass 800 grams hanging at the 15cm mark and an object with mass 350 grams at the 70cm mark. It balances horizontally on a pivot placed at the 35cm mark. What...
-
ABC sells Rs. 100,000 of its accounts receivables to a factor and receives an 80% advance immediately. The factor charges a fee of Rs. 8,000 for the service. The debts are factored with recourse and...
-
Explain what is meant by vicarious liability and when it is available?
-
Nickleson Company had an unadjusted cash balance of $7,750 as of May 31. The companys bank statement, also dated May 31, included a $72 NSF check written by one of Nicklesons customers. There were...
-
At the beginning of 2016, Event Services Co. had the following normal balances in its accounts: Account Balance Cash ........... $60,000 Accounts Receivable ...... 38,000 Accounts Payable .........
-
The following information was taken from the accounts of Adamss Eatery, a delicatessen, at December 31, 2016. The accounts are listed in alphabetical order, and each has a normal balance. Accounts...
-
Using data from a random sample of elementary schools, a researcher regresses average test scores on the fraction of students who qualify for reduced-price meals. The regression indicates a negative...
-
In the study of cigarette demand in this chapter, suppose we used as an instrument the number of trees per capita in the state. Is this instrument relevant? Is it exogenous? Is it a valid instrument?
-
In the demand curve model of Equation (12.3), is \(\ln \left(P_{i}^{\text {butter }} ight)\) positively or negatively correlated with the error, \(u_{i}\) ? If \(\beta_{1}\) is estimated by OLS,...
Study smarter with the SolutionInn App