CS 2209 OBJECT ORIENTED PROGRAMMING LAB L T P C
(Common to CSE & IT) 0 0 3 2
1. Design C++ classes with static members, methods with default arguments, friend functions. (For example, design matrix and vector classes with static allocation, and a friend function to do matrix-vector multiplication)
2. Implement complex number class with necessary operator overloadings and type conversions such as integer to complex, double to complex, complex to double etc.
3. Implement Matrix class with dynamic memory allocation and necessary methods.
Give proper constructor, destructor, copy constructor, and overloading of assignment operator.
4. Overload the new and delete operators to provide custom dynamic allocation of memory.
5. Develop a template of linked-list class and its methods.
6. Develop templates of standard sorting algorithms such as bubble sort, insertion
sort, merge sort, and quick sort.
7. Design stack and queue classes with necessary exception handling.
8. Define Point class and an Arc class. Define a Graph class which represents
graph as a collection of Point objects and Arc objects. Write a method to find a minimum cost spanning tree in a graph.
9. Develop with suitable hierarchy, classes for Point, Shape, Rectangle, Square,
Circle, Ellipse, Triangle, Polygon, etc. Design a simple test application to demonstrate dynamic polymorphism and RTTI.
10. Write a C++ program that randomly generates complex numbers (use previously designed Complex class) and writes them two per line in a file along with an operator (+, -, *, or /). The numbers are written to file in the format (a + ib). Write another program to read one line at a time from this file, perform the corresponding operation on the two complex numbers read, and write the result to another file (one per line).
(Common to Information Technology & Computer Science Engineering) List of Equipments and software for a batch of 30 students
1. PC – 30 nos.
· Processor – 2.0 GHz or higher
· RAM – 256 MB or higher
· Hard disk – 20 GB or higher
· OS- Windows 2000/ Windows XP/ NT
2. Software – Turbo C (freeware) – to be installed in all PC’s.