1
answer
1
watching
88
views
25 Sep 2020
3.(b) Create a class named Football having data member radius and weight as integer type. A member function display() is used to show the values of radius and weight. A parameterized constructor is used to initialize the values of radius and weight. If no value is given while creating an object then, initialize the value of radius to 1 and weight to 2. Now create two object ob1(10,20) and ob2 and show the values of radius and weight of the objects. Also mention the output.
3.(b) Create a class named Football having data member radius and weight as integer type. A member function display() is used to show the values of radius and weight. A parameterized constructor is used to initialize the values of radius and weight. If no value is given while creating an object then, initialize the value of radius to 1 and weight to 2. Now create two object ob1(10,20) and ob2 and show the values of radius and weight of the objects. Also mention the output.
1
answer
1
watching
88
views
For unlimited access to Homework Help, a Homework+ subscription is required.