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 17:30
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
question
Computers and Technology, 22.06.2019 19:10
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
Per the municipal solid waste report, what are the most common sources of waste (trash
Answers: 3
question
Computers and Technology, 24.06.2019 17:40
The value of sin(x) (in radians) can be approximated by the alternating infinite series create a function (prob3_2) that takes inputs of a scalar angle measure (in radians) and the number of approximation terms, n, and estimates sin(x). do not use the sin function in your solution. you may use the factorial function. though this can be done without a loop (more efficiently), your program must use (at least) one. you may find the mod() function useful in solving the problem.
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
Mathematics, 07.12.2021 06:50
question
Mathematics, 07.12.2021 06:50
question
English, 07.12.2021 06:50
question
Chemistry, 07.12.2021 06:50
question
Mathematics, 07.12.2021 06:50
question
Social Studies, 07.12.2021 06:50
Questions on the website: 13722363