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

OOP-Paradigm with C++

Uploaded by

oparashar34
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

OOP-Paradigm with C++

Uploaded by

oparashar34
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

COURSE STRUCTURE

Program B. Tech CSE (2022-2026)


Semester II Semester
Course Code and Name CSL0204 Object-Oriented Programming Paradigm with C++
Credits 5
Contact Hours per week 7 (Lecture-3 Tutorial-0 Practical-4)

A. COURSE OUTCOMES
▪ CO.1: Revised the basics of Programming concepts like structured, unstructured & Object-oriented
programming concepts..
▪ CO2: Understand the difference between C & C++ programming structure, logics with and without
OOP.
▪ CO3: Implement the OOP concepts as practical like Polymorphisms, Inheritance, and DMA etc.
▪ CO.4 Apply OOP concepts and their syntax like Class objects, Constructor, Polymorphism, inheritance,
and DMA
▪ CO.5 Design the UML Diagrams, Classes and Objects with OOP concepts
▪ CO.6 Evaluating the performance and difference of various concepts and logics of OOP with respect to
the problem domain.

B. ASSESSMENT TOOLS:

S. Course Specific Assessment Tools CO’s Mapped


No.
1 Two Midterm Exams - Divided in 3 sections- Section A: 5 objective CO1-CO5
questions/very short questions (1 mark each), Section B: 3 out of 5
subjective questions (15 marks each) & Section C: Case Study Analysis
or practical problems (10 marks)- Total 30 marks (to be
converted out of 15 marks later)

2 Case Study Analysis/Review Writing/ Workshops CO3, CO4, CO5

3 Project Based Learning Assignment (Group of 3-4 students) CO3, CO5, CO6

4 Flip Class Room/Library Assignment Report/ CO1, CO2,


Quantitative Problem Based Assignment/Poster/Quiz CO3
5 Seminar (Evaluated through report, presentation &viva) CO3, CO5,CO6
C. COURSE CONTENTS
Unit Content Pedagogy

1 Object Oriented Methodology: Introduction, Advantages and Audio/Video clips,


Disadvantages of Procedure Oriented Languages, what is Object lecture with ppt, quiz and
Oriented? What is Object Oriented Development? Object Oriented using online and offline
Themes, Benefits and Application of OOPS. C++ complier

Principles of OOPS: OOPS Paradigm, Basic Concepts of OOPS:


Objects, Classes, Data Abstraction and Data Encapsulation,
Inheritance, Polymorphism, Dynamic Binding, Message Passing.

2 Classes and Objects: Simple classes (Class specification, class Audio/Video clips, group
members accessing), Defining member functions, passing object as discussion, lecture with
PPT and using online
an argument, Returning object from functions, friend classes, Pointer
and offline C++
to object, Array of pointer to object complier

Constructors and Destructors: Introduction, Default Constructor,


Parameterized Constructor and examples, Destructors

3 Polymorphism : Concept of function overloading, overloaded Audio/Video clips, lecture


operators, overloading unary and binary operators, overloading with ppt, classroom
presentations and using
comparison operator, overloading arithmetic assignment operator,
online and offline C++
Data Conversion between objects and basic types, complier

Virtual Functions: Introduction and need, Pure Virtual Functions,


static Functions, this Pointer, abstract classes, virtual destructors.

4 Program development using Inheritance: Introduction, Audio/Video clips,


understanding inheritance, Advantages provided by inheritance, lecture with ppt, quiz and
choosing the access specifier, Derived class declaration, derived using online and offline
class constructors, class hierarchies, multiple inheritance,
multilevel inheritance, containership, hybrid inheritance. C++ complier

Exception Handling: Introduction, Exception Handling


Mechanism, Concept of throw & catch with example

5 Templates: Introduction, Function Template and examples, Class Audio/Video clips, group
Template and examples. discussion, lecture with
ppt, quiz and using
online and offline C++
Working with Files: Introduction, File Operations, Various File complier
Modes, File Pointer and their Manipulation
D. Text Book:
S. No. Author Title Edition
1. E. Balagursamy Object Oriented Programming with
C++;
2 R. Lafore Object Oriented Programming in
C++

