1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Yakvenalex [24]
3 years ago
9

Create a class Circle with one instance variable of type double called radius. Then define an appropriate constructor that takes

an initial value for the radius, get and set methods for the radius, and methods getArea and getPerimeter.
Computers and Technology
1 answer:
Mrrafil [7]3 years ago
4 0

public class Circle {

// the private data members

private double radius;

private double area;

private double diameter;

public void setRadius(double r)

{

 radius = r;

}

public double getRadius()

{

 return radius;

}

public double computeDiameter()

{

 return radius * 2;

}

public double computeArea()

{

 return ((radius * radius) * 3.14);

}

}

You might be interested in
A difference between crt monitors and flat-panel displays is that most flat-panel displays use digital signals to display images
scoundrel [369]

some crt monitors use analog signals such as rca, coaxial, or bnc connectors.

7 0
4 years ago
In C Coding, print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userItem. Print "Unkn
shutvik [7]

The code below uses if-else structure to print the output depending on the value of the userItem.

If the specified condition in the if structure is true, the block in the structure gets executed.

Comments are used to explain the each line of the code.

//main.c

#include <stdio.h>

int main()

{  

   //defining the enum and userItem

   enum GroceryItem {GR_APPLES, GR_BANANAS, GR_JUICE, GR_WATER};

   enum GroceryItem userItem;

   //initializing the userItem

   userItem = GR_APPLES;

   

   //checking the userItem

   //If it is GR_APPLES or GR_BANANAS, print "Fruit"

   //If it is GR_JUICE or GR_WATER, print "Drink"

   //Otherwise, print "Unknown"

   if(userItem == GR_APPLES || userItem == GR_BANANAS){

       printf("%s\n", "Fruit");

   }

   else if(userItem == GR_JUICE || userItem == GR_WATER){

       printf("%s\n", "Drink");

   }

   else{

       printf("%s\n", "Unknown");

   }

   

   return 0;

}

You can see a similar question at:

brainly.com/question/17592042

6 0
3 years ago
In G mail, when we want to write an email to multiple recipients in such a way that the recipients couldn't understand that we h
Inessa05 [86]

Answer:

Bcc

Explanation:

Every recipient email address you enter into the “to” and “cc” fields will be able to see each other. The email addresses you add to the “bcc” field will not be visible to the “to” and “cc” recipients or the other “bcc” recipients.

7 0
3 years ago
Read 2 more answers
Which method finds the greatest common divisor of 14 and 35?
Liula [17]

Answer:

gcd method

Explanation:

Given

The code snippet

Required

Which method completes the code

To return the gcd of numbers, simply use the gcd method.

So: the complete code is;

<em>import math</em>

<em>math.gcd(14,35)</em>

6 0
3 years ago
What is one way you can learn about your digital footprint?
Pie

Answer:

Information could be gathered using cookies, which are small files websites store on your computer after your first visit to track user activity.

Explanation:

3 0
3 years ago
Other questions:
  • Laura would like to include additional text that is related to the document but not contained within the document.
    13·2 answers
  • Given positive integer numInsects, write a while loop that prints that number doubled without reaching 200. Follow each number w
    8·1 answer
  • Controls that are used to assess whether anything went wrong, such as unauthorized access attempts, are called ________ controls
    5·2 answers
  • Naseer has inserted an image into his document but needs the image to appear on its own line.
    14·2 answers
  • A man has a set of n keys, one of which fits the door to his apartment. He tries the keys randomly, throwing away each ill-fitting
    10·1 answer
  • Your Community Supported Agriculture (CSA) farm delivers a box of fresh fruits and vegetables to your house once a week. For thi
    10·1 answer
  • : how do network effects help facebook fend off smaller social-networking rivals?
    7·1 answer
  • Given a String variable named line1 and given a Scanner reference variable stdin that has been assigned a reference to a Scanner
    11·1 answer
  • Natalie is a secretary and must complete a large amount of filing this afternoon. At 1:00 PM, the office receptionist gets sick
    10·1 answer
  • Computer are most wonderful creation of 21st century how ?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!