subject
Computers and Technology, 05.07.2021 19:50 eggg65

In the file BankAccount. java, build a class called BankAccount that manages checking and savings accounts. The class has three private member fields: a customer name (String), the customer's savings account balance (double), and the customer's checking account balance (double). Implement the following Constructor and instance methods as listed below:
public BankAccount(String newName, double amt1, double amt2) - set the customer name to parameter newName, set the checking account balance to parameter amt1 and set the savings account balance to parameter amt2. (amt stands for amount)
public void setName(String newName) - set the customer name
public String getName() - return the customer name
public void setChecking(double amt) - set the checking account balance to parameter amt
public double getChecking() - return the checking account balance
public void setSavings(double amt) - set the savings account balance to parameter amt
public double getSavings() - return the savings account balance
public void depositChecking(double amt) - add parameter amt to the checking account balance (only if positive)
public void depositSavings(double amt) - add parameter amt to the savings account balance (only if positive)
public void withdrawChecking(double amt) - subtract parameter amt from the checking account balance (only if positive)
public void withdrawSavings(double amt) - subtract parameter amt from the savings account balance (only if positive)
public void transferToSavings(double amt) - subtract parameter amt from the checking account balance and add to the savings account balance (only if positive)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
What kind of software users of all skill levels create web pages that include graphics, video, audio, animation, and other special effects? website authoring website software website publishing website editing
Answers: 1
question
Computers and Technology, 22.06.2019 09:30
What are the steps involved in accepting all the changes in a document? arrange these in order click edit. click accept or reject. click changes. click accept all.
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
Does read theory have answers keys ?
Answers: 1
You know the right answer?
In the file BankAccount. java, build a class called BankAccount that manages checking and savings ac...
Questions
question
Social Studies, 19.01.2021 19:10
question
Mathematics, 19.01.2021 19:10
Questions on the website: 13722367