How To Exam?

a knowledge trading engine...


Visvesvaraya Technological University (VTU) 2007 M.C.A c++, Java, HTML,soft. Engg., Graph theory, As/400, c++ lab - Question Paper

Thursday, 13 June 2013 11:30Web


1. Given that an EMPLOYEE class contains subsequent members:
Data members: Employee_Number, Employee_Name, Basic, DA, IT, Net_Sal
Member Functions: to learn the data, to compute Net_Sal and to print data members.
Write a C++ program to learn the data of N employees and calculate Net_Sal of every employee
(DA= 52% of Basic and Income Tax(IT)=30% of the gross salary).

2. Define a learner class with USN, Name and Marks in three tests of subject. Declare an array of 10 learner objects. Using improper functions, obtain the avg. of 2 better marks for every learner. Print the USN, Name and avg. marks of all the students.

3. Write a C++ program to create a class called COMPLEX and implement the subsequent overloading functions ADD that return a COMPLEX number.
i. ADD(a, s2)- where a is an integer (real part) and s2 is a complex number.
ii. ADD(s1, s2)- where s1 and s2 are complex numbers.

4. Write a C++ program to create a class called LIST (linked list) with member functions to insert an element at the front as well as to delete an element from the front of the list. Demonstrate all the function after creating a list object.

5. Write a C++ program to create a template function for Quick Sort and demonstrate sorting of integers and doubles.


6. Write a C++ program to create a class called STACK using an array of integers. Implement the subsequent operations by overloading the operators + and –
i. s1= s1+element; where s1 is an object of class STACK and element is an integer to be pushed on the top of the stack.
ii. S1=s1- element; where s1 is an object of the class STACK. – operator pops the element.
Handle the STACK empty and STACK overflow conditions. Also display the contents of the stack after every operation, by overloading the operator <<.

7. Write a C++ program to create a class called DATE. Accept 2 valid dates in the form dd/mm/yy. Implement the subsequent operations by overloading the operators + and -. After every operation display the outcomes by overloading the operator <<.
i. no_of_days=d1-d2; where d1 and d2 are DATE objects.d1>=d2 and no_of_days is an integer.
ii. d2=d1-no_of_days; where d1 is a DATE object and no_of_days is an integer.

8. Write a C++ program to create a class called MATRIX using a two- dimensional array of integers. Implement the subsequent operations by overloading the operator== which checks the compatibility of 2 matrices to be added and subtracted. Perform the addition and subtraction by overloading the operators + and – respectively. Display the outcomes by overloading the operator<<.
if(m1==m2) {
m3=m1-m2;
m4=m1+m2;
}
else display fault

9. Write a C++ program to create a class called OCTAL which has the characteristics of an octal number. Implement the subsequent operations by writing an improper constructor and an overloaded operator+.
i. OCTAL h=x; where x is an integer.
ii. int y=h+k; where h is an OCTAL object and k is an integer.
Display the OCTAL outcomes by overloading the operators <<. Also display the values of h and y.

10. Write a C++ program to create a class called QUEUE with member functions to add an element and to delete an element from the queue Using these member functions, implement a queue of integer and double. Demonstrate the operations by displaying the content of the queue after every operation.

11. Write a C++ program to create a class called DLIST(Doubly Linked List) with member functions to insert a node at a specified position and delete a node from a specified position and delete a node from a specified position of the list. Demonstrate the operations by displaying the contents of the list after every operation.


12. Write a C++ program to create a class called learner with data members USN, Name and Age. Using inheritance, create the classes UGSTUDENT and PGSTUDENT having fields a Semester, Fees and Stipend. Enter the data for at lowest five students. obtain the semester wise avg. age for all UG and PG students separately.

13. Write a C++ program to create a class called STRING and implement the subsequent operations. Display the outcomes after every operation by overloading the operator<<.
i) STRING s1=”VTU”
ii) STRING s2=”BELGAUM”
iii) STRING s3=S1+S2;(Use copy constructor).

14. Write a C++ program to create a class called BIN_TREE(Binary tree) with member functions to perform inorder, preorder and postorder traversal. Create a BIN_TREE object and demonstrate the traversals.

15. Write a C++ program to create a class called EXPRESSION. Using improper member functions convert a provided valid Infix expression into Postfix form. Display the Infix and Postfix expressions.







( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Visvesvaraya Technological University (VTU) 2007 M.C.A c++, Java, HTML,soft. Engg., Graph theory, As/400, c++ lab - Question Paper