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 11:00
The editing of digital photos us about the same level of difficulty as editing an analog photo
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
Which best explains why a digital leader would join a society specializing in technology
Answers: 1
question
Computers and Technology, 23.06.2019 11:20
Http is the protocol that governs communications between web servers and web clients (i.e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
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
Advanced Placement (AP), 28.02.2020 03:56
question
Mathematics, 28.02.2020 03:56
question
Mathematics, 28.02.2020 03:56
question
Mathematics, 28.02.2020 03:56
Questions on the website: 13722367