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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of credits that this course is worthReturns the department that offers this courseintReturns the number of this coursevoidsetCredits(int credits) Sets the number of credits that this course is worth
-
Constructor Details
-
Course
Creates a newCoursewith a given name, taught in a given department, and for a given number of credits- Throws:
IllegalArgumentException-numberis 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
-