You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//This program asks the user for their bank account balance and determines the interest rate the individual wants to invest for a certain amount of time.
publicclassInvestment {
privateStringname;
privatedoubleBalance;
privatedoubleinterest;
privatedoublenumTime;
privateinttime;
publicInvestment(doublemyBalance, StringmyName) {
Balance = myBalance;
name = myName;
}
publicdoublegetBalance(){
returnBalance;
}
publicStringgetName(){
returnname;
}
publicvoiddetermineBalance(){
if(Balance >= 1000) {
ScannermyInput = newScanner(System.in);
System.out.println("Determine your interest rate: ");
doublemyInterest = myInput.nextDouble();
myInterest = myInterest/100;
System.out.println("Determine how many times you want to compound interest with respect to time: ");
doublemynumTime = myInput.nextDouble();
System.out.println("Determine how long do you want to invest: ");