Question: JAVA ROGRAM QUESTION. Create a class called ATM that has a String called type, an int called number and a double variable called balance. It

JAVA ROGRAM QUESTION. Create a class called ATM that has a String called type, an int called number and a double variable called balance. It has a no argument constructor that sets all the values to nothingness. It has the getter and setter methods.It will have a method called setAccountNumber() that will have the user enter the 4 digit pin and set the number. It will have a setType() that will have the user enter in 1 for checking or 2 for savings and it will set the account to correct type based on a choice. It also has a computeTransaction() as a void that will ask the user to enter in 1 for deposit or 2 for withdrawal and it will compute and set the balance to appropriate value. It will have a toString() that will output each account object in the following format

Account Number 1234

Account Type Checking

Account Balance $1234.56

Create a class called ATMDemo that will have the following

An object called atm1

Create code to display the following

Welcome to ATM Bank of (your name choice goes here)

Please insert your card for the transaction

Call the setAccountNumber()

Now call the setType() method Now call the computeTransaction() method

Now output the information of the object

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!