oops lab manual

Upload: kalpanasripathi

Post on 14-Oct-2015

9 views

Category:

Documents


0 download

TRANSCRIPT

EX NO : 1 SIMPLE CLASS DESIGN AND OBJECT CREATIONDATE:

AIM:To write the C++ program to illustrate the concept of class and object in c++.

ALGORITHM:Step1: Start the programStep2: Define a class num.Step3: Define the member function read() to get the input.Step4: Define the member function max() to find the max number.Step5: Define the member function show() to display the values.Step6: Stop the program

PROGRAM:#include#includeclass num{private:int n1,n2;public:void read(){cout