Advertisement
Guest User

Untitled

a guest
Aug 12th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.Scanner;
  3.  
  4. public class Grades
  5. {
  6. public static void main(String[] args)
  7. {
  8. Scanner kbReader = new Scanner(System.in);
  9. System.out.println("What's the name of your student?");
  10. String s1 = kbReader.nextLine();
  11.  
  12. Student student1 = new Student(s1);
  13. System.out.println("How many grades do you want to enter for " + s1 + "?");
  14. int ng = kbReader.nextInt();
  15.  
  16. student1.inputGrades(ng);
  17. System.out.println(student1.getName() + "'s average grade is " + student1.getAverage(ng));
  18. System.out.println(student1.toString());
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement