0% found this document useful (0 votes)
34 views23 pages

Lecture 1.1.1

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

Lecture 1.1.1

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

INSTITUTE - UIE

DEPARTMENT- ACADEMIC UNITS


Bachelor of Engineering (Computer Science & Engineering)
Subject Name: Basic Data Structure Using C++
Code:24CSH-103

Topic: Features of object-oriented DISCOVER . LEARN . EMPOWER


programming, Difference between object
Basic Data Structure
Using C++

Course Objectives

• To enable the students to understand


various stages and constructs of C++
programming language.
• To improve their ability to analyze and
address variety of problems in C++.
• To understand the concept of data
structures and various operations on
them.
• To understand the properties of
various data structures and able to
identify the strengths and weaknesses
of different data structures.
• To analyze and compare the efficiency
of algorithms and learn to design
2
efficient algorithms for solving
Course Outcomes
CO Course Outcome
Number

CO1 Understand the concepts of object-oriented programming including


programming process and compilation process.
CO2 Apply different techniques to decompose a problem and
programmed a solution with various concepts of object-oriented
programming language.
CO3 Analyse and explain the behaviour of linear data structure
operations using the programming addressed in the course.
CO4 Implement and evaluate the programs using the syntax and
semantics of object-oriented programming.
CO5 Design the solution of real-world problems in order to determine
that the program performs as expected.

3
Scheme of Evaluation

Direct Evaluation Weightage of actual Final Weightage in Mapping with SIs Remarks
Sl No. Frequency of Task BT Levels CO Mapping Mapping with PIs
Instruments conduct Internal Assessment (ABET) (Graded/Non-Graded)

SO1 1a,1b,1c
10 marks for each
1 Assignment One per unit 10 Hard CO4,CO5 Graded
assignment

SO6
2 Exam 20 marks for one MST 2 per semester 20 Medium CO1,CO2,CO3,CO4 6a,6b Graded

3 Case Study 8 marks 1 per unit 8 Easy CO2 SO1, SO6 1c,6b Graded
NA NA NA NA
One per lecture
4 Homework NA topic (of 2 NA Non-Graded
questions)

NA NA NA NA
5 Discussion Forum NA One per unit NA Non-Graded

NA NA NA NA
6 Presentation NA NA NA Non-Graded

7 Attendance NA NA 2 NA NA NA NA Graded

Remarks
Direct Evaluation Final Weightage in Mapping with SIs
S No. Weightage of actual conduct Frequency of Task BT Levels CO Mapping Mapping with PIs (Graded/Non-
Instruments Internal Assessment (ABET)
Graded)
Unit wise Practical 1a, 1b, 1c, 6a, 6b SO1, SO6
1 15 marks 3 45 Medium 1,2,3,4,5 Graded
Evaluation
1a, 1b, 1c, 6a, 6b
2 Exam 15 marks for one MST 1 per semester 15 Medium 1,2,3 SO1, SO6 Graded
3 Attendance NA NA 2 NA NA NA NA Graded

4
CONTENTS
• Introduction to C++
Programming
• Features of object-oriented
programming
• Difference between object
oriented and procedure-
oriented programming

5
Introduction to C++ Programming
• The prime purpose of C++ programming was to add object
orientation to the C programming language, which is in itself one
of the most powerful programming languages.

• The core of the pure object-oriented programming is to create an


object, in code, that has certain properties and methods. While
designing C++ modules, we try to see whole world in the form of
objects.

• For example a car is an object which has certain properties such as


color, number of doors, and the like. It also has certain methods
such as accelerate, brake, and so on. 6
Properties of C++ Programming
• Data as well as operations are encapsulated in objects
• Information hiding is used to protect internal properties of an
object
• Objects interact by means of message passing.
• In most object-oriented languages objects are grouped in classes
• Objects in classes are similar enough to allow programming
of the classes, as opposed to programming of the individual
objects
• Classes represent concepts whereas objects represent
phenomena
• Classes are organized in inheritance hierarchies. Provides for
class extension or specialization 7
Features of Object-Oriented Programming
• Object
• Class
• Data abstraction and Encapsulation
• Information hiding
• Inheritance
• Polymorphism

8
Object
• Object is a instance of class.
• Represent a person, a place, a bank account, a table of data or any item the
program has to handle.

Fig.1. Two ways of representing an object

21/01/2025 4
Class
• Set of data & code of an object ->user-defined data type –>class.
• Once a class has been defined, we can create any number of objects belonging to
that class.
• A class is collection of objects of similar type.
• Syntax used to create an object is no different than the syntax used to create an
integer object in C.

Example-- If fruit has been defined as a class, then the statement


fruit mango;
will create an object mango belonging to the class fruit.

21/01/2025 5
Data Abstraction & Encapsulation
• Wrapping up of data & functions into a single unit (called class) -encapsulation.
• Data is not accessible to the outside world
• Functions which are wrapped in the class can access it.
• Abstraction - act of representing essential features without background details.

Fig.2. Encapsulation

21/01/2025 6
Information Hiding
• Insulation of data from direct access by the program – data or information hiding.
• Attributes are - data members because they hold information.
• Functions are - member functions.

Fig.3. Concept of Information Hiding

21/01/2025 7
Inheritance
• Process by which objects of one class acquire the properties of objects of another
class.
• Each derived class shares common characteristics with the class from which it is
derived(fig.4).
• Inheritance provides reusability and expandability.

