Question: 3. Create another Java class called StudentMain within the same project Lab7A which includes the main method. a. Include another class called Student in the

 3. Create another Java class called StudentMain within the same projectLab7A which includes the main method. a. Include another class called Studentin the same Java file. This class has following instance asscStudent in

3. Create another Java class called StudentMain within the same project Lab7A which includes the main method. a. Include another class called Student in the same Java file. This class has following instance asscStudent in the following instance variables and instance methods. Define all the instance/static variables with private access modifier and constructors, instance/static methods with public access modifier Instance name : String marks double Static variables| numStudents int (Initialized to 0) variables classSum double (Initialized to 0.0) Constructor Get values for name and marks as input parameters and set the name and marks instance variables to them. Increase the numStudents by 1 Add the marks instance variable value to classSum. Instance methods Get and set methods for 2 instance variables. displayStudent Display the values of two instance variables in following format: STUDENT NAME: MARKS: >

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!