You are on page 1of 3

LAB PLAN Sub code:CS2209-OBJECT ORIENTED PROGRAMMING LAB Branc : CSE Ob*ec#%$e: Se!

e"#er :III

LP-CS2209 Re$%"%on No: 00 Da#e:29-0&-2009 Pa'e 0( o) 02

To learn the concepts of Object oriented programming and to write programs using C++, Se""%on No 1 E-erc%"e No 1 E-erc%"e" a) Income Tax Calculation using default arguments. b) Categorizing Emplo ees using static members c) !ddition of two pri"ate members using friend function /r%end )unc#%on and /r%end C.a"" % %
&esign matrix and "ector classes with static allocation' and a friend function to do matrix("ector multiplication

T%!e A..oca#%on 1#$m

1#$m

O0era#or o$er.oad%n' ) )
Implement complex number class with necessar operator o"erloadings and t pe con"ersions such as integer to complex' double to complex' complex to double etc.

1#$m

D1na!%c !e!or1 a..oca#%on 2 Con"#ruc#or" *'# *


a)Implement +atrix class with d namic memor allocation and necessar methods. ,i"e proper constructor' destructor' cop constructor' and o"erloading of assignment operator. b) O"erload the new and delete operators to pro"ide custom d namic allocation of memor . Te!0.a#e a) &e"elop a template of lin0ed(list class and its methods. b) &e"elop templates of standard sorting algorithms such as bubble sort and merge sort. c) &e"elop templates of standard sorting algorithms such as insertion sort and 1uic0 sort. E-ce0#%on and.%n' a) &esign stac0 classes with necessar exception handling. b) &esign 1ueue classes with necessar exception handling.

1#$m

1#$m

-'.'/

2'1$

1#$m

LAB PLAN Sub code:CS2209-OBJECT ORIENTEDPROGRAMMING LAB Branc : CSE Se!e"#er :III

LP-CS2209 Re$%"%on No: 00 Da#e:29-0&-2009 Pa'e 02 o) 02

Se""%on No

E-erc%"e No In er%#ance

E-erc%"e"
&efine 3oint class and an !rc class. &efine a ,raph class' which represents graph as a collection of 3oint objects and !rc objects. 4rite a method to find a minimum cost spanning tree in a graph. D1na!%c 0o.1!or0 %"! and RTTI &e"elop with suitable hierarch ' classes for 3oint' 5hape' 6ectangle' 51uare' Circle' Ellipse' Triangle' 3ol gon' etc. &esign a simple test application to demonstrate d namic pol morphism and 6TTI.

T%!e A..oca#%on 1#$m

11

1#$m

1%

/%.e"
4rite a C77 program that randoml generates complex numbers 8use pre"iousl designed Complex class) and writes them two per line in a file along with an operator 87' (' 9' or :). The numbers are written to file in the format 8a 7 ib). 4rite 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 8one per line).

1#$m

1)

1*

Mode. E-a!%na#%on

1#$m

Pre0ared b1 S%'na#ure M",S,Ja1an# %3 Sen%or Lec#urer M",A,Ga1a# r%3 Lec#urer M",G,Pa$a%3 Lec#urer M",M,S,Roo0a4a.a3 Lec#urer 29-0&-2009

A00ro$ed b1

Na!e

Dr, S5SAN ELIAS 6OD-CSE

Da#e

29-0&-2009

You might also like