edu.pdx.cs399J.junit
Class Course

java.lang.Object
  extended by edu.pdx.cs399J.junit.Course

public class Course
extends Object

This class represent a course taught at a university.


Constructor Summary
Course(String department, int number, int credits)
          Creates a new Course with a given name, taught in a given department, and for a given number of credits
 
Method Summary
 int getCredits()
          Returns the number of credits that this course is worth
 String getDepartment()
          Returns the department that offers this course
 int getNumber()
          Returns the number of this course
 void setCredits(int credits)
          Sets the number of credits that this course is worth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Course

public Course(String department,
              int number,
              int credits)
Creates a new Course with a given name, taught in a given department, and for a given number of credits

Throws:
IllegalArgumentException - number is less than 100 or credits is less than 0
Method Detail

setCredits

public void setCredits(int credits)
Sets the number of credits that this course is worth


getCredits

public int getCredits()
Returns the number of credits that this course is worth


getDepartment

public String getDepartment()
Returns the department that offers this course


getNumber

public int getNumber()
Returns the number of this course



Copyright © 2000-2009 Portland State University. All Rights Reserved.