You are on page 1of 3

Institute of Information Technology and Management, New Delhi (Affiliated to GGSIP University) List of Practical for OOPS using

C++ BCA 253 Sem: III

S. NO.
1 2 3 4 5 6

Implement in C
Write a Program To enter ten no. Count total Even & Odd Numbers &then perform the sum of even &odd no separately. Write a Program to Print Fibonacci Series. Multiplication of two number without using * Multiplication table of any number Reverse of a number Reverse of a string without using string operations

Implement in C ++
7 8 9 C++ Programming Basics Accept three numbers, find their sum, average and grade Program to identify if an input is a symbol, digit or character WAP to perform the Arithmetic operation & use the concept of typecasting.

Loops and Decisions


10 11 Write a Program to enter a number &check whether its a prime no. or not. WAP To Create a menu driven program that will include the following options: i)Eligiblity Criteria for Voting ii)Enter ten no,. & Count no. of even & odd. iii)exit WAP To Print this Pattern: 1 23 456 7 8 9 10 WAP to find whether a Year is a leap or Not using logical OR && logical and. WAP to accept a digit & display it in word using switch-case.

12

13 14

Structures
15 Write a Program to construct a structure called employee that contains two members,employee number of type integer &employee compensation of type float .Now ask the user to fill this data for three employees,store it in three variable of typed employee & then display the information for each employee. Create a structure of type distance, take two variables of type distance. Add their values and assign to third variable and print

16

Functions
17 18 WAP to print a character given number of times using function rep_char(char,int) WAP to create a function init() having following parameters id,name,course.Pass parameters to this function through user & if user does not give parameters provide default value to id as 1 & name as abc. WAP to create Inline function to find greatest of two no.. WAP to sum the digit of a no. using recursion.

19 20

Objects & Classes


21 22 23 Design a class distance with two private data members to store the distance in inches & feet. Design and implement the class account which contain the private member to store acc_no & bal_amt & show default constructor & use concept of destructor. WAP to define a class operation& perform the following :-Accept the two numbers from user. Calculate sum of two numbers using nesting of member function sum in to another member function display. WAP to create class student having two private data members ROLL_NO & Name.Create 5 objects of this class dynamically & initialize them at creation WAP to create 2 class HUSBAND & WIFE with two private data members name,salary & show parametrized constuctor,display & calculate total salary.

24 25

Arrays & Strings


26 WAP to create an array dnamically taking the size of array from the user at runtime.Perform input & Display operation on that array &delete the array element at end with the help of delete operator. WAP to create a class matrix ,input number of rows and columns at runtime using constructor & perform input &display operation on that matrix.

27

Operator Overloading
28 29 30 WAP to subtact 2 complex number using Operator Overloading. WAP to overload comparison operator (>) to compare objects of distance class with feet & inch. WAP to overload == to compare 2 string objects.

Inheritance
31 WAP to create base class house which has following member functios: i)constructor to initialise length & breadth of house. ii)funtion dimension to input dimension of house. iii)function get_door() to input number of doors in house. iv) function get_wind() to input number of windows in house. Derive two subclasses door & windows from the class house .two derived classes have methods to calculate total cost of doors/window. WAP to create multiple product company database using multiple inheritance WAP to create base class player having fields name,type_of_sport,experience.Derive two subclasses zone & national having

32 33

34

members for rank.From these two subclasses zone & national ,derive another class called international,which calculate the final rank of player by adding ranks in two classes zone & national &apply condition on them. WAP to create a base class student having data members: a)roll_no b)name c) course.Derive a subclass test having data members to input marks of 3 subjects,derive another subclass result having data members & member function to calculate total marks.Provide functions get_data() & put_data() in each class to input values & display them using multilevel inheritance

Virtual Function
35 WAP to create two classes Dimension &Shape having required data members & member functions. Make shape class as friend of dimension class so that it can access its private data member for fetching Dimensions, & then calculate area of particular shape through member function of shape class. Create a base class Shape & derive classes circle,square & triangle.In base class write a virtual function draw & override it in derived class.

36

Streams & Files


37 38 WAP to enter name & marks from keyboard & display the contents of file. WAP to read the student details from one file & write them to another file.

Templates & Exceptions


39 40 WAP to swap two numbers using Template. WAP to create a Template Class to implement integer, char, float, stack & perform following operation:-Push & Pop. Use exception.

You might also like