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..
    -------------------------------------------------------------------------------------------------------

Tuesday, July 12, 2011

PDS LAB EX:1

            PDS-II             LAB 1            -  13.7.2011  



A)  Define a class to represent a bank account. Include the following members:

             Data members:

1.      Name of the depositor
2.      Account number
3.      Type of account
4.      Balance amount in the account

 Member functions
1.      To assign initial values
2.      To deposit an amount
3.      To withdraw an amount after checking the balance
4.      To display name and balance of a particular customer.
5.      To display the entire customer details.
        Write a menu driven program to perform all the above functions for atleast  5  customers.

----------------------------------------------------------------------------------------------------------------

B)    Write a program to perform arithmetic operations (+, -, *, /, or addition, subtraction, multiplication, and division----functions) on complex numbers: –using reference variables.

( hint
+: (a1 + b1j) + (a2 + b2j) = (a1 + a2) + (b1 + b2)j
-: (a1 + b1j) – (a2 + b2j) = (a1 – a2) + (b1 – b2j)
*: (a1 + b1j) * (a2 + b2j) = (a1a2 – b1b2) + (a1b2 + a2b1) j
/: (a1+b1j) / (a2 + b2j) = (a1 + b1j) * (a2 – b2j) / (a22 + b22)= [(a1a2 + b1b2) + (a2b1 – a1b2)j] / (a22 + b22)
      )
---------------------------------------------------------------------------------------------------------------
C)    Above program – pass the entire object as function argument. Increment the data members after each operation.
----------------------------------------------------------------------------------------------------------------
D)    Write a function Area to calculate the area of various shape objects (ex. Square, circle , triangle etc using Function overloading 
----------------------------------------------------------------------------------------------------------------
E)     Write a simple program to show the use of static variables and static functions.
----------------------------------------------------------------------------------------------------------------
F)     Implement the stack using push and pop operations
----------------------------------------------------------------------------------------------------------------

Sunday, July 3, 2011

THIRD SEMESTER!!!!!

This is the timetable for now.
For the rest of the week I'll update it as the timetable changes.

Wednesday, April 27, 2011

PDS III ASSES!!!



To be submitted on wednesday
DPDS Proj to be submitted by Friday