(a) Write 'C++' class for the following : To represent two-dimensiona…

Previous year question for Object Oriented Programming Using C++.

Question

(a) Write 'C++' class for the following : To represent two-dimensional point $(x, y)$, class should contain all different constructors and methods to print point $(x, y)$ format and also to add two points by adding their $x$ and $y$ values.

(b) Write a short note on static variables and static functions. Illustrate with the help of a program.

Related pages

More PYQs on Constructor and Destructor Functions

Open on CachedInfo