H class point int xy public void getxyint aint b xa

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: lic: void getxy(int a,int b) { x=a; y=b; } }; class circle: public point{ int radius; public: void getradius(int r) { radius=r; } void area(){ int area; area=3.142*radius*radius; cout<<"Area of circle is "<<area; } }; void main(){ circle c; c.getxy(3,5); c.getradius(5); c.area(); getch(); } Assignment #2 Assignment What are the practical issues in What Inheritance.? (Hints: Diamond Problem etc) Problem Submission: Next Week...
View Full Document

This document was uploaded on 03/16/2014.

Ask a homework question - tutors are online