A.Write the code that will call the reset method in the Person class in #9 above
ID: 3705655 • Letter: A
Question
A.Write the code that will call the reset method in the Person class in #9 above.
B. Write the code that will call the reset method in the Student class in #9 above.
C. If you try to copy the code from the code-9_1.txt file found in #9 and paste it into Eclipse, it will cause an error at the beginning of the Person class. What is the error? How do you fix it?
D.After you make the fix noted in #12 above, there is a triangle to the left of the second reset method in the Student class. What is the message when you hover over the triangle to the left of the second reset method in the Student class?
Explanation / Answer
A.
Person p= new Person(); //creates a new person
p.reset(:JOHN"); //calls reset method on person
B.
Student s= new Student(); //creates a new Student
s.reset(:JOHN"); //calls reset method on Student
C.
The error is public class Person should be declared in a file named Person
This error can be fixed by removing public keyword before class name Person
D.
Message is add @override annotation on reset method
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.