Hi i am practicing java and just learning java for few days. i need to subtract the scholarship amount of 500000 by 100000 but i seemed to be stuck on 400000 and it does not continue. What is wrong with my code please someone help me. Thanks in advance.
import java.util.Scanner;
import java.util.LinkedList;
public class Main
{
public static void main(String [] args)
{
Scanner input = new Scanner(System.in);
Application a = new Application();
LinkedList lList = new LinkedList();
boolean bEligible = false;
int scholarship = 100000;
int scholarshipAmount = 500000;
int amount;
while(scholarshipAmount != 0)
{
System.out.println("Please enter name");
a.setsName(input.nextLine());
System.out.println("1–Pre Diploma, 2–Diploma, 3–Degree");
System.out.println("Please enter your Study Level");
a.setiStudyLevel(input.nextInt());
System.out.println("Please enter your Personality Score");
a.setiPersonalityScore(input.nextInt());
System.out.println("Please enter your Parents Incomee");
a.setdParentsIncome(input.nextDouble());
String sName = a.getsName();
int iStudyLevel = a.getiStudyLevel();
int iPersonalityScore = a.getiPersonalityScore();
double dParentsIncome = a.getdParentsIncome();
if(iPersonalityScore <=90)
{
if(dParentsIncome >=3000)
{
System.out.println("you are not eligible for scholarship ");
}
else
{
System.out.println("you are eligible for scholarship ");
bEligible = true;
}
}
else
{
System.out.println("you are eligible for scholarship ");
}
System.out.println(sName);
System.out.println(iStudyLevel);
System.out.println(iPersonalityScore);
System.out.println(dParentsIncome);
amount = scholarshipAmount - scholarship;
System.out.println(amount);
}
}
}