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();
The answer to the question is available in the PDF file https://assignmentexpert.com/https://assignmentexpert.com/homework-answers/programming-answer-60930.pdf
Comments
Leave a comment