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
Juliette [100K]
3 years ago
10

Write a class declaration named Circle with a private member variable named radius. Write set and get functions to access the ra

dius variable, and a function named getArea that returns the area of the circle. The area is calculated as: 3.14159 * radius * radius
Computers and Technology
1 answer:
Kazeer [188]3 years ago
4 0

Answer:

See explaination

Explanation:

#include <iostream>

using namespace std;

class Circle{

// private member variable named radius

private:

double radius;

// get function for radius

public:

double getRadius(){

return radius;

}

// set function for radius

void setRadius(double rad){

radius=rad;

}

// returning area = 3.14159 * radius * radius

double getArea(){

return (3.14159 * radius * radius);

}

};

// Sample run

int main()

{

// Declaring object of Circle

Circle myCircle;

myCircle.setRadius(5);

// printing radius of circle

cout<<"Radius of circle is: "<<(myCircle.getRadius())<<endl;

// printing area of circle

cout<<"Area of circle is: "<<(myCircle.getArea())<<endl;

return 0;

}

You might be interested in
2ND LAST QUESTION
pychu [463]

Answer:

B

Explanation:

3 0
3 years ago
Shouldn't I be virtuoso? I keep refreshing and opening and closing tabs but it still hasn't updated
spin [16.1K]

Answer:

You are currently showing as a Virtuoso on your profile. Try clearing your cookies and logging back in.

5 0
2 years ago
What is the meaning of the word joystick
Roman55 [17]
<span>The meaning of Joystick is the control column of an aircraft</span>
4 0
3 years ago
Read 2 more answers
Questione
umka2103 [35]

Answer:

According to my physics all of functinalitys are made of angles and binary code to perform a new formula and involved to each sides....

Explanation:

HOPE IT HELPS!!!i translate into G your language

5 0
3 years ago
What acronym is used to reference the data link sublayer that identifies the network layer protocol encapsulated in the frame?
juin [17]

Logical Link Control is the data link sublayer that identifies the network layer protocol encapsulated in the frame. The acronym of Logical Link Control is LLC.

Therefore, the answer is LLC.

7 0
4 years ago
Other questions:
  • Physical access, security bypass, and eavesdropping are examples of how access controls can be ________.
    15·1 answer
  • When evaluating portable CD players, you consider price, the sound quality, and ease of using the controls. These are your _____
    8·2 answers
  • A professor is working with five teams in his marketing research class. He decides to experiment with path-goal theory in helpin
    11·1 answer
  • During which part of geologic time were dinosaurs most common?
    11·2 answers
  • Write a Python function called simulate_observations. It should take no arguments, and it should return an array of 7 numbers. E
    7·1 answer
  • Which activity might require you to provide your social security number
    8·2 answers
  • The area between the main content page and the page edges
    9·2 answers
  • PLEASE HELP QUICKLY, I WILL GIVE BRAINLIEST TO THE BEST ANSWER!
    9·1 answer
  • Which of the following commands should be used if a user does NOT want the header which has been created to appear on the first
    13·1 answer
  • A _____ focuses on creating software systems like tools, utilities, antivirus programs, and operating systems.
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!