The ATM Transaction Validator requires a loop and if-then logic. You will write the output to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The ATM Transaction Validator requires a loop and if-then logic. You will write the output to a file called statement.txt and read in a file called transactions.txt which contains the following information on each line of the file: 1. customer last name (two words followed by a comma as a delimiter) 2. checking account balance 3. transaction type code 4. transaction amount . . . Provide an appropriate error message if the file cannot be found. (2 points) Remember to echo (display) each input item as well. (5 points) A negative amount or insufficient fund should cause an error message to be written and the transaction is ignored. (5 points) Invalid transaction types must be reported as errors. (5 points) All monetary values should be printed with 2 decimal places and a dollar sign using the currency format. (5 points) You should also show the balance before and after, even if the transaction is bad or ignored. (5 points) Transaction type codes are (W)ithdraw, (D)eposit, (R)eport the balance W D R Subtract this money from the account. Allowed only if amount is positive and (less than or equal) to the balance or an error message is printed. Add this money to the account. Only positive amount is allowed. Report the current balance (amount is ignored). At the end of the transaction the program writes out the new balance and why it couldn't be done. In any case, if the ending balance is below $300, a warning message should be printed. (5 points) You need to create the input data file and use the following exact data to test your program: Joe Turing, 4124.50 D 200 Charles Babbage, 300.00 D 100 Sam Backus, 350.25 W 51 Khaled Mansour, 600.50 X 600 Robert McCarthy, 1000.00 RO Jack Atanasoff, 200.00 W 200 Anne Stroustrup, 300.75 W 310 Amanda Hollerith, 500.00 W -5 For example, the input file below: Stacy Jones, 300 D 100 Michael White, 350 W 51 might produce output as shown below: Customer Name: Jones, Stacy Checking balance before transaction $ 300.00 Transaction Type: D Transaction amount $100.00 Checking balance after transaction $ 400.00 Customer Name: White, Michael Checking balance before transaction $ 350.00 Transaction Type: W Transaction amount $51.00 Checking balance after transaction Warning: account is below minimum What to turn in: Your program.java listing copy of Output file statement.txt copy of Input file transactions.txt $ 299.00 $ 300.00 The ATM Transaction Validator requires a loop and if-then logic. You will write the output to a file called statement.txt and read in a file called transactions.txt which contains the following information on each line of the file: 1. customer last name (two words followed by a comma as a delimiter) 2. checking account balance 3. transaction type code 4. transaction amount . . . Provide an appropriate error message if the file cannot be found. (2 points) Remember to echo (display) each input item as well. (5 points) A negative amount or insufficient fund should cause an error message to be written and the transaction is ignored. (5 points) Invalid transaction types must be reported as errors. (5 points) All monetary values should be printed with 2 decimal places and a dollar sign using the currency format. (5 points) You should also show the balance before and after, even if the transaction is bad or ignored. (5 points) Transaction type codes are (W)ithdraw, (D)eposit, (R)eport the balance W D R Subtract this money from the account. Allowed only if amount is positive and (less than or equal) to the balance or an error message is printed. Add this money to the account. Only positive amount is allowed. Report the current balance (amount is ignored). At the end of the transaction the program writes out the new balance and why it couldn't be done. In any case, if the ending balance is below $300, a warning message should be printed. (5 points) You need to create the input data file and use the following exact data to test your program: Joe Turing, 4124.50 D 200 Charles Babbage, 300.00 D 100 Sam Backus, 350.25 W 51 Khaled Mansour, 600.50 X 600 Robert McCarthy, 1000.00 RO Jack Atanasoff, 200.00 W 200 Anne Stroustrup, 300.75 W 310 Amanda Hollerith, 500.00 W -5 For example, the input file below: Stacy Jones, 300 D 100 Michael White, 350 W 51 might produce output as shown below: Customer Name: Jones, Stacy Checking balance before transaction $ 300.00 Transaction Type: D Transaction amount $100.00 Checking balance after transaction $ 400.00 Customer Name: White, Michael Checking balance before transaction $ 350.00 Transaction Type: W Transaction amount $51.00 Checking balance after transaction Warning: account is below minimum What to turn in: Your program.java listing copy of Output file statement.txt copy of Input file transactions.txt $ 299.00 $ 300.00
Expert Answer:
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date:
Students also viewed these programming questions
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
Complete task A and task B by reading MyBank Retail Customer Services Functional Specification Document MyBank Retail Customer Services Functional Specification Introduction MyBank has grown to...
-
Canton Company makes two types of cell phones. Handy is a thin, pocket-size cell phone that is easy to carry around. Action is a palm-size phone convenient to hold while the user is talking. During...
-
What sorts of pollution problems would you expect in a small African village? In a city in India? In the People's Republic of China? In New York City?
-
Consider the following information: Raw materials inventory, beginning $4,000 Raw materials inventory, ending 3,000. Net Purchases 25,000 Freight out 500% Decrease in Work in Process inventory Wip...
-
Show that for the Ho-Lee model the (risk-neutral) standard deviation of the one-period rate is exactly \(b_{k} / 2\).
-
During the current year, Irene, a married individual who files a joint return, reports the following items of income and loss: Salary .. $130,000 Activity X (passive) . 10,000 Activity Y (rental real...
-
What role do epigenetic mechanisms play in modulating stress susceptibility and resilience, and how can this knowledge inform the design of precision medicine approaches for stress management...
-
Briefly mention the three main areas of thinking, language, and intelligence. Provide three examples (one for each area) of how cognition is often taken for granted in our everyday lives.
-
The current economy is strong and many people are feeling confident about their future and ability to pay off debt. Because of this they are taking on more bank loans for things like new cars,...
-
Watch the Ted Talk by Biochemist Cynthia Kenyon and answer the questions below. Which theory does Cynthia Kenyon's work fit? If genes could be manipulated so that people could live longer, then what...
-
Explain with an example which approaches you should take when confronting a forensic case as an investigator.
-
China, Russia, and India are using new opportunities for marketing goods and services that barely existed 5 or 10 years ago (social media, clandestine "showrooms", online peer reviews, IM...
-
Consider the following projects. Project CO C1 C2 C3 C4 C5 C6 A 2,000 +1,000 0 0 0 0 +2,000 B C 4,000 +1,000 +1,000 0 +1,000 +1,000 +2,000 3,000 +1,000 +1,000 +4,000 +1,000 +1,000 +2,000 Assume that...
-
What are analysis and design patterns and why are they useful for information systems development?
-
Show that, given a maximum flow in a network with m edges, a minimum cut of N can be computed in O(m) time.
-
Find the Laplace transform of the following signals and locate the poles and zeros of \(F(s)\). (a) \(f(t)=-8 u(t)\). (b) \(f(t)=0.5 t u(t)\). (c) \(f(t)=10 e^{-20000 t} u(t)\).
-
Find the Laplace transform of \(f(t)=-5 u(t)+5 e^{-5 t}\) \(u(t)-5 t u(t)\). Locate the poles and zeros of \(F(s)\).
-
Find the Laplace transform of \(f(t)=\delta^{\prime}(t)+\delta(t)-e^{-t} u\) \((t)\). Locate the poles and zeros of \(F(s)\).
Study smarter with the SolutionInn App