1. Comsats University of Science and Technology Islamabad
LAB WORK 4
Name:
Muhammad Tahir
Roll No:
Sp11-Bcs-107
Subject:
Object Oriented Programming (Oop)
Section:
3A
Submitted To:
Mam NusratShaheen
Date:27/03/2012
2. Program No:01
#include<iostream>
#include<conio.h>
using namespace std;
class book
{
private:
int page;
float price;
string title;
public:
voidgetvalue()
{
cout<<"Enter pages"<<endl;
cin>>page;
cout<<"Enter price"<<endl;
cin>>price;
cout<<"Enter title"<<endl;
cin>>title;
}
void display()
{
cout<<"Pages are= "<<page<<endl;
cout<<"Price are="<<price<<endl;
cout<<"Title is="<<title<<endl;
}