Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

choose the correct statement that prints the values of x and y for object c1 a. cout

choose the correct statement that prints the values of x and y for object c1

a.

 cout<getX()<<","<getY();

b.

 cout<getX()<<","<getY();

c.

 cout<

d.

 cout<

class Point{

    int x;

    int y;


    public:

    Point (int x, int y){

        this->x=x;

        this->y=y;

    }

    void setX(int a){x=a;}

    void setY(int a){y=a;}

    int getX(){return x;}

    int getY(){return y;}

};//End of class Student


class Circle{

    int d;

    Point *center;


public:

    Circle(int d, int x, int y){

        this->d=d;

        center=new Point (x,y);

        }

    void setPoint(int x, int y){

        center->setX(x);

        center->setY(y);

    }

    Point *getPoint(){return center;}

    

};



int main() {

    // insert code here...

    Circle c1(30, 4,5);

}


Step by Step Solution

3.41 Rating (148 Votes )

There are 3 Steps involved in it

Step: 1

include using namespace std class Point int x int y public ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probability And Statistical Inference

Authors: Robert V. Hogg, Elliot Tanis, Dale Zimmerman

9th Edition

321923278, 978-0321923271

More Books

Students also viewed these Programming questions

Question

What are human-interface objects? Give some examples.

Answered: 1 week ago

Question

5.1 Describe how culture influences self-concepts.

Answered: 1 week ago