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
I know this isn't a school question but it is important! how do I get out of hp hardware diagnostics UEFI on hp pc? (step by ste
Debora [2.8K]

Answer:

1. Turn off the computer and wait five seconds.

2. Press the Power button to start the computer and repeatedly press the F10 key to enter the BIOS setup menu.

3. On the BIOS Setup screen, press F9 to select and load the BIOS Setup Default settings.

4. Press F10 to Save and Exit.

5. Use the arrow keys to select Yes, then press Enter when asked Exit Saving Changes?

6. Follow the prompts to restart your computer.

After you have get to the operating system,

1. Press CTRL + Alt + Del on the blank screen.

2. Click on Task Manager

3. Click "File" - "Run a new task" If there is no "file" option, please click on the task manager under the "details"

4. In the pop-up window, enter "msconfig" click "OK"

5. In the system configuration window that appears, click "Service" and uncheck "App Readiness".

6. Click "Apply" --- "OK"

7. In the following window appears to click on the "restart"

6 0
3 years ago
You trained a binary classifier model which gives very high accuracy on thetraining data, but much lower accuracy on validation
kompoz [17]

Answer:

a. This is an instance of overfitting.

Explanation:

In data modeling and machine learning practice, data modeling begins with model training whereby the training data is used to train and fit a prediction model. When a trained model performs well on training data and has low accuracy on the test data, then we say say the model is overfitting. This means that the model is memorizing rather Than learning and hence, model fits the data too well, hence, making the model unable to perform well on the test or validation set. A model which underfits will fail to perform well on both the training and validation set.

4 0
3 years ago
What is objective reporting?
stira [4]
Objective reporting is reporting that separates facts and opinion.
7 0
3 years ago
What is the fundamental goal of outsourcing? increased quality brand expansion cultural diversity cost savings
galben [10]

Answer:

Cost saving is the fundamental goal of outsourcing.

Explanation:

Initially the companies where outsourcing task only for Cost cutting. But nowadays, the companies do that for so many other reasons like, increase the efficiency, reducing overhead, to concentrate on core business peacefully, to obtain more profit, etc.  

The cultural diversity does not affect or make companies to outsource.

We can indirectly increase the quality but it is not the primary goal of outsourcing.  

Brand expansion will holds good, only the BPO is run under the name of the company. But this is once again not the major objective.

7 0
3 years ago
A user saves a password on a website the user logs into from a desktop. Under which circumstances will the password be saved on
Morgarella [4.7K]

Answer:

Same browser

Explanation:

3 0
3 years ago
Other questions:
  • I need a idea of a origami for my coding class and it needs to be easy to make
    15·2 answers
  • Pick the correct statements regarding cell references.
    8·2 answers
  • Using a personal computer to produce high quality printed documents
    8·1 answer
  • In this activity, you'll decide how a computer (in this case, a smartphone)
    12·1 answer
  • What is Napoleon's friend's full name? From the Napoleon Dynamite movie.
    9·2 answers
  • Software enables users to create documents
    13·1 answer
  • 2.3.4 CodeHS HTML Word Definitions
    10·1 answer
  • Identify and explain 3 methods of automatically formatting documents​
    8·1 answer
  • Which of the following was most likely used to apply red background and font to some of the cells in column D?
    10·1 answer
  • In this lesson, you learned how to create reports and how to display them in a Web application. You will use the same chinook da
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!