RunSavingsAccount Java
RunSavingsAccount Java
Scanner;
if(Press.equalsIgnoreCase("d")){
System.out.print("Please enter the amount for another deposit: ");
int anotherdeposit = user.nextInt();
savings.deposit(anotherdeposit);
if(savings.getBalance() > 1000){
double gBalance = savings.getBalance() *
RunSavingsAccount.setInterestRate(newRate);
double fBalance = savings.getBalance() + gBalance;
System.out.println("Your new balance " + "" + fBalance);
}
else if (Press.equalsIgnoreCase("w")){
System.out.print("Please enter the amount you want to withdraw: ");
double withdraw1 = user.nextDouble();
savings.withdraw(withdraw1);
if(savings.withdraw(withdraw1) > 0){
double WithDraw = amount - withdraw1;
System.out.println("Your new balance is " + WithDraw);
}
else if (savings.withdraw(withdraw1) == 0){
System.out.println("Invalid Input");
}
}
}
}
}
This study source was downloaded by 100000837799267 from CourseHero.com on 11-16-2022 00:39:01 GMT -06:00
https://www.coursehero.com/file/111634267/RunSavingsAccountjava/
Powered by TCPDF (www.tcpdf.org)