Sunday, December 5, 2010
Thursday, October 21, 2010
Compare two string. use operator overloading(External questn-2009)
Write a program to compare two string using operator overloading. Dont use any buildin functions.
Saturday, July 3, 2010
Difference between two dates
23.Difference b/w two dates
Thursday, May 20, 2010
Generic programming
22. Using generic programming concept, write function template for finding the minimum value in an array using bubble sort.
File manipulation
21. Write a program will create a data file containing list of telephone numbers and implement the following task.
a) Determine the telephone no of the specified person.
b) Determine the name if a telephone no is known.
c) Update the name and telephone no whenever there is change.
a) Determine the telephone no of the specified person.
b) Determine the name if a telephone no is known.
c) Update the name and telephone no whenever there is change.
Pure Virtual Function
20. Implement the base class polygon and derive triangle, rectangle and square classes from it. Implement functions to compute area and perimeter of the polygon. Use the concept of pure virtual functions.
Virtual Function
19. Create a base class called student. Use the class to store the name, dob, rollno and includes member functions getdata(), displayresult(). Derive two class pg and ug from student. Make dispalyresult() as virtual function and redefine this function in the derived class to suite the requirements.
Multipath Inheritance
18. Define a multipath inheritance structure in which the class master deserves information from both account and admin classes which in turn derive information from the class person. Define all four classes and write a program to create, update, and display the information contained in master objects.
Hybrid Inheritance
17. Define a hybrid inheritance structures which will print the result as a cumulative score from test and sports. Each class should have its own constructors.
Wednesday, May 19, 2010
Hierarchical inheritance
16. An educational system maintains a database of employees. The database is divided into a number of classes which defines a hierarchical inheritance structure. Specify all the classes and define functions to create the database and retrieve individual information required for each class.
Addition of two distances using friend function
15. Create two classes MC and FI which stores values of distances. MC stores distance in meter and cm and FI stores in feet and inches. Write a program that reads and output the values of object of each class and use a friend function to carry out the addition of two distances and produce the result in FI type.
Class to class conversion
14. Polar cordiantes are represented in angle and radius format while rectangular co-ordinates as(x,y). Define a class for both and write member functions to convert from polar to rectangular cordinates.
Basic to class and class to basic conversion
13. A class representing distance measured in the unit of feet and inches. Write a program to do the conversion from meters to object of class type and object of class type to meters.
Operator functions as friend functions
12. In a class distance is measured in feet and inches unit. Use operator overloading, + operator for adding two distances and < operator for comparing two distances(implement operator functions as friend functions).
Monday, May 17, 2010
Function overloading.
11. Write a program to find the area of different shaped polygons like triangle, rectangle, square and circle using function overloading.
Static & Constant function
10. Write a static member function for finding the average of a set of numbers. Use a constant function to display the value of average found.
Subscribe to:
Posts (Atom)