Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can anyone help with this java program? i am trying to compile this soni can run it to get the run time? thanks 45 46

Can anyone help with this java program? i am trying to compile this soni can run it to get the run time? thanks
image text in transcribed
image text in transcribed
45 46 47 8 48 49 50 51 52 53 54 55 56 57 58 59 package project111; 2 import java.util.Scanner; 3 public class ProjectIII 4 public static void main(String[] args) { 5 6 String Name= getName(); 7 int NoExam-getNoExam(); double Average=getAverage (NoExam); 9 char LetterGrade=getLetterGrade (Average); 10 double GPA-getGPA (LetterGzade); 11 System.out.println("Student Namen "+Name+ 12 Average +Average + 13 Grade "+LetterGrade+ 14 GPAGPA); 15 3 16- public static int getNoExam() { 17 Scanner keyboard= new Scanner (System.in); 18 System.out.print("Enter number of test: "); 19 int Numeroftest-keyboard.nextInt(); 20 return Numeroftest; 21 } public static String getName() 23 e 1 String name= 25 Scanner keyboard= new Scanner (System.in); 26 System.out.print("Enter student Name: "); 27 name= keyboard.nextLine(); 28 return name; 29 } 30 public static int getAverage (int Nest) 31 0 32 int avgwO; 33 Scanner keyboard= new Scanner (System.in); 34 for (int i=1; i=0.0) 39 avg score; 40 else! 41 System.out.println("The grade 9 Just be between and 100); 43 --i: 64 65 66 && 68 44 5 45 46 return (avg/NTest); 47 } 48 49 public static char getLetterGrade (double avg) { 50 char LetterGrade; 51 if (avg>89) LetterGrade= A'; 52 else if (avg>79) LetterGrade='B'; 53 else if(avg>69) LetterGrade='C'; 54 else if (avg>59) LetterGrade='D'; 55 else LetterGrade='F'; 56 return LetterGrade; 57 58 59 public static int getGPA (char ch) { int GPA=0; if (ch='A') GPA= 4; else if (ch=='B) GPA= 3; 63 else if (ch=='0') GPA= 2; 64 else if (ch=='D') GPA= 1; else GPA= 0; 66 return (GPA); 67 1 68 18V 65

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

Describe different ways in which people listen.

Answered: 1 week ago

Question

What is linear transformation? Define with example

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago