BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Right Header

HOME BZU Mail Box Online Games Radio and TV Cricket All Albums
Go Back   BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan > Institute of Computing > Bachelor of Science in Information Technology > BsIT 3rd Semester > Object Oriented Programming

Object Oriented Programming By Mam Sidra Malik


Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 5 votes, 2.80 average. Display Modes
  #1  
Old 13-11-2008, 01:09 AM
BSIT07-01's Avatar
Addicted to Computer


 
Join Date: Sep 2007
Location: ------------
Age: 34
Posts: 1,309
Contact Number: ---------------
Program / Discipline: BSIT
Class Roll Number: 07-01
BSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant futureBSIT07-01 has a brilliant future
Default [Assignment] Solution Q no 1 ch#9 Object Oriented Programming in c++ by Robert Lafore

Just copied from book
Code:
#include <iostream>
#include <string>
using namespace std;

   
   
class publication           
   {
   private:
    string title;
    float price;
      public:
    void getdata()
    {
    cout << "\nEnter title: "; cin >> title;
    cout << "Enter price: "; cin >> price;
    }
    void putdata() const
    {
    cout << "\nTitle: " << title;
    cout << "\nPrice: " << price;
    }
      };
 
   
   
   
   class book : private publication      
      {
      private:
    int pages;
      public:
    void getdata()
    {
    publication::getdata();
    cout << "Enter number of pages: "; cin >> pages;
    }
    void putdata() const
    {
    publication::putdata();
    cout << "\nPages: " << pages;
    }
      };

   
   
   
   
   class tape : private publication      
      {
      private:
    float time;
      public:
    void getdata()
    {
    publication::getdata();
    cout << "Enter playing time: "; cin >> time;
    }
    void putdata() const
    {
    publication::putdata();
    cout << "\nPlaying time: " << time;
    }
      };
   ////////////////////////////////////////////////////////////////
   int main()
      {
      book book1;             
      tape tape1;
   
      book1.getdata();        
      tape1.getdata();
   
      book1.putdata();         
      tape1.putdata();
      cout << endl;
      return 0;
      }

Reply With Quote
  #2  
Old 15-03-2011, 08:09 PM
talha111's Avatar
First Time Poster!

 
Join Date: Sep 2010
Posts: 1
Program / Discipline: Engineering
Class Roll Number: 39
talha111 is on a distinguished road
Default Re: [Assignment] Solution Q no 1 ch#9 Object Oriented Programming in c++ by Robert Lafore

do u have the solution manual for robert lafore and deitel n deitel......
Reply With Quote
Reply

Tags
assignment, ch#9, lafore, object, oriented, programming, robert, solution


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Book] Object-Oriented Programming in C++, 3rd Edition BSIT07-01 Object Oriented Programming 1 16-03-2011 06:52 PM
[Assignment] Q no 5 ch#9 Object Oriented Programming in c++ by Robert Lafore BSIT07-01 Object Oriented Programming 0 13-11-2008 01:02 AM
About Object Oriented programming full notes usman_akhtar Object Oriented Programming 1 21-10-2008 10:08 PM
Mid Term Paper Object Oriented Programming BIT07 3rd Semester .BZU. Object Oriented Programming 0 14-10-2008 12:06 PM
Solution of Ex 5,6,2 & 4 Ch# 5 Robert Lafore OOP c++ BSIT07-01 Object Oriented Programming 3 17-09-2008 07:32 PM

Best view in Firefox
Almuslimeen.info | BZU Multan | Dedicated server hosting
Note: All trademarks and copyrights held by respective owners. We will take action against any copyright violation if it is proved to us.

All times are GMT +5. The time now is 08:08 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.