Fig. 4. Property Inheritance


21/01/2025 8
Polymorphism
• Ability to take more than one form.
• An operation may exhibit different behaviours in different instances.
• Using a single function name to perform different types of tasks is known as
function overloading(fig.5).

21/01/2025
Fig. 5. Polymorphism 9
Difference between object oriented
and procedure-oriented programming
Procedure-oriented programming Object-oriented programming
Emphasis is on doing things. Emphasis is on data rather than procedure.
Large programs divided into smaller functions. Programs are divided into objects.
Functions can share global data. Functions that operate on the data of an object are tied
together in the data structure.
Data move openly. Data is hidden.
Functions transform data from one form to another. Objects may communicate with each other through
functions.
Top-down approach in program design. Bottom-up approach in program design.

15
Summary

In this lecture we have We have discussed about some


discussed about C++ features of C++
programming language.

Moreover, we have learnt


about difference between
Procedure-Oriented and
Object-Oriented Programming

16
Frequently Asked question
Q1 What are the various features of Object-oriented programming?
Answer: Object-oriented programming aims to implement real-world entities like inheritance, hiding,
polymorphism, etc in programming. The main aim of OOP is to bind together the data and the
functions that operate on them so that no other part of the code can access this data except that
function.

Q2 What are applications of C++ language?


Answer:
1) Games
C++ is close to the hardware, can easily manipulate resources, provide procedural programming
over CPU intensive functions and is fast. It is also able to override the complexities of 3D games
and provides multilayer networking. All these benefits of C++ make it a primary choice to develop
the gaming systems as well as game development suites.
2) GUI Based Applications
C++ can be used to develop most of the GUI based and desktop applications easily as it has got
the required features.

17
3) Database Software
C++ is also used in writing database management software. The two most popular
databases MySQL and Postgres are written in C++.
4) Operating Systems
The fact that C++ is a strongly typed and fast programming language makes it an ideal
candidate for writing operating systems. In addition to this, C++ has a wide collection of
system-level functions that also help in writing low-level programs.
5) Browsers
Browsers are mostly used in C++ for rendering purposes. Rendering engines need to be
faster in execution as most people do not like to wait for the web page to be loaded. With
the fast performance of C++, most browsers have their rendering software written in C+
+.
6) Advanced Computation And Graphics
C++ is useful in developing an application that requires high-performance image
processing, real-time physical simulations, and mobile sensor applications that need high
performance and speed.
7) Banking Applications
As C++ aids in concurrency, it becomes the default choice for banking applications that
require multi-threading, concurrency, and high performance.
18
8) Cloud/Distributed System
Cloud storage systems that are extensively used nowadays work close to the hardware. C+
+ becomes a default choice for implementing such systems as it is close to the hardware.
C++ also provides multithreading support that can build concurrent applications and load
tolerance.
9) Compilers
Compilers of various high-level programming languages are written either in C or C++. The
reason is that both C and C++ are low-level languages that are close to hardware and are
able to program and manipulate the underlying hardware resources.
10) Embedded Systems
Various embedded systems like smartwatches, medical equipment systems use C++ to
program as it is closer to the hardware level and can provide a lot of low-level function calls
when compared to the other high-level programming languages.
11) Enterprise Software
C++ is used in developing many enterprise software as well as advanced applications like
flight simulation and radar processing.
12) Libraries
When we require very high-level mathematical computations, performance and speed
become important. Hence most of the libraries use C++ as their core programming
language. Most high-level machine language libraries use C++ as backend.
19
Assessment Questions:
1. Who created C++?

a) Bjarne Stroustrup
b) Dennis Ritchie
c) Ken Thompson
d) Brian Kernighan

2. A language which has the capability to generate new data types are called ______________

a) Extensible
b) Overloaded
c) Encapsulated
d) Reprehensible

3. What is the full form of oop

(a) object oriented programming


(b) oriented object programming
(c) office oriented programming
(d) office objective programming
20
Discussion forum.
Real life applications of C++, students please visit and read this link and
mention your views , also give some new examples.

https://www.softwaretestinghelp.com/cpp-applications/

21
REFERENCES
TEXT BOOKS
T1 E Balagurusamy., “Object Oriented Programming in C++”, Tata McGraw-Hill.
T2 Robert Lafore, “Object Oriented Programming in C++”, Waite Group.

REFERENCE BOOKS
R1 Herbert Schildt , “C++- The Complete Reference”, Tata McGraw-Hill 2003, New
Delhi.
R2 Bjarne Stroustrup: “The C++ Programming Language” (4th Edition). Addison-
Wesley.
R3 Ravichandran , “Programming with C++”,Tata McGraw-Hill Education.
R4 Joyce M. Farrell,” Object Oriented Programming Using C++”, Learning.
R5 Programming Languages: Design and Implementation (4th Edition), by Terrence W.
Pratt, Marvin V. Zelkowitz, Pearson.
R6 Programming Language Pragmatics, Third Edition, by Michael L. Scott, Morgan
Kaufmann.

Websites:
1. https://www.sanfoundry.com/cplusplus-programming-questions-answers-bas
ics/
2. https://www.cppbuzz.com/100-mcq-on-c++ 22
THANK YOU

You might also like