a) Write a class call Student
This class should have the following data members: Number Of Students, First name, Last Name, Cunyfirst ID, GPA and their Venus Login.
Remember to name them appropriately and use lower camel case. So for example, First name = firstName.
b) Write a constructor for your class that accepts all the values listed above and initialize your object appropriately. Your constructor needs to increment the static value Number of Students each time an instantiation occured so that you can keep track of the students at any given time.
c) Write a static method that will return the number of students.
d) Write a method called getGPA that will return the student's GPA.
e) Write a method called isValidVenusLogin to check that what they entered is actually a valid Venus login. As you recall, the Venus Login has to be in this format:
lafti1234 (First two characters of your last name, first two characters of your first name and your last 4 digits of your CUNYFirst ID)
f) Write a print method called displayAttributes() that will output all non-static attribute values. So for example, you should have something like this:
System.out.println("Student Name: " + FirstName + " " + LastName);
System.out.println("GPA: " + GPA);
g) Create an array of type Student with n objects inside your main. (Use JOptionPane to ask user to tell you how many Student objects you need to instantiate.)
h) Iterate through the array and use proper constructor to instantiate and populate the values for each of your student.
Use Math.random() to select from a list of predetermined array values dynamically to select a name for each student. So, for example, you would have an array called FirstNames that has the values {"Bob", "Mary", "Peter" } and last Names = {"Peterson", "Reich", "Jackson"} etc.
Randomly select the first name and last names for each student during your instantiation as well as for your GPA, CUNY ID, and Venus Login.
i) Iterate through the array of objects and call the displayAttributes() Method that you have created in (f) to display each student's attributes.
j) iterate through the array of objects and call the isValidVenusLogin() method to display whether each student's Venus Login is valid using this format:
Student < FirstName + LastName>'s Venus Login is < Valid/Invalid>.
If you did not make a mistake during the instantiation of each Student object, you should be getting all valid Venus login.
k) Call the static method that you have created in c) to get and display the number of students using this format:
The number of students that exists now is < number of students>