Upload
govind-upadhyay
View
266
Download
1
Embed Size (px)
Citation preview
7/29/2019 BCA 253 Program List-1
1/3
Institute of Information Technology and Management, New Delhi
(Affiliated to GGSIP University)
List of Practical forOOPS using C++
BCA 253 Sem: III
S. NO. Implement in C
1 Write a Program To enter ten no. Count total Even & Odd Numbers &then
perform the sum of even &odd no separately.
2 Write a Program to Print Fibonacci Series.
3 Multiplication of two number without using *
4 Multiplication table of any number
5 Reverse of a number
6 Reverse of a string without using string operations
Implement in C ++
C++ Programming Basics7 Accept three numbers, find their sum, average and grade
8 Program to identify if an input is a symbol, digit or character
9 WAP to perform the Arithmetic operation & use the concept of typecasting.
Loops and Decisions
10 Write a Program to enter a number &check whether its a prime no. or not.
11 WAP To Create a menu driven program that will include the following options:
i)Eligiblity Criteria for Votingii)Enter ten no,. & Count no. of even & odd.
iii)exit
12 WAP To Print this Pattern:
1
2 34 5 6
7 8 9 10
13 WAP to find whether a Year is a leap or Not using logical OR && logical and.
14 WAP to accept a digit & display it in word using switch-case.
Structures15 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.
16 Create a structure of type distance, take two variables of type distance. Add their
values and assign to third variable and print
7/29/2019 BCA 253 Program List-1
2/3
Functions
17 WAP to print a character given number of times using function rep_char(char,int)
18 WAP to create a function init() having following parameters id,name,course.Passparameters to this function through user & if user does not give parameters provide
default value to id as 1 & name as abc.19 WAP to create Inline function to find greatest of two no..
20 WAP to sum the digit of a no. using recursion.
Objects & Classes
21 Design a class distance with two private data members to store the distance ininches & feet.
22 Design and implement the class account which contain the private member to storeacc_no & bal_amt & show default constructor & use concept of destructor.
23 WAP to define a class operation& perform the following :-Accept the two numbersfrom user. Calculate sum of two numbers using nesting of member function sum
in to another member function display.24 WAP to create class student having two private data members ROLL_NO &
Name.Create 5 objects of this class dynamically & initialize them at creation
25 WAP to create 2 class HUSBAND & WIFE with two private data members
name,salary & show parametrized constuctor,display & calculate total salary.
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.
27 WAP to create a class matrix ,input number of rows and columns at runtime using
constructor & perform input &display operation on that matrix.
Operator Overloading
28 WAP to subtact 2 complex number using Operator Overloading.
29 WAP to overload comparison operator (>) to compare objects of distance class
with feet & inch.
30 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 classeshave methods to calculate total cost of doors/window.
32 WAP to create multiple product company database using multiple inheritance
33 WAP to create base class player having fields
name,type_of_sport,experience.Derive two subclasses zone & national having
7/29/2019 BCA 253 Program List-1
3/3
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.
34 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 multilevelinheritance
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.
36 Create a base class Shape & derive classes circle,square & triangle.In base class
write a virtual function draw & override it in derived class.
Streams & Files
37 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.38
Templates & Exceptions
39 WAP to swap two numbers using Template.
40 WAP to create a Template Class to implement integer, char, float, stack & perform
following operation:-Push & Pop. Use exception.