Friday, July 15, 2011

PDS LAB EX:2

  1. Create 2 classes Manager and Scientist with the necessary data members (ex. Name,… and information required for income tax calculation. ). Use friend function income_tax to operate on the objects of both. Write appropriate member function to get the values and display the values.
    -------------------------------------------------------------------------------------------------------
  2. In the above program initialize the data members using constructors ( 3 types) and also dynamically initialize the objects.
    -------------------------------------------------------------------------------------------------------
  3. Write a program to perform all arithmetic operations on complex numbers. Pass the entire object as function argument. Return the object after each operation.
    -------------------------------------------------------------------------------------------------------
  4. To reserve a ticket for travel on Indian Railways.
  • Identify the classes
  • Data members and member functions required (Display (traverler details, cost etc)
  • Use all constrains in ticket reservation- calculate the cost for particular route - senior citizen constrains , children etc..
    -------------------------------------------------------------------------------------------------------

No comments:

Post a Comment