#define PI 3.14
class Circle
{
public:
double radius;
Circle();
Circle(double);
double calculateArea(double);
double calculateCircum(double);
void display();
};
Circle::Circle()
{
radius = 0;
}
Circle::Circle(double r)
{
radius = r;
}
double Circle::calculateArea(double r)
{
return (PI*r*r);
}
double Circle::calculateCircum(double r)
{
return (2*PI*r);
}
void Circle::display()
{
cout << "Radius of the Circle is " << Circle::radius << endl;
cout << "Area of the Circle is " << calculateArea(Circle::radius) << endl;
cout << "Circumference of the Circle is " <<
calculateCircum(Circle::radius) << endl
<< endl;
}
main()
{
Circle circle1;
Circle circle2(3.5);
circle1.display();
circle2.display();
system("pause");
}
its the solution of cs201 3rd assignment
you can also called it idea solution of cs201 3rd assignment
On 5/6/11, mc100401317 Razia Sultana <mc100401317@vu.edu.pk> wrote:
> *I will thank full to her /him*
>
> --
> --
> Please visit www.vuzs.net For Current & Old Papers, Quizzes, Assignments and
> study material.
> --
> You received this message because you are subscribed to the Google
> Groups "vuZs" group.
> --
> To post a new message on this group, send email to vuZs@googlegroups.com
> --
> Message Posting Rules:
> http://groups.google.com/group/vuZs/web/vuzs-basic-rules-for-posting-messages
> --
> To unsubscribe from this group, send email to
> vuZs+unsubscribe@googlegroups.com
> --
> For more info, visit the main page of vuZs group at
> http://groups.google.com/group/vuZs
> --
> To join this group Send blank email from your virtual university email
> address to
> vuZs+subscribe@googlegroups.com
> or visit
> http://groups.google.com/group/vuZs/subscribe?hl=en
>
--
--
Please visit www.vuzs.net For Current & Old Papers, Quizzes, Assignments and study material.
--
You received this message because you are subscribed to the Google
Groups "vuZs" group.
--
To post a new message on this group, send email to vuZs@googlegroups.com
--
Message Posting Rules: http://vuzs.net/faq/4795-vuzs-google-groups-basic-rules-for-posting-messages.html
--
To unsubscribe from this group, send email to vuZs+unsubscribe@googlegroups.com
--
To join this group Send blank email from your virtual university email address to
vuZs+subscribe@googlegroups.com
or visit
http://groups.google.com/group/vuZs/subscribe
---
For more information Contact vuZs Manager at info@vuzs.net
No comments:
Post a Comment