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).
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?
|