Computer Science, asked by sababashir244, 10 months ago

Write a class declaration for a class named Circle, which has the data member radius, a double, and member functions setRadius and getArea. Write the code for these as inline functions?

Answers

Answered by Anonymous
1

Answer:

The mechanism that allows you to combine data and the function in a single unit is called a class. Once a class is defined, you can declare variables of that type. A class variable is called object or instance. In other words, a class would be the data type, and an object would be the variable. Classes are generally declared using the keyword class, with the following format:

class class_name

{

private:

members1;

protected:

members2;

public:

members3;

};

Similar questions