Answer to Question #63571 in Java | JSP | JSF for Jim Flores

Question #63571
Create a JAVA program that will input a student name, course, student grade in quiz, seatwork, laboratory exercises, assignment and prelim exam. Compute and output the Prelim Grade. Prelim Grade = Quiz * 25% + Seatwork * 10% + lab. Exercise * 20% +
Assignment * 5% + Prelim Exam * 40%
1
Expert's answer
2016-11-25T08:15:17-0500
import java.util.Scanner;

public class Grade {

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Student name: ");
String studentName = sc.nextLine();

System.out.println("Course: ");
int course = sc.nextInt();

System.out.println("Grade in quiz: ");
int quiz = sc.nextInt();

System.out.println("Seatwork: ");
int seatwork = sc.nextInt();

System.out.println("Laboratory exercises: ");
int lab = sc.nextInt();

System.out.println("Assignment: ");
int assignment = sc.nextInt();

System.out.println("Prelim exam: ");
int exam = sc.nextInt();

double grade = quiz * 0.25 + seatwork * 0.1 + lab * 0.2 + assignment * 0.05 + exam * 0.4;
System.out.println("Prelim Grade: " + grade);


}

}

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 the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS