Question: I need help with getting this code to execute properly ` ` ` import java.util.Scanner; oublic class JavaExample public static void main ( String args
I need help with getting this code to execute properly
import java.util.Scanner;
oublic class JavaExample
public static void mainString args
This program assumes that the student has subjects,
thats why I have created the array of size You can
change this as per the requirement.
int marks new int;
int i;
float total avg;
Scanner new ScannerSystemin;
fori; i; i
System.out.printEnter Marks of Subject"i:;
marksi scanner.nextInt;
total total marksi;
scanner.close;
Calculating average here
avg total;
System.out.printThe student Grade is: ;
ifavg
System.out.printA;
else ifavg && avg
System.out.printB;
else ifavg && avg
System.out.printC;
else
System.out.printD;
import java.util.Scanner;
oublic class JavaExample
public static void mainString args
This program assumes that the student has subjects,
thats why I have created the array of size You can
change this as per the requirement.
int marks new int;
int i;
float total avg;
Scanner new ScannerSystemin;
fori; i; i
System.out.printEnter Marks of Subject"i:;
marksi scanner.nextInt;
total total marksi;
scanner.close;
Calculating average here
avg total;
System.out.printThe student Grade is: ;
ifavg
System.out.printA;
else ifavg && avg
System.out.printB;
else ifavg && avg
System.out.printC;
else
System.out.printD;
package gradecalculater;
import static org.junitjupiter,api.Assertions.assertEquals;
import org.junit.Test;
public class IGradeCalculator
@Test
public void test
gradecalculator Test new gradecalculator;
int output test.gradecalculatorAlphabet;
assectEquals output;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
