Create a class called "Course" with attributes "department" and "number" with a default constructor that initializes to "DAT" as the department and "51" as the number.
Define functions "setDepartment" and "setNumber" for the user.
Add an overloaded operator so the user can easily see the content of the object by typing its name.
Use only what was discussed in class. Use of any other code found online or from another party, such as a tutor, will be considered cheating.
You can discuss homework with classmates, but the work you submit must be your own, not copied from another student.
Here is a sample output:
>>> a=Course()
>>> a
DAT51
>>> b=Course('ART','11')
>>> b
ART11
>>> b.setDepartment('MATH')
>>> b.setNumber(10)
MATH10
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here