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 the portion of the PowerPoint window that contains the current slide, total slides, zoom options, and various shortcuts
telo118 [61]
Normal view is the answer
7 0
3 years ago
After Intel faced strong shifts in technologies, such as cloud services, social networking, mobile devices, etc., Intel realized
Crazy boy [7]

Answer:

d. Information governance board

Explanation:

In 2004 <em>Intel </em>was in need of a governance process as part of the company’s policy of <em>Intel’s Information Management (IMM)</em>. Such policies and governance were important in the corporation’s process in order to mirror the local laws as well as to reproduce Intel’s dynamic nature of its activities as a corporation. The <em>Information Governance Boards </em>were intended for every main data area of the company: <em>location, item, finance, customer, supplier, and worker</em>. Such Governance Boards would engage business people in the company to  embrace the stipulated policies also with the purpose of proptecting information.

8 0
3 years ago
If we have the following array/list:
oee [108]

Answer:

The correct answer is A) "red"

Explanation:

Using arrays and lists are very helpful when writing programs. They help simplify programs by storing <u>related data</u> under one name.

In the question above the general name is <u>myList</u>. <em>The related data are red, orange, yellow, green, blue, indigo, and violet.</em>

This means that myList contains values a,b,c,d,e,f, and g. However myList[1] only contains value "red".

Cheers!

4 0
3 years ago
Read 2 more answers
If you increase the distance between two magnets, what will happen?
zheka24 [161]
The Magnetic attraction will decrease
6 0
3 years ago
Read 2 more answers
Define a character variable letterStart. Read the character from the user, print that letter and the next letter in the alphabet
lesantik [10]

Answer:

  1. declare variable
  2. get input
  3. display variable and also increment ASCII of variable and th en display it

Explanation:

  • In above code first we declare a character variable by (var).
  • Then we get a character input from user in (var).
  • Then display character input and at the same time we also display next character by incrementing the ASCII of character input by 1.
3 0
3 years ago
Other questions:
  • Consider the following general code for allowing access to a resource:
    13·1 answer
  • If you are working in a word-processing program and need to learn more about its features, the best place to get assistance is f
    7·2 answers
  • The array s of ints contain integers each of which is between 1 and 1000 (inclusive). write code that stores in the variable ord
    9·1 answer
  • Write a definition of the function printDottedLine, which has no parameters and doesn't return anything. The function prints to
    14·1 answer
  • What is a new ransomware program that encrypts your personal files and demands payment for the files' decryption keys? Multiple
    10·1 answer
  • Write a C# solution for the following problem. Submit your .cs file to this link. Sample output(s) attached. == Create an Employ
    5·1 answer
  • Study the images of two different fronts.
    7·2 answers
  • Premise: Tracy has a file that contains a list of actors and the movies in which they acted. She wants to know the top 3 ranked
    8·1 answer
  • Implemente a função ao lado, que recebe um preço e um booleano indicando se já está com desconto ou não. Se o preço for maior qu
    8·1 answer
  • you want to implement a protocol on your network that allows computers to find the ip address of a host from a logical name. whi
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!