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
-
Manufacturing Company presented the following data: Cost of goods manufactured and cost of goods sold were P375,000 and P300,000 respectively. Purchases of raw materials amounted twice as much as net...
-
Malone, Inc., an S corporation, holds an AAA balance of $1,228,000 at the beginning of the tax year. During the year, the following items occur. - Operating income - Interest income $1,002,000 13,000...
-
Assume that Crane Corp. earned net income of $ 3 , 5 6 8 , 0 0 0 during 2 0 2 6 . In addition, it had 1 0 0 , 0 0 0 shares of 9 % , $ 1 0 0 par nonconvertible, noncumulative preferred stock...
-
"If nominal GDP rises, velocity must rise." Is this statement true, false, or uncertain? Explain your answer.
-
What is the taxpayer's gross income in each of the following situations? a. Darrin received a salary of $50,000 in 2013 from his employer, Green Construction. b. In July 2013, Green gave Darrin an...
-
Study Table 12.3 and answer the questions. a. Which type of radiation has the narrowest range of wavelengths? b. Which has the second narrowest range? c. What is the range of wavelengths of...
-
Research a past California case in which you believe a removal would have changed the outcome of the case. Using your knowledge of the potential advantages of transferring a case already filed in the...
-
A particle of charge q is traveling at constant speed v along the x axis. Calculate the total power passing through the plane x = a, at the moment the particle itself is at the origin.
-
In 2 months ABC stock is going to pay dividend of $1.25. Dividends are paid each quarter. During the 3 years after the next dividend payment, ABC is expected to increase its dividends by 1.5% per...
-
List the item ID as ITEM_ID and description as ITEM_DESC for all items. The descriptions should appear in uppercase letters. Task 2: List the customer ID and first and last names for all customers...
-
1. What is your understanding on different market structures and present their implications in decision-making of a firm? Is imperfect market structure seen in your country, if yes support your...
-
A and B are partners sharing profit and losses as 2:1. On 1st April 1997 they admit C as a partner 1/5th share who pays Rs.4,500 as goodwill privately. On 1st April 1998 they take D as a partner for...
-
Machinery purchased for $47,800 by Flounder Corp. on January 1, 2018, was originally estimated to have an 8-year useful life with a residual value of $3,000. Depreciation has been entered for five...
-
Which of the following is associated with a corporate level strategy? a.To expand, grow, and prosper at a global level b.It is directed at operational effectiveness c.Develop specific business units...
-
Oakmont Company has an opportunity to manufacture and sell a new product for a four-year period. The company's discount rate is 15%. After careful study, Oakmont estimated the following costs and...
-
On December 3 1 , 2 0 2 4 , the Stride well Wholesale Shoe Company sold land in exchange for a nine - month, 1 2 % note. The note requires the payment of $ 2 0 0 , 0 0 0 plus interest on September 3...
-
You have a single data-point consisting of a customer who was offered a price of $5 for the product and who declined the offer. You are considering two models: A: the probability of acceptance as a...
-
A company produces earbuds. The revenue from the sale of x units of these earbuds is R = 8x. The cost to produce x units of earbuds is C = 3x + 1500. In what interval will the company at least break...
-
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...
-
Which one of the following can completely balance several masses revolving in different planes on a shaft? (a) A single mass in one of the planes of the revolving mass (b) A single mass in any one...
-
The curve traced by a point on the circumference of a circle which rolls along the inside of a fixed circle, is known as (a) epicycloid (b) hypocycloid (c) cardiod (d) involute.
-
Match List I with List II and select the correct answer using the codes given below the lists: List I (Forces) A. Inertia force B. Spring force C. Damping force D. Centrifugal force List II...
Study smarter with the SolutionInn App