import cs1.Keyboard;

public class GPACalc_use
{
	String name;
	int cr1, cr2, cr3;
	double gr1, gr2, gr3;

	public static void main(String[] args)
	{
		GPACalc_use s1 = new GPACalc_use();  //create new instance (s1) of GPACalc_use class
		s1.Input();				//call Input method
		s1.Call_calc();	
	}






	public void Input()
	{
		System.out.print("Enter student's name: \t");
		name = Keyboard.readString();
		System.out.print("Enter first grade: \t");
		gr1 = Keyboard.readDouble();
		System.out.print("Number of credits: \t");
		cr1 = Keyboard.readInt();
		System.out.print("Enter second grade: \t");
		gr2 = Keyboard.readDouble();
		System.out.print("Number of credits: \t");
		cr2 = Keyboard.readInt();
		System.out.print("Enter third grade: \t");
		gr3 = Keyboard.readDouble();
		System.out.print("Number of credits: \t");
		cr3 = Keyboard.readInt();
	}



	public void Call_calc()
	{
		//create new instance of the GPACalc class (student1) and pass
		  //all input parameters to the parametrized constructor

		GPACalc student1 = new GPACalc(name,gr1,gr2,gr3,cr1,cr2,cr3);

		student1.display();		//call display method using new instance student1
	}
}
