63 093
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #60930 in Java | JSP | JSF for Liya

Question #60930
i have an assignment to create a subject marks calculator in java netbeans, I've already done the GUI which includes the labels : mark, total, percentage, textfields for those 3. i have to find the percentage and the coding must be done in a calculate button and the percentage must appear in the percentage label when running the program. This is the code i have :

public static void main(String[] args){
int total, score;
float percentage;
Scanner inputNumScanner = new Scanner(System.in);

System.out.println("Enter the total, or max, score: ");
total = inputNumScanner.nextInt();

System.out.println("Enter the score obtained: ");
score = inputNumScanner.nextInt();

percentage = (score * 100/ total);

System.out.println("The percentage is = " + percentage + " %");
}

but the problem is that it is not appearing in the GUI.
Expert's answer

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions