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
End users have complained that when they click a link on your company's Website, the wrong client loads. You review the page wit
Ilia_Sergeevich [38]

Answer:

4. A Web server has been specified.

Explanation:

End users have complained that when they click a link on your company's Website, the wrong client loads. You review the page with the suspect link and find the following HTML code:

To begin an FTP session, click the following link:

FTP Session

The problem is that Web server has been specified.

7 0
2 years ago
Consider the steps for debugging. First, you should
SCORPION-xisa [38]

Answer:

run the code to see where the error is

Explanation:

4 0
2 years ago
Suppose that the format for license plates in a certain state is two letters followed by four numbers. (a) How many different pl
Ymorist [56]

Answer:

(a) 6,760,000 plates

(b) 3,407,040 plates

(c) 6,084,000 plates

Explanation:

The very first thing to note about this question is the number of characters involved in the license plate format (6 characters in this case; 2 letters and 4 numbers). The letters come first and then the numbers follow.

There are a total of 26 possible letters (A-Z) and 10 possible numbers (0 - 9) that can be chosen. We can then proceed to the first question;

(a) Here, the total number of possible plates is to be determined. This is done as follows:

Character 1 (Letter): There are 26 possible letters

Character 2 (Letter): There are 26 possible letters

Character 3 (number): There are 10 possible numbers

Character 4 (number): There are 10 possible numbers

Character 5 (number): There are 10 possible numbers

Character 6 (number): There are 10 possible numbers

So, total number of different plates will be obtained by multiplying all the possibilities: 26 × 26 × 10 × 10 × 10 × 10 = 6,760,000 plates

(b) This second part puts a constraint on the usage of the numbers, unlike the question (a), where there was no constraint at all.

Since there is no constraint on the letters, we can write that:

Character 1 (Letter): There are 26 possible letters

Character 2 (Letter): There are 26 possible letters

For the first number as well, we can write:

Character 3 (number): There are 10 possible numbers

However, for the remaining characters, the possibilities will continually reduce by a value of 1, since we can not use a number that has been used before. So,

Character 4 (number): There are 9 possible numbers

Character 5 (number): There are 8 possible numbers

Character 6 (number): There are 7 possible numbers

So, total number of different plates will be: 26 × 26 × 10 × 9 × 8 × 7 = 3,407,040 plates

(c) Here, repetitions are allowed as in questions (a), but there can not be four zeros. This implies that the maximum number of zeros in any plate will be three. Thus, there will be maximum possibilities on all characters until the last one which will be constrained.

Character 1 (Letter): There are 26 possible letters

Character 2 (Letter): There are 26 possible letters

Character 3 (number): There are 10 possible numbers

Character 4 (number): There are 10 possible numbers

Character 5 (number): There are 10 possible numbers

Character 6 (number): There are 9 possible numbers

Total number of plates will therefore be: 26 × 26 × 10 × 10 × 10 × 9 = 6,084,000 plates.

7 0
3 years ago
Which of the following roles is responsible for creating cloud components and the testing and validation of services?
DanielleElmas [232]

Answer:

The correct answer to the following question will be Option D (Cloud service developer).

Explanation:

  • Developers are usually individuals who layout and build applications or websites such as web or software systems. They would be known as app or web developers in this regard. In the sense that they still build and maintain things, a software developer is quite similar, however-and here's the deciding factor-this is achieved on virtual clouds.
  • It is the responsibility of the cloud service developer to design and build cloud elements and products, as well as to check and validate services.

Therefore, Option D is the right answer.

7 0
3 years ago
A film producer is having difficulty with distribution. After major and minor theaters show no interest in the film, what would
irinina [24]

Answer:

pursue internet distribution

Explanation:

4 0
2 years ago
Other questions:
  • When talking about the physical elements of the internet, the term redundancy refers to:?
    13·1 answer
  • If i'm wanting to use hydra on linux to crack a password and the issue regarding hashes occurs, what shall i do?
    12·1 answer
  • Gina works in an SDLC team. When Gina makes changes to a file, no one else is allowed to acess it. Which type of version control
    10·1 answer
  • Given an array of n distinct integers,d = [d[0], d[1],.., d[n - 1]], and an integer threshold, t, how many (a,b,c) index triplet
    11·1 answer
  • The blue bar across the top of the screen informs you of the Screen Title, or what step you are on.
    5·1 answer
  • Which is an example of an incremental approach to solving a problem?
    15·1 answer
  • During detachment, _____.
    12·2 answers
  • Write the algorithm for finding the perimeter of a rectangle using English like form step by step
    10·1 answer
  • Write a program that will remove "May" from the list using .Pop and .Index methods.(5pts) GIVEN: lst=["January", "February", "Ma
    15·1 answer
  • What kind of AR target category makes sense for a playing card with a picture on it?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!