Dbca-022 Programming in C++ Lab

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

BACHELOR OF COMPUTER APPLICATIONS (BCA)

ASSIGNMENT

DIRECTORATE OF DISTANCE EDUCATION


JECRC UNIVERSITY
Plot No.IS-2036 to 2039, Ramchandrapura Industrial Area, Vidhani,
Jaipur (Rajasthan) - 303905
INSTRUCTIONS

NOTE:

1. Last date for submission of assignments is 26-12-2022. Assignments received after 26-12-2022

will not be evaluated.

2. Assignments should be in the own handwriting of the student concerned and not type-written

or printed or photocopied.

3. Assignments should be written on A4 paper on one side only.

4. All assignments required to be uploaded through Student Portal.


BCA IV SEMESTER ASSIGNMENT

LAB ASSIGNMENTS
Note: For Lab Assignments it is required that student should execute the program and submit the
program logic (i.e. program coding), sample inputs and outputs, snapshots along with the
necessary documentation.

DBCA022 Programming in C++ LAB

Maximum Marks: 20

Q1. a) Write a C++ program to overload ‘+’ operator to find the sum of length of two
given strings. (5 Marks)
(Note: if S1 and S2 are two strings then S1+S2 should give the sum of lengths of
S1 and S2).

b) Write a program in C++ to perform simple arithmetic operations with proper


exceptions handling. (5 Marks)

Q2. a) Write a program in C++ which creates a multiple-inheritance hierarchy of (5 Marks)


Teacher classes derived from both Person, Employee classes. Each class must
implement a Show() member function and utilize scope-resolution operator.
b) Define a class with appropriate data members and member functions which (5 Marks)
opens an input and output file, checks each one for being open, and then reads name,
age, salary of a person from the input file and stores the information in an object,
increases the salary by a bonus of 10% and then writes the person object to the output
file. It continues until the input stream is no longer good.

You might also like