(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.
- Year: 2018
- Subject: Object Oriented Programming Using C++
Related pages
More PYQs on Constructor and Destructor Functions
- (a) Create a class time that has separate int member data for hour, minutes and seconds. One constructor should initialize this data to 0 and another should in…
- (a) What is a copy constructor ? What are the advantages of a copy constructor ? Give examples. (b) Write a class employee with two functions get data and put…