Question: create a java program to do the following Create a project to model students with firstname, lastname, age, gender and student number. Create two constructors,
create a java program to do the following
Create a project to model students with firstname, lastname, age, gender and student number. Create two constructors, one to be used as default and another to include all attributes. Add a class attribute to keep count of all registered students. Use the class attribute to generate student numbers with the following format 22201XYZ, where XYZ is the current count provided by the class attribute. Implement the respective getters and setters for each attribute. Now given a list of student information create the respective objects and print out their details see samples below, make sure the student class has a toString method.
Sample Run1
2
John Doe 29 M
Kelly Daniela 40 F
Output1:
Full names : John Doe
Age : 29
Gender : M
Student Number : 22201001
Full names : Kelly Daniela
Age : 40
Gender : F
Student Number : 22201002
In the code dont use double brackets e.g int n = Integer.parseInt(sc.next());
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
