Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.Scanner;
- public class Grades
- {
- public static void main(String[] args)
- {
- Scanner kbReader = new Scanner(System.in);
- System.out.println("What's the name of your student?");
- String s1 = kbReader.nextLine();
- Student student1 = new Student(s1);
- System.out.println("How many grades do you want to enter for " + s1 + "?");
- int ng = kbReader.nextInt();
- student1.inputGrades(ng);
- System.out.println(student1.getName() + "'s average grade is " + student1.getAverage(ng));
- System.out.println(student1.toString());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement