Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started