subject
Computers and Technology, 06.05.2020 00:11 llolo8

Consider the following class declarations.

public class Point
{
private double x; // x-coordinate
private double y; // y-coordinate

public Point()
{
x = 0;
y = 0;
}
public Point(double a, double b)
{
x = a;
y = b;
}

// There may be instance variables, constructors, and methods that are not shown.
}

public class Circle
{
private Point center;
private double radius;
/** Constructs a circle where (a, b) is the center and r is the radius.
*/
public Circle(double a, double b, double r)
{
/* missing code */
}
}
Which of the following replacements for /* missing code */ will correctly implement the Circle constructor?

I.
center = new Point();
radius = r;
II.
center = new Point(a, b);
radius = r;
III.
center = new Point();
center. x = a;
center. y = b;
radius = r;

A. III only

B. I, II, and III

C. II and III only

D. I only

II only

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
What is added to the < meta > tag to describe the encoding type?
Answers: 2
question
Computers and Technology, 23.06.2019 23:00
Lucas put a lot of thought into the design for his company's new white paper. he made sure to include repeating design elements such as color schemes and decorative images. his goal was to a.add symmetry b.create a unified publication c.provide consistency d.save money
Answers: 1
question
Computers and Technology, 24.06.2019 10:20
Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit' ('exit' should not be added to the list). these values entered by the user are added to a list we call 'initial_list'. then write a function that takes this initial_list as input and returns another list with 3 copies of every value in the initial_list. finally, inside print out all of the values in the new list. for example: input: enter value to be added to list: a enter value to be added to list: b enter value to be added to list: c enter value to be added to list: exit output: a b c a b c a b c note how 'exit' is not added to the list. also, your program needs to be able to handle any variation of 'exit' such as 'exit', 'exit' etc. and treat them all as 'exit'.
Answers: 2
question
Computers and Technology, 24.06.2019 14:30
Alison is having a hard time at work because hee inbox is flooded with emails every day. some of these emails are unsolicited. some of other she don’t need. which action should she take to better manager her emails?
Answers: 1
You know the right answer?
Consider the following class declarations.

public class Point
{
private do...
Questions
Questions on the website: 13722360