E. Reference Books:
S. No. Author Title Edition
1 Herbert Schildt C++ The Complete Reference
2 Bjarne stroustrup , The C++ programming Language 4th edition
Practical Lab:
1 Write separate functions to swap 2 integers making use of (i) pointer parameters and (ii) reference
parameters (iii) constant data member
2 Create a class called Counter that contains a static data member to count the number of Counter objects
being created. Also define a static member function called showCount() which displays the number of
objects created at any given point of time. Which displays the number of objects created at any given point
of time.
3 Define a class to represent a Bank account. Include the following members.
a. Data members:-
b. Name of the depositor
c. Account number.
d. Type of account.
e. Balance amount in the account.
f. Rate of interest (static data)
4 Provide a default constructor, a parameterized constructor and a copy constructor to this class.
a. Also provide Member Functions:-
1.To deposit amount.
2.To withdraw amount after checking for minimum balance.
3.To display all the details of an account holder.
4.Display rate of interest (a static function)
Illustrate all the constructors as well as all the methods by defining objects.
1. a. Define a class named Movie. Include private fields for the title, year, and name of the director.
Include three public functions with the prototypes
1. void Movie::setTitle(char [ ]);
2. void Movie::setYear(int);
3. void Movie::setDirector(char [ ]);
Include another function that displays all the information about a Movie.
b. Include a function which accepts 2 objects of type Movie and displays whether or not they were
released in the same year and also whether the Directors are same. String functions may be used.
5 Write an overloaded function called compute Area which is used to compute the area of a triangle, a
rectangle and a circle, respectively. Show the invocation of these functions in the main.
6 Create 2 classes namely Rectangle and Circle with suitable data members. Provide member functions
namely input and display to these classes. Function input is for inputting the dimensions and calculating
the area. The area should be stored along with the input data members. Function display is for displaying
the dimensions as well as area. Write a friend function (called larger) of class Rectangle and class Circle
which compares the areas of the rectangle object with a circle object and displays which one is greater.
7 Write a C++ class that contains two classes’ car and track. The car class contains two private variables
passengers and speed. The track class contains two private variables load and speed. Use friend function
to compare the speed of car and track.
8 Define a class called Customer that holds private fields for a customer ID number, name and credit limit.
Include public functions that set each of the three fields and also for displaying a customer’s data.
9 Write a main() function that declares an array of 5 Customer objects. Prompt the user for values for
each Customer, and display all 5 Customer objects.
10 Create a base class called Shape. Use this class to store 2 double type values which could be used to
compute the area of figures. Derive 2 specific classes called Triangle and Rectangle from the base class
Shape. Add to the base class, a member function called GetData to initialize base class data members and
another member function displayArea to compute and display the area of figures. Make displayArea a
virtual function and redefine this function in the derived classes to suit their requirements. Using these
three classes design a program which will accept dimensions of a triangle or rectangle interactively and
display the area.
11 Write a Program to implement a Queue stack operation using DMA.
12 Design a template Stack which can work with either a Student record or an Employee record. A Student
record contains name, rollNo and cgpa. An Employee record contains name, empId and salary fields.
Provide push, pop, display functions to the template stack class.
13 Write a class template to represent a generic vector. Include member functions to perform the following
tasks:
1) To create the vector.
2) To modify the value of a given element.
3) To multiply the vector by a scalar value.
4) To display the vector in the form (10, 20, 30

14 A file contains a list of names and telephone numbers in the following form:
Name Tel. No.
Write a C++ program to read the file and output the list in the tabular format. The
name should be left-justified and numbers right-justified. Use a class object to store each set of
data. Program should also perform following tasks.
i) To determine the telephone numbers of the specified person.
ii) To determine the name if a telephone number is given.

You might also like