subject

Consider the following class declarations. Remember that a postcondition describes the result of executing a method. public class Point
{
private double myX;
private double myY;

//postcondition: this Point has coordinates (0, 0)
public Point()
{ /* implementation not shown */ }

//postcondition: this Point has coordinates (x, y)
public Point(double x, double y)
{ /* implementation not shown */ }

//other methods not shown
}

public class Circle
{
private Point myCenter;
private double myRadius;

//postcondition: this Circle has center at (0, 0) and radius 0.0
public Circle()
{ /* implementation not shown */ }

//postcondition: this Circle has the given center and radius
public Circle(Point center, double radius)
{ /* implementation not shown */ }

//other methods not shown
}
In a separate tester program/class, which of the following correctly declares and initializes Circle circ with center at (29.5, 33.0) and radius of 10.0?

A.
Circle circ = new Circle(29.5, 33.0, 10.0);
B.
Circle circ = new Circle((29.5, 33.0), 10.0);
C.
Point p = new Point(29.5, 33.0);
Circle circ = new Circle(p, 10.0);
D.
Circle circ = new Circle();
circ. myCenter = new Point(29.5, 33.0);
E.
Circle circ = new Circle();
circ. myCenter = new Point();
circ. myCenter. myX = 29.5;
circ. myCenter. myY = 33.0;
circ. myRadius = 10.0;

D
E
B
C
A

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
I'll mark brainliest if answered right! with which feature or menu option of a word processing program can you make an image like this? you can get this image using the option of a word processing program.
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
How do you share someone else’s tweet with your own twitter followers?
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Selective is defined as paying attention to messages that are consistent with one’s attitudes and beliefs and ignoring messages that are inconsistent.
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
What is a sketch or blueprint of a web page that shows the structure (but not the detailed design) of basic page elements such as the logo, navigation, content, and footer?
Answers: 3
You know the right answer?
Consider the following class declarations. Remember that a postcondition describes the result of exe...
Questions
question
Mathematics, 26.01.2021 18:00
question
Mathematics, 26.01.2021 18:00
question
Mathematics, 26.01.2021 18:00
question
Advanced Placement (AP), 26.01.2021 18:00
Questions on the website: 13722363