Oop CG Lab External Program List
Oop CG Lab External Program List
3 Write C++ program to draw the following pattern. Use DDA line and Bresenham‘s
circle drawing algorithm. Apply the concept of encapsulation
5 Implement a class Complex which represents the Complex Number data type.
Implement the following
1. Constructor (including a default constructor which creates the complex number
0+0i).
2. Overloaded operator+ to add two complex numbers.
3. Overloaded operator* to multiply two complex numbers.
4. Overloaded << and >> to print and read Complex Numbers.
6
7 Write a C++ program that creates an output file, writes information to it, closes the
file, open it again as an input file and read the information from the file
8 Write a function template for selection sort that inputs, sorts and outputs an integer
array and a float array
. Write a program in C++ to use map associative container. The keys will be
the names of states and the values will be the populations of the states.
9 When the program runs, the user is prompted to type the name of a state.
The program then looks in the map , using the state name as an index and
returns the population of the state.
10
11 Write a C++ program for File Handling which reads and writes the
contents of two different files and display the content of the file in output
screen.