Write a well-documented simple program using classes

Assignment Help Computer Engineering
Reference no: EM132383513

Assignment

Your objective for this test is to write a well-documented simple program using classes, a loop, and nested ifs to simulate an ATM

Your program must do the following:

1. Create an ATM class with class variables name, pin, and balance, a constructor with parameters to assign values to the three instance variables, methods to get the name, pin, and balance, and methods to handle validated deposits and withdrawals ( deposit and withdrawal amounts cannot be negative, and withdrawal amount must not be greater than the existing balance).

2. In the ATMTest class, read the names, 4 digit pin numbers, and account balances of two customers into two instances of the ATM class. Display the two customers names, pins, and balances formatted.

3. Now that you have all your customers' information start your ATM to accomplish the following within an infinite loop,

a. Display a welcome screen with your bank's information and prompt for and read the customer entered pin.

b. Use a nested if to match the entered pin with one of the two customers' pins. If the entered pin number matches that of one of the customers, then:

i. Welcome the customer by name and display the balance.

ii. Display option to

1. DEPOSIT,

2. WITHDRAW or

3. EXIT.

iii. If option 1 is selected, then use the instance deposit method to prompt for deposit amount, read, and add a valid deposit amount to the customer's balance

iv. If option 2 is selected, then use the instance withdrawal method to subtract a valid withdrawal amount from the customers balance

v. If option 3 is selected, go to step a.

4. Should the entered pin number not match either of the two customers, notify the customer that the entered pin is not valid and go to step a.

5. Selection of the EXIT option must display welcome/login screen (step a).

6. Should an incorrect option be entered, notify the user and display the original welcome/login screen (step a).

Reference no: EM132383513

Questions Cloud

What is a mendelian ratio : What is a Mendelian ratio? How does the fact that it is a ratio support the notion of a particulate nature of heredity?
Principles of inheritance like mendel performed : Would a mammal (for example, a human being) be suitable to study the principles of inheritance like Mendel performed with garden peas? If yes, why?
Hormones that maintain adult features : Upon maturation, however, the reproductive system does produce hormones that maintain adult features as well as bone structure
What should the doctor tell him : The man asks his physician if he will be able to have erections and father any children. What should the doctor tell him? Explain your answer.
Write a well-documented simple program using classes : Create an ATM class with class variables name, pin, and balance, a constructor with parameters to assign values to the three instance variables.
How will they affect the balance between securing the system : How will they affect the balance between securing the systems, and allowing the business enough breathing room to function effectively?
What are the main challenges of text analysis : Compare and contrast Hadoop, Pig, Hive, and HBase. List strengths and weaknesses of each tool set. What are the main challenges of text analysis?
What complications do you think may arise in implementation : What complications do you think may arise with implementation or managing the compliance of the act? Economic Espionage Act of 1996
Which do you find to be the most secure : Which did you struggle to understand? What do you think you need to know as a manager in order to choose the right security systems for your company?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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