/* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.io.*; /** * * @author lawtonb */ public class Student1{ private String ID; private float Exam1; private float Exam2; private float Avg; public void calcAvg() { Avg = (Exam1 + Exam2)/2; } public float getAvg() { return Avg; } public void setID() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter an ID"); ID = br.readLine(); } public String getID() { return ID; } public void setExam1(float e1){ Exam1 = e1; } public void setExam2(float e2){ Exam2 = e2; } public void showAll(){ System.out.println(); System.out.println("Student ID: " + ID); System.out.println("Exam 1: " + Exam1); System.out.println("Exam 2: " + Exam2); System.out.println("Average grade: " + Avg); System.out.println(); } } // end class Student