Practice Programs of Lab

Program- 1

Write an application that defines a circle class with 2 constructors-the first form expects a double value that represents the radius of a circle, this constructor assumes that circle is centered at the origin. The second form accepts 3 double values, the first 2 arguments define the coordinates of the center and 3rd argument defines the radius. Also declare one member function, which calculates an area of the circle.

Program 2

Create a program that defines a cube class with a constructor which accepts a double value that represent The length of edge of a cube and It will calculate the surface area and volume of that cube using the methods CubeArea and CubeVolume. Also make a display method which will display all the values related to that cube.



Was that helpful? Let me know if it is.

Comments

YouTube

Popular posts from this blog

GTU PPS Program - 15

Vim Text Editor

GTU PPS Program - 11