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
Consider an application that transmits data at a steady rate (for example, the sender generates an N-bit unit of data every k ti
grin007 [14]

Answer:

a; circuit-switched network.

b; No, it does not need congestion control.

Explanation:

For A;

A circuit-switched network is a better option for this application. This is because of the fact that the application is made up of long sessions with smooth data transfer capacity needs.

The transmission rate is known, and does not transmit in short intervals(short signals), every application session can have a bandwidth reserved without significant bandwidth wastage.

Also, the overhead expenses of setting up and tearing down connections are canceled out over the extensive period of running an application session.

For B;

If the packet-switched network is used, and traffic in the network comes from the said application. Even if every applications transmit one or more network connections. Still, we already know that every connection has enough transmission capacity to handle majority of the application data rates, no congestion(insignificant queuing) will happen.

This goes to say that no congestion control will be needed given such broad-based connection.

7 0
3 years ago
Explains why do we use formulas instead of just using a calculator in Excel?​
Shalnov [3]
Answer: When we type the value into two different cells and then have another cell with the answer, we can then easily change the values in the cells and Excel will automatically recalculate the solution for us.

Hope this helps. :)
6 0
3 years ago
The average American has 10 devices, ask for users average number of devices. Any number between 7 and 12 will print “you have a
Juli2301 [7.4K]

This is for Python

device_num = int(input('How many devices do you have: '))

if device_num >= 7 and device_num <= 12:

   print('You have an average number of devices')

if device_num > 12:

   print("You're beyond the average range")

5 0
3 years ago
An exact-match query is:
Greeley [361]

Answer:

C. Where a record is returned if its unique identifier matches the search value

Explanation:

Exact match is a Google keyword match type that allows you show your adverts when searcher type the exact word or phrase you are bidding on. An exact match query will always return records that matches what is being searched on.

5 0
3 years ago
This device transmits data to all the workstations on a network. gateway hub router switch
marshall27 [118]
hub transmits to all workstations
Switch transmits to specific workstations
Gateway is a connection between subnets
Router locates the correct destination for packets
5 0
4 years ago
Read 2 more answers
Other questions:
  • Which computer device helps you input data in the form of text, numbers, and commands?
    9·1 answer
  • What are the links between the operating systems, the software, and hardware components in the network, firewall, and IDS that m
    7·1 answer
  • Denny often uses his word-processing program. Which of the following would Denny do to more easily access this program and incre
    14·2 answers
  • What can your employer do to protect you from overhead power lines?
    13·1 answer
  • Which of the following is NOT an e-reader you would use as an alternative to carrying around a set of textbooks?
    13·1 answer
  • Why don't I have friends?
    11·2 answers
  • Need answer ASAP!!!!!
    6·1 answer
  • Differentiate between CD-ROMS and DVD-ROMS​
    8·1 answer
  • I need help 50 points and brainiest if you answer
    10·2 answers
  • Dealing with stress and strong emotions centeral idea​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!