Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

can you help me do corrections on my quiz (if possible just problem number and answer) edhesive 17. Consider the following class definition public class

can you help me do corrections on my quiz
(if possible just problem number and answer)
image text in transcribed
image text in transcribed
edhesive 17. Consider the following class definition public class whatat private int length private int with public int getreat implementation not shows private int getPerimeter o 11 implementation not shown A child class Thingy that extends Whatsit would have access to a.getArea b.getPerimeter width, length, getPerimeter d. width, length, gotAreal) e. all of the above c Questions 18 - 20 pertain to the following class, Point: public class Point private double x private double y publie Point() this 0, 0); public Point (double a, double b) /* missing code */ 1/ ... other methods not shown 18. Which of the following correctly implements the equals method? public boolean equals (Point p) ! return (x =Point.x 66 y -- Point.y) t.* Sy rint. public void equals (Point p) { System.out.println(x - p.X & Y = p.y); public boolean equals (Point p) System.out.println(x == p.X & Y - p.y); public boolean equals(Point p) { Term 2. Unit 6 AP Computer Science A Edhesive edhesive public void return equals(Point p) p. 66 p. ) 19. The default constructor sets and y to (0,0) by calling the second constructor. What could be used to replace missing code / so that this works as intended? a = - 0; 0 this (0, 0); this (x, y) b- y2 b; 20. Which of the following correctly implements a mutator method for point? public double getX() [ return x; public double getX() return a; public void setCoordinates (double a, double b) y = b; public void setCoordinates (double a, double b) Point p = new Point(a,b); e. None of the above

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started