so i am taking a bogus intro to programming class and need some assitance.
we were given:
Account (double balance, double interest)
Account (double balance)
double getBalance ()
double getInterest ()
void setInterest (double newInterest)
void addInterest ()
void changeBalance(double ammount)
What is the output for this code segment?
double bonus = 53.75;
double raise = bonus;
Account acct1 = newAccount (raise);
Account acct2 = acct1;
bonus = 42.25
acct1.changeBalance (32.50);
System.out.println(raise + ":");
System.out.println(acct2.getBalance());
(i think i have this answer already)
and also...
Supposing the Account class is in the banking package. I need to write a complete Java program that does the following:
-creates an account with initial balance of $500 and interest rate of 1.2%,
- deposits $76.42 into account,
-adds ammount of interest to the account balance,
-increases the balance by 3%,
-withdraws $200,
and
-prints the final balance.
Can anyone help a brother out?
thanks