Make a java file with name Checking2, underscore, and your netID. For example, if your netID is batman1

Make a java file with name Checking2, underscore, and your netID. For example, if your netID is batman1, your file name should be Checking2_batman1. The objective of this assignment is to create a simple class for checking account. Notice that you can recycle some of the code you wrote for last assignment.
Make a class, with same name as your file name (keep in mine the main class name should be consistent with your file name).
There are two data members:
An int variable AccNum.
A float variable Balance. Initialize the value of Balance as 100.
There are three methods:
Deposit. This method will deposit money into your account. This method should have one float parameter. There is no return value for this method. This method adds the value of parameter on the Balance of your current account.
Withdraw. This method will withdraw money from your account. It takes one float parameter. There is an int return value. This method will subtract the value of parameter from the Balance of your current account. If parameter value is larger than balance (you want to withdraw more money than you have), this method will return zero, and keep Balance to be the same as before calling this method. Otherwise, this method will return one.
Main method. The entry point to the program, i.e., public static void main(String[] args)
In the main methods:
Request input from user (you need to request two data: whether user want to deposit or withdraw; and amount).
If user entered “deposit”, call Deposit method. Then print “deposit successful”. Then print balance amount
If user entered “withdraw”, call Withdraw method.
iii. If Withdraw method returns zero, print “your withdraw exceeds limit”. Then print balance amount. Otherwise print “withdraw successful” and print balance amount.

Complete Answer:

Get Instant Help in Homework Asap
Get Instant Help in Homework Asap
Calculate your paper price
Pages (550 words)
Approximate price: -
Open chat
1
Hello 👋
Thank you for choosing our assignment help service!
How can I help you?