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, 24.06.2019 04:30
The ieee 802.11: defines standards for wireless local area network (wlan) communication protocols. identifies various computers or devices connected to a network. verifies any resource attached to another computer on a network that is different from the computer to which the user is logged on. connects multiple local area networks (lans) and wide area networks (wans).
Answers: 2
question
Computers and Technology, 24.06.2019 23:50
Which career involves analyzing various factors that influence the customer decision-making process? analyze various factors that influence the customer decision-making processes. reset next
Answers: 2
question
Computers and Technology, 25.06.2019 06:20
Horseback riders, bicyclists, and skateboarders the rules of right-of-way when they use the road ?
Answers: 1
question
Computers and Technology, 25.06.2019 09:00
Which element of a presentation program’s interface displays the slide you are currently creating or editing? a. slide pane b. tool bar c. menu bar d. scroll bar
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
Arts, 25.09.2021 06:20
Questions on the website: 13722363