Class Subject

java.lang.Object
  extended bySubject
All Implemented Interfaces:
java.io.Serializable

public class Subject
extends java.lang.Object
implements java.io.Serializable

Since:
JDK 1.4
Version:
1.0
Author:
Joseph deGuzman
See Also:
Serialized Form

Method Summary
 java.lang.String getCode()
          Returns the subject code
 java.lang.String getDescription()
          Returns the subject description
 double getGrade()
          Returns the subject's grade.
 double getUnits()
          Returns the number of units.
 boolean isMajor()
          Identifies if subject is major or minor.
 void setAsMajor(boolean maj)
          Sets the subject to be major or minor.
 void setCode(java.lang.String thisCode)
          Sets a new subject code for this subject in upper case format.
 void setDescription(java.lang.String SD)
          Sets a new description for the subject in upper case format.
 void setGrade(double grade)
          Sets the grade for this subject.
 void setUnits(double units)
          Sets the number of units of the subject.
 java.lang.String toString()
          Returns the Subject information
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isMajor

public boolean isMajor()
Identifies if subject is major or minor.

Returns:
true if major false if otherwise.

getGrade

public double getGrade()
Returns the subject's grade.

Returns:
The grade.

getCode

public java.lang.String getCode()
Returns the subject code

Returns:
Subject Code

getDescription

public java.lang.String getDescription()
Returns the subject description

Returns:
Subject description

getUnits

public double getUnits()
Returns the number of units.

Returns:
Subject unit count.

setAsMajor

public void setAsMajor(boolean maj)
Sets the subject to be major or minor.

Parameters:
maj - true if major and false if otherwise.

setGrade

public void setGrade(double grade)
Sets the grade for this subject.

Parameters:
grade - New grade for the subject.

setCode

public void setCode(java.lang.String thisCode)
Sets a new subject code for this subject in upper case format.

Parameters:
thisCode - New subject code.

setDescription

public void setDescription(java.lang.String SD)
Sets a new description for the subject in upper case format.

Parameters:
SD - New subject description

setUnits

public void setUnits(double units)
Sets the number of units of the subject.

Parameters:
units - New Units to be set.

toString

public java.lang.String toString()
Returns the Subject information

Returns:
In format code - description