Basic program using concept of class, object using C++.
Preparing for C++ exam and facing doubt in writing a program? Wondering about how to write a basic program using class and objects? Scroll through this page for solutions from our ISC experts.
This question is asked for 10 marks and hence requires some explanation. Please let me know the solution.
Q) Define class and object. Write a class containing two data items length and breadth and three functions getdata(), displaydata() and area(). Write a main program which declare the object and uses the member functions of the class. [10 Marks]