1.2 c
2.2, 2.6, 2.7, 2.10, 2.13, 2.15, 2.16.
1.2 a
Design an ADT for a cylinder. Data includes radius and height. Operations include constructor, area, volume.
ADT cylinder is
Develop a class cylinder that implements the ADT
const float PI=3.14 class cylinder { private: float radius, height; public: cylinder(float r, float h): radius(r), height(h){} float Area(void) {return 2.0*PI*radius(radius+height);} float Volume(void) {return PI*radius*radius*height;}