Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C ++ my code is not working and I don't know what im doing wrong I have supplied my codes for each file above, my

image text in transcribedimage text in transcribedimage text in transcribed

image text in transcribed

C ++ my code is not working and I don't know what im doing wrong I have supplied my codes for each file above, my problem is with the cylinderTypeImp.cpp

The problem is : define 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. Assume the value of \pi to be 3.14159.

WN 13 14 16 17 18 cylinderTypeImp.cpp 1 #include 2 #include "cylinderType.h" 3 4 using namespace std; 5 6 void cylinderType: :print() 7 { 8 cout = 0) height = h; else height = 0; 19 } 20 21 double cylinderType::getHeight(); 22 1 23 return h; 24 } 25 26 double cylinderType:: area (double); 27 1 28 return (2 * 3.1416 * radius * radius) + (height * (2 * 3.1416 * radius)); 29 } 3e 31 32 33 } 34 35 return; 36 37 m0009 circleTypeImp.cpp 3 #include #include "circleType.h" 5 6 using namespace std; 7 8 void circleType: :print() 9 cout 2 #include "cylinderType.h" 3 using namespace std; 4 5 int main() 6 { 7 circleType cir(8); 8 cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

10th Edition

0137916787, 978-0137916788

More Books

Students also viewed these Databases questions

Question

=+Who are you right now, and where do you want to be?

Answered: 1 week ago

Question

=+ Are they breakable for any reason?

Answered: 1 week ago

Question

=+When and under what circumstances are contracts renegotiated?

Answered: 1 week ago