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 09:50
17. implement the jvm dload instruction for the mic-2. it has a 1-byte index and pushes the local variable at this position onto the stack. then it pushes the next higher word onto the stack as well
Answers: 2
question
Computers and Technology, 23.06.2019 01:20
Write a function balancechemical to balance chemical reactions by solving a linear set of equations. the inputs arguments are: reagents: symbols of reagents in string row array products: symbols of products in string row array elements: elements in the reaction in string row array elcmpreag: elemental composition of reactants in two dimensional numeric array elcmpprdcts: elemental composition of prducts in two dimensional numeric array hint: the first part of the problem is setting up the set of linear equations that should be solve. the second part of the problem is to find the integers from the solution. one way to do this is to mulitiply the rational basis for the nullspace by increasing larger integers until both the left-and right-side integers exist. for example, for the reaction that involves reacting with to produce and : reagents=["ch4", "o2"]; products =["co2", "h2o"]; elements =["c","h", "o"] elcmpreag=[1,4,0;
Answers: 3
question
Computers and Technology, 24.06.2019 07:30
Consider the folloeing website url: what does the "http: //" represent? a. protocal identifier. b. ftp. c. domain name d. resource name
Answers: 2
question
Computers and Technology, 25.06.2019 08:10
Memory aids that organize information for encoding are
Answers: 3
You know the right answer?
Create a new Java project called Lab9A and a class named Lab9A
Inside this project create a cl...
Questions