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
What is a layer, in the context of this lesson?
pshichka [43]

Answer:

A logical unit of a system.

Explanation:

i'm thinking your are talking about system layers such as the ISO? Layers help identify the order of how the whole system works.

7 0
3 years ago
Read 2 more answers
The main trade-off that all investors must consider is
Talja [164]
<span>The main trade-off that all investors must consider is Risk vs Return
In the end, all the techniques that implemented in investing process is aimed for nothing other than profit.
Current market trend dictates that potential return tend to be higher the riskier the investment is and vice versa.
</span>
3 0
3 years ago
Read 2 more answers
Persons who have been given access to an installation can be counted on to be of no threat. true or false? (antiterrorism scenar
aliya0001 [1]
<span>The statement that "Persons who have been given access to an installation can be counted on to be of no threat" is false. If they are not honest enough, they could become the dangerous staff the company could ever had because he or she has access to everything, files, information, etc. That is why, in selecting a person to be trusted with such responsibility, he or she undergoes an intensive training.</span>
4 0
3 years ago
Please describe how you can use the login page to get the server run two SQL statements. Try the attack to delete a record from
vekshin1
The only sure way to prevent SQL Injection attacks is input validation and parametrized queries including prepared statements. The application code should never use the input directly. ... Database errors can be used with SQL Injection to gain information about your database.
6 0
3 years ago
Aniyah is setting up a group of computers in her office that will share several devices. Which type of operating system should s
jenyasd209 [6]

Answer:

B

Explanation:

the software needs to share thus should be networked

8 0
2 years ago
Other questions:
  • Different units of CPU ?
    12·1 answer
  • After a robbery, what is the purpose of conducting a neighborhood canvass?
    9·1 answer
  • Which security control is most helpful in protecting against eavesdropping on wireless LAN (WLAN) data transmissions that would
    6·1 answer
  • In the single-site processing, single-site data (SPSD) scenario, all processing must be done on the end user's side of the syste
    10·2 answers
  • Identify any eight new programming languages and classify them based on their functionality.
    14·2 answers
  • Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print o
    6·1 answer
  • Charlie makes pizza at a restaurant. The customers always compliment how great the pizza tastes. But Charlie takes a long time t
    7·2 answers
  • Will mark Brainliest!! What is the best memory to use on a computer? Why?
    9·1 answer
  • Please help this is a coding assignment I need help! (use python)
    12·1 answer
  • When constructing policies regarding data _______________, it is important that these policies offer particular guidance on sepa
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!