10. Given the name of a series of students and the grades obtained on an exam, calculate and print the average grade, as well as each grade and the difference with the average. Requirements: • Show your work in a Word document. Include all your work for each question. You can include screenshots of work done on paper. • For all justification exercises, remember to use the definitions and principles that we have learned thus far. • You must prepare a written work where you respond to the programming exercises. The work must comply with APA academic writing standards. You must support your answer using appropriate sources that are properly cited.

10. Given the name of a series of students and the grades obtained on an exam, calculate and print the average grade, as well as each grade and the difference with the average. Requirements: • Show your work in a Word document. Include all your work for each question. You can include screenshots of work done on paper. • For all justification exercises, remember to use the definitions and principles that we have learned thus far. • You must prepare a written work where you respond to the programming exercises. The work must comply with APA academic writing standards. You must support your answer using appropriate sources that are properly cited.

  1.  

 

 

 

import java.util.Scanner;

 

public class JavaGrades

{

public static void main(String args[])

{

 

int marks [] = new int[6];

int i;

float total=0, avg;

Scanner scanner = new Scanner(System.in);

 

 

for (i=0; i<6; i++) {

System.out.print(“Enter marks of subject”+(i+1)+”:”);

marks[i] = scanner.nextInt();

total = total + marks[i];

}

scanner.close();

 

 

avg = total/6;

System.out.print(“The student Grade is: “);

if(avg>=80)

{

System.out.print(“A”);

}

else if(avg>=60 && avg<80)

{

System.out.print(“B”);

}

else if(avg>=40 && avg<60)

{

System.out.print(“C”);

}

else

{

System.out.print(“D”);

}

}

 

Answer:

define Array Non-smoker []

define Array Smoker []

define Array Waiting []

book-seat () {

if Current Time + 30 minutes <= Departure Time {

if Passenger is Non-smoker {

if Array Non-smoker []! = full

insert passenger id into Array Non-smoker []

else

print “Sorry, nonsmoker seat not available”

}

if Passenger is Smoker {

if Array Smoker []! = full

insert Passenger id into array Smoker []

else

print “Sorry, Smoker seat not available”

}

}

else {

insert Passenger id into Array Waiting []

}

}

 

Given the name of a series of students and the grades obtained on an exam, calculate and print the average grade, as well as each grade and the difference with the average.

Order a similar paper

Get the results you need