subject

Create a new Java project called Lab9A and a class named Lab9A
Inside this project create a class called Student.
Delete everything in the Student class and copy the text from Lab9A. txt (is at the bottom) into it. This creates a Student class which will define your basic student objects.
Create a new class named MSTStudent that extends Student. (So MSTStudent will be a subclass of Student.)
Add the following new variables and methods to MSTStudent
Two private instance variables, ProjectTitle (String) and ProjectGrade (double)
A constructor that initializes all the instance variables for this class (including the ones it inherits). Therefore, it should have the following parameters (you should be able to figure out what their data types should be):
inName
inGrade
inNumberOfClasses
inTotalGradePoints
inProjectTitle
inProjectGrade
It should set the GPA by calling the computeGPA( ) method. (Look at computeGPA in Student to see what parameters you might need.)
Add a print statement that says "MST Student Constructor"
A public method called toString that returns a String containing all the variables in the object (with labels)
A public boolean method called isMyGPAHigher that sends another MSTStudent in as a parameter and returns a false if his gpa is higher than the current student. It returns a true otherwise.
Back in the Student class add a print statements to the constructors that say "Student constructor with no parameters" and "Student constructor with parameters"
In the Lab9A class (main method):
Declare and instantiate a new Student object named anna, sending parameters "Anna Highsmith" and 11.
Declare and instantiate a new MSTStudent object named john, sending parameters "John Friar" and 9.
Declare and instantiate a new MSTStudent object named helen, sending parameters "Helen Chen" and 10.
Call the increaseClasses method for anna sending 8 as a parameter.
Call the increaseClasses method for john sending 8 as a parameter.
Call the increaseClasses method for helen sending 7 as a parameter.
Call the increasePoints method for anna sending 29.00 as a parameter
Call the increasePoints method for john sending 32.00 as a parameter
Call the increasePoints method for helen sending 25.50 as a parameter
Call computeGPA for all 3 students (one at a time).
Print each student’s information using the toString method shortcut.
Call isMyGPAHigher for john, sending helen as the parameter. Take the returned value and use it to print a statement saying which one’s grade is higher. (It returns a boolean value, so you’ll need an if-else statement.)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:00
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
question
Computers and Technology, 23.06.2019 00:00
What season was better from fortnite?
Answers: 2
question
Computers and Technology, 23.06.2019 15:20
What does a bonus object do? a. subtracts lives b. keeps track of a player's health c. gives a player an advantage d. makes text appear
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Which finger presses the h key on the keyboard? index finger on the left hand pinky finger on the right hand index finger on the right hand thumb on the left hand
Answers: 1
You know the right answer?
Create a new Java project called Lab9A and a class named Lab9A
Inside this project create a cl...
Questions
question
Computers and Technology, 04.02.2020 22:47
Questions on the website: 13722360