How To Exam?

a knowledge trading engine...


Jaypee Institute of Information Technology (JIIT) 2007 B.Tech Computer Science and Engineering object oriented programming - exam paper

Tuesday, 02 April 2013 12:55Web

TEST-1




1. Create a class called Complex for performing arithmetic with complex numbers. Use double variables to represent the private data of the class. give public member functions for every of the following: (Define all the member functions outside the class)

a) Enter the values of real and imaginary part.
b) Addition of 2 Complex numbers: (The real parts are added together and the imaginary parts are added together.
c) Subtraction of 2 Complex numbers. (The real part of the right operand is subtracted from the real part of the left operand and the imaginary part of the right operand is subtracted from the imaginary part of the left operand.
d) Printing Complex numbers in the form: a + b i

2. Define a class to represent a bank account. Include the subsequent members:

Data members:
a) Name of the depositor
b) Account number
c) Type of account
d) Balance amount in the account

Member functions: (Define all the member functions inside the class)
a) To assign initial values
b) To deposit an amount
c) To withdraw an amount after checking the balance
d) To display name and balance

Write a main function to create a database of 10 customers.





( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Jaypee Institute of Information Technology (JIIT) 2007 B.Tech Computer Science and Engineering object oriented programming - exam paper