Ok I am trying to wrap my head around this:
- Write an application that creates a class for the student object with the following attributes: Student Number, Name, Address, Phone No., and Course.
Write a test program that sets and gets each attribute in the class. The test program should also display all of the attributes in the class.
- Using the student class and its attributes from the previous question, write an application (extend the previous program) that includes both a user-defined and default constructor.
Write a test program to demonstrate the use of both constructors.
This is a work-sheet from college, for some revision on Objects in Java.
The part that troubles me is the one where it asks to have both user-defined and default constructor?
I was under impression it was impossible to do it? Because if you don't provide a constructor yourself, JVM will provide one (default constructor?). But if you define any constructor, then default one becomes unavailable?
Is this just poorly worded task, or could it mean something else?