Computers and Technology

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.)

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:00, alexj29227405
Write a method named addall that could be placed inside the hashintset class. this method accepts another hashintset as a parameter and adds all elements from that set into the current set, if they are not already present. for example, if a set s1 contains [1, 2, 3] and another set s2 contains [1, 7, 3, 9], the call of s1.addall(s2); would change s1 to store [1, 2, 3, 7, 9] in some order. you are allowed to call methods on your set and/or the other set. do not modify the set passed in. this method should run in o(n) time where n is the number of elements in the parameter set passed in.
Answers: 2
image
Computers and Technology, 23.06.2019 07:00, lin550
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
image
Computers and Technology, 23.06.2019 09:30, rscvsdfsrysas3712
Why is an outfitting a workspace with video games in a technology development company considered a strategic use of money
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, kyleemarie2003
Companies that implement and apply an information system effectively can create
Answers: 1
Do you know the correct answer?
Create a new Java project called Lab9A and a class named Lab9A
Inside this project create a cl...

Questions in other subjects:

Konu
Mathematics, 15.04.2020 00:24