All pastes #210831 Raw Edit

Something

public java v1 · immutable
#210831 ·published 2006-10-20 01:17 UTC
rendered paste body
/** *  Description of the Class * *@author     nate *@created    October 19, 2006 */public class Student {    private  String  m_StName;    private  int     m_StID        = 99999;    private  int     m_TotCredHrs  = 45;    private  int     m_TotNumGP    = 100;    /**     *  Description of the Method     *     *@param  StName  Description of the Parameter     */    public void setStName(int StName) {        m_Stname = StName;    }    /**     *  Gets the stName attribute of the Student object     *     *@return    The stName value     */    public String getStName() {        return m_StName;    }    //    /**     *  Sets the studentID attribute of the Student object     *     *@param  StID  The new studentID value     */    public void setStudentID(int StID) {        m_StID = StID;    }    /**     *  Gets the studentID attribute of the Student object     *     *@return    The studentID value     */    public int getStudentID() {        return m_StID;    }    //    /**     *  Sets the totalCredHrs attribute of the Student object     *     *@param  TotCredHrs  The new totalCredHrs value     */    public void setTotalCredHrs(int TotCredHrs) {        m_TotCredHrs = TotCredHrs;    }    /**     *  Gets the totalCredHrs attribute of the Student object     *     *@return    The totalCredHrs value     */    public int getTotalCredHrs() {        return m_TotCredHrs;    }    //    /**     *  Sets the totalNumGradePoints attribute of the Student object     *     *@param  TotNumGP  The new totalNumGradePoints value     */    public void setTotalNumGradePoints(int TotNumGP) {        m_TotNumGP = TotNumGP;    }    /**     *  Gets the totalNumGradePoints attribute of the Student object     *     *@return    The totalNumGradePoints value     */    public int getTotalNumGradePoints() {        return m_TotNumGP;    }    //    /**     *  Description of the Method     *     *@return    Description of the Return Value     */    public float GPACalc() {        GPA = (float) TotNumGP / (float) TotCredHrs;        return GPA;    }    /**     *  Description of the Method     */    public void display() {        System.out.println("Student Name: " + m_StName);        System.out.println("Student ID: " + m_StID);        System.out.println("Total number of grade points: " + m_TotNumGP);        System.out.println("Total Credit Hours: " + m_TotCredHrs);        System.out.println("Student GPA: " + GPACalc());    }}