or something like this (format: name,id,dollars,cents): 2. Add to your ATM class the readUserID (IOHandlerInterface) met

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

or something like this (format: name,id,dollars,cents): 2. Add to your ATM class the readUserID (IOHandlerInterface) met

Post by answerhappygod »

or something like this (format: name,id,dollars,cents):
2. Add to your ATM class the readUserID (IOHandlerInterface)
method ,which allows I/O to be standard I/O (keyboard and console)
or dialog boxes,
and call readUserID from your ATM class's main method after step
1.
This code needs the following from the above link:
IOHandlerInterface.java, IOHandlerStandard.java, and
IOHandlerDialog.java -- put these in the same folder as your ATM
class.
Run the program twice: see if it uses dialog boxes when the
constructor IOHandlerDialog is invoked, and standard I/O (keyboard
and console/terminal) when you make the following change: invoke
the constructor IOHandlerStandard instead of IOHandlerDialog.

3. Add to your ATM class an isValid method that receives 2
parameters (BankInterface bank, String id), and call it from the
ATM's main method after step 2. The isValid method should
return a boolean, true if an account with the given id is found in
the given bank, and false otherwise. After calling the
isValid method from ATM's main method, have the main method print
(using put method of IOHandlerInterface) the result of the
validation. Run the program with the constructor
IOHandlerStandard invoked (see if standard I/O is used) then see if
dialog boxes are used when you make the following change: invoke
the constructor IOHandlerDialog instead of
IOHandlerStandard.
======
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply