Chapter 10 defined the class circleType to implement the basic properties of a circle. (Add the function print to this class to output the radius,

Answered step by step
Verified Expert Solution
Question
78 users unlocked this solution today!

image text in transcribedChapter 10 defined the class circleType to implement the basic properties of a circle. (Add the function print to this class to output the radius, area, and circumference of a circle.) Now every cylinder has a base and height, where the base is a circle. Design a class cylinderType that can capture the properties of a cylinder and perform the usual operations on the cylinder. Derive this class from the class circleType designed in Chapter 10. Some of the operations that can be performed on a cylinder are as follows: calculate and print the volume, calculate and print the surface area, set the height, set the radius of the base, and set the center of the base. Also, write a program to test various operations on a cylinder.

Programming Exercise 11-3 Instructions Instructions circleType.h circleTypelmp.cpp cylinderType.h cylinderTypelmp.cppmain.cpp enu 3 #define circleType_A 4 #include iostream 5 #include 6 #include main.cpp: 10:5: erron s not declared in this scope cir' wa Chapter 10 defined the class circleType to implement the basic properties of a circle. (Add the function print to this class to output the radius, area, and circumference of a circle.) Now every cylinder has a base and height, where the base is a circle. Design a class cylinderType that can capture the properties of a cylinder and perform the usual operations on the cylinder. Derive this class from the class circleType designed in Chapter 10. Some of the operations that can be performed on a cylinder are as follows: calculate and print the volume, calculate and print the surface area, set the height, set the radius of the base, and set the center of the base. Also, write a program to test various operations on a cylinder print() > 7 #include "circleType.h" 8 using namespace std; 10 class circleType 12 public: main.cpp: 10:5: note: suggested A-T alternative: char cir.print() void print char main.cpp: 12:5: error rType' was not declared in thi s scope 14 15 void setRadius (double r); 16 17 18 19 0 double getRadius) 21 cylinde //Function to set the radius //Postcondition: if (r) radius-r cylinderTyp otherwise radus ; cyl (4, 9, 3. 5, 6.2); //Function to return the radius. //Postcondition: The value of radius is returned main.cpp:15:5: erron s not declared in this scope cyl' wa 23 24 double area) 25 26 27 28 double circumference) 29 cyl. print() //Function to return the area of a circle //Postcondition: Area is calculated and returned bash: line 2: /a.out: Grading file ort ory //Function to return the circumference of a circle

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Link Copied!

Step: 1

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

100% Satisfaction Guaranteed-or Get a Refund!

Step: 2Unlock detailed examples and clear explanations to master concepts

blur-text-image_2

Step: 3Unlock to practice, ask and learn with real-world examples

blur-text-image_3

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

  • tick Icon Access 30 Million+ textbook solutions.
  • tick Icon Ask unlimited questions from AI Tutors.
  • tick Icon Order free textbooks.
  • tick Icon 100% Satisfaction Guaranteed-or Get a Refund!

Claim Your Hoodie Now!

Recommended Textbook for

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books
flashcard-anime

Study Smart with AI Flashcards

Access a vast library of flashcards, create your own, and experience a game-changing transformation in how you learn and retain knowledge

Explore Flashcards

Students Have Also Explored These Related Databases Questions!