B)(i)Create a class file BankAccount.java under c:\myjava folder. Declare a String member type variable called accountType and a double member type variable called balance. There are three account type values allowed: "student", "basic" and "advanced" . (ii)Create a method called minimumBalance which takes one argument of type String (acccType) and which would return a double type . Inside this method write if else statements to return different numbers depending on different values of accType. (iii) Create another method called findInterest which outputs interest for 5 years for the current account balance using a while loop.
Then save and compile by giving the javac BankAccount.java command on command prompt.
This is what I have:
class BankAccount {
public static void main () {
String accountType;
double balance;
//minimumBalance
accountType = "student";
accountType = "basic";
accountType = "advanced";
if(accountType.equals("student"))
{
return 100;
}
else if (accountType.equals("basic"))
{
return 600;
}
}