Package edu.pdx.cs410J.junit
Class Course
java.lang.Object
edu.pdx.cs410J.junit.Course
This class represent a course taught at a university.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of credits that this course is worthReturns the department that offers this courseint
Returns the number of this coursevoid
setCredits
(int credits) Sets the number of credits that this course is worth
-
Constructor Details
-
Course
Creates a newCourse
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 Details
-
setCredits
Sets the number of credits that this course is worth -
getCredits
Returns the number of credits that this course is worth -
getDepartment
Returns the department that offers this course -
getNumber
Returns the number of this course
-