0% found this document useful (0 votes)
106 views

BCA 271 OOPS Lab Practical List

This document contains 10 topics related to C++ programming. Each topic lists 3 problems or tasks related to that topic. Some example topics include Overview of C, Implementation of basics of C++, Loops and Decisions, Structures, Functions, Objects & Classes, Polymorphism, Inheritance & Virtual Functions, Streams & Files, and Templates & Exceptions. For each topic, the document provides a brief statement of the problem to be solved or task to be implemented.

Uploaded by

Dev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views

BCA 271 OOPS Lab Practical List

This document contains 10 topics related to C++ programming. Each topic lists 3 problems or tasks related to that topic. Some example topics include Overview of C, Implementation of basics of C++, Loops and Decisions, Structures, Functions, Objects & Classes, Polymorphism, Inheritance & Virtual Functions, Streams & Files, and Templates & Exceptions. For each topic, the document provides a brief statement of the problem to be solved or task to be implemented.

Uploaded by

Dev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Date

S No. Topic Problem Statement


1. Overview of 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

 Reverse of a string without using


string operations

2. Implementation of basics of C++  Accept three numbers, find their sum


and average
 Program to identify if an input is a
symbol, digit or character
 WAP to perform the Arithmetic
operation & use the concept of
typecasting
3. Loops and Decisions
 Write a Program to enter a number
&check whether it’s a prime no. or
not.

 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.

4. Structures
 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.
5. Functions
 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 numbers.

 WAP to sum the digit of a no. using


recursion
6. Objects & Classes  Create a class employee which
Implementation of different types have name, age and address of
of constructors. employee, include functions
getdata() and showdata(),
getdata() takes the input from
the user, showdata() display the
data in following format:
    Name:
    Age:
 Address:

 Write a class called CAccount


which contains two private data
elements, an integer
accountNumber and a floating
point accountBalance, and three
member functions:
 A constructor that allows the
user to set initial values for
accountNumber and
accountBalance and a default
constructor that prompts for the
input of the values for the above
data numbers.
 A function called
inputTransaction, which reads
a character value for
transactionType(‘D’ for
deposit and ‘W’ for
withdrawal), and a floating point
value for transactionAmount,
which updates accountBalance.
A function called printBalance,
which prints on the screen the
accountNumber and
accountBalance.
 Define a class Counter which
contains an int variable count
defined as static and a static
function Display () to display
the value of count. Whenever
an object of this class is created
count is incremented by 1. Use
this class in main to create
multiple objects of this class
and display value of count each
time

 WAP to implement Parameterized


Constructor, Copy Constructor
and Destructor.
7. Polymorphism  WAP to add and subtract two
(Function & Operator Overloading) complex numbers using classes
( Operator Overloading).

 Write program to overload


Binary + to add two similar
types of objects. (Both with
and without using friend
functions)

 WAP to implement ‘Function


Overloading’

8. Inheritance & Virtual Functions  Implement the following


class hierarchy considering
appropriate data members and
member functions

 Implement the following


hierarchy considering
appropriate data members and
member functions (use
Virtual functions).

(Create a base class Shape & derive classes


circle, square & triangle. In base class
write a virtual function “Draw” & override
it in derived class.)
9 Streams & Files  WAP to read the student details from
one file & write them to another file.
 WAP to count digits, alphabets
and spaces, stored in a text file,
using streams

10. Templates & Exceptions  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

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy