subject
Business, 07.11.2019 02:31 ninaaforever

Project: money tree create a class called bankaccount. it should have the following properties:
1. two state variables: double balance… this is how much money is currently in the account. string name…the name of the person owning the account.
2. constructor should accept two parameters.
a. one should be a double variable that is used to initialize the state variable, balance.
b. the other should be a string that is used to initialize the state variable, name.
3. two methods:
a. deposit…returns nothing…accepts a double that is the amount of money being deposited. it is added to the balance to produce a new balance.
b. withdraw…returns nothing…accepts a double that is the amount of money being taken out of the account. it is subtracted from the balance to produce a new balance. create a tester class that has a main( ) method. in that method you should input from the keyboard (scanner) the amount (2000) of money initially to be put into the account (via the constructor) along with the name of the person to whom the account belongs. 1 use these two pieces of data to create a new bankaccount object called myaccount. 2 print the balance of the account, using this format. the bill murray account balance is, $2000.00 3 call the deposit method to deposit. (i. e. $815.22) 4 print the balance using the same format. the bill murray account balance is, $2815.22 5 call the withdraw method to withdraw some money (i. e. $100) 6 print the remaining balance in this format:

ansver
Answers: 1

Another question on Business

question
Business, 22.06.2019 09:00
Brian has been working for a few years now and has saved a substantial amount of money. he now wants to invest 50 percent of his savings in a bank account where it will be locked for three years and gain interest. which type of bank account should brian open? a. savings account b. money market account c. checking account d. certificate of deposit
Answers: 1
question
Business, 23.06.2019 08:00
Which of the following is a benefit of a hat? it has a sports team logo on it. it makes the wearer look cool. it is red. it costs $12.
Answers: 2
question
Business, 23.06.2019 15:00
How should the environmental effects be dealt with when evaluating this project? the environmental effects should be ignored since the plant is legal without mitigation. the environmental effects should be treated as a sunk cost and therefore ignored. if the utility mitigates for the environmental effects, the project is not acceptable. however, before the company chooses to do the project without mitigation, it needs to make sure that any costs of "ill will" for not mitigating for the environmental effects have been considered in the original analysis. the environmental effects should be treated as a remote possibility and should only be considered at the time in which they actually occur. the environmental effects if not mitigated would result in additional cash flows. therefore, since the plant is legal without mitigation, there are no benefits to performing a "no mitigation" analysis.
Answers: 1
question
Business, 23.06.2019 16:00
What is the difference between a debtor and a creditor?
Answers: 1
You know the right answer?
Project: money tree create a class called bankaccount. it should have the following properties:
Questions
question
Mathematics, 04.08.2019 07:30
question
Mathematics, 04.08.2019 07:30