CS 1713 Practice Problems: Student Info


Tracking student information

The incomplete class StudentInfo is used to keep track of a student's records. It contains the name, hours taken, and grade points earned by the student. The class calculates the GPA of the student and determines if the student is a senior. Other member functions are not shown.

Directions:


public class StudentInfo { 
   // fields
   private String myName; 
   private int myCreditHours; 
   private double myGradePoints; 
         
   // constructor 
   public StudentInfo(String name, int creditHours, double gradePoints) { 

      

      
      
   } 
   
   //accessors 
   public String getName() {    



   }
                          
   public int getCreditHours() { 


 
   }
              
   public double getGradePoints() { 


              
   } 
                       
   public double computeGPA()   {   




   } 
               
   public boolean isSenior()  { 




   } 
                    
   public String toString( )  {





                   
   } 
   
   //  other modifiers here ...
    
    
    
    
               
} 


public class StudentInfoTest {

   public static void main (String[] args) {
   
   


 
 
 
   
   
   }
}