Code In java Netbeans A University wishes to keep information on its students. The proposed Student class has the following instance variables: studentNo: String, studentName: String, dateOfBirth:...



Code In java Netbeans


A University wishes to keep information on its students. The proposed Student class has the following instance variables: studentNo: String, studentName: String, dateOfBirth: Date, meritPoints: Integer. Merit Points represents the entry qualification achieved by a student, which is a number between 20 and 200. A class variable is also required, called noOfStudents, which will be incremented each time a Student instance is created. Write Java code to perform the following:




Q) Show the declaration of the Student class, including any setter and getter methods. Declare two constructors as follows; both constructors should increment the class variable appropriately:


a. The first is a default constructor that has no parameters and sets the instance variables to either "not known" for the strings, 20 for the integer and your date of birth for the date (assume there is a Date constructor that accepts dates in a string format).


b. The second takes 4 parameters, one for each of the instance variables.



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here