a constructor that takes in an int, a string, and a double, constructor will assign them to the ID, name, and Averageinstance variables, then a no-argument (zero-parameter) constructor that will set the ID to the name to “No name assigned” and the Average to –1.0. With an accessor method for the name variable and a mutator method for the average variable. a toString() method that will display all three instance variables on a single line, with a " | " between each one. and then an equals() method that returns true only if all three instance variables are equal

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 11PE
icon
Related questions
Question

 a constructor that takes in an int, a string, and a double, constructor will assign them to the ID, name, and Average
instance variables, then a no-argument (zero-parameter) constructor that will set the ID to the name to “No name assigned” and the Average to –1.0. With an accessor method for the name variable and a mutator method for the average variable. a toString() method that will display all three instance variables on a single line, with a " | " between each one. and then an equals() method that returns true only if all three instance variables are equal

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,