Question: Create an inner public class named Student ( not static ) . The Student class should have a static variable, numStudent, and five instance variables.
Create an inner public class named Student not static The Student class should have a static variable, numStudent, and five instance variables. a Write the following variables: Static variable, numStudent: the number of the student objects that have been created, static, int, initial value Instance variables name: the students full name, String, egJohn Doe must be specified when instantiated. id: the students id String, created based on numStudent, eg the first student objects id should be the second student objects id should be major: the students major, String, must be specified when instantiated. gpa: the student's current gpa, double, must be specified when instantiated. username: String, each student is assigned an automatically generated username by joining their first name, last name, and student id together. b Write the constructor. c Write a public get method for each attribute and a public set method for name and major. d Write a public method called scholarship that can determine if a student is qualified for a STEM scholarship. If the students gpa is greater than and their major is either Mathematics, Cybersecurity, or Computer Science, return true. Otherwise, return false.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
