You are on page 1of 10

1/9/2023

Engineering Science Option Course [ESO3]


Course Code: CSE202 Lecture #01
Winter 2022-23

Introduction

Dr. Monidipa Das


Assistant Professor
Department of Computer Science and Engineering
Indian Institute of Technology (Indian School of Mines) Dhanbad, Jharkhand 826004, India

Topics of Discussion 2

• Concept of Programming
– What and Why

• Programming Paradigms
– Programming languages

• Course Details
– Course Structure/Syllabus
– Course Materials
– Course Evaluation/Tests
• Object Oriented Programming Concepts

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

1
1/9/2023

Concept of Programming
• What and Why

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

Programming: What and Why 4

Processing (based on instructions given)

Data Information
(input) (Output)

Translated to a set of Program or Code


Algorithm instructions in some
computer language
Programming or Coding
 letting the computer know how to solve a problem
 Writing instructions in computer language
Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

2
1/9/2023

Programming Paradigms
• Programming languages

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

Programming Paradigms 6

• Programming paradigm:
Programming
A mode of thinking aka a Paradigms

programming methodology

Imperative Declarative
• Programming language:
A tool to solve problem
using computer Procedural
Objective-
Functional Logical
oriented

C, Ada Smalltalk Lisp PROLOG


Programming Pascal Eiffel Erlang GHC
COBOL Ada++
languages FORTRAN Java, C++
Haskell

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

3
1/9/2023

Declarative vs. Imperative Programming 7

Declarative vs. Imperative Programming


A programming paradigm that expresses
A programming paradigm that uses statements
the logic of a computation without
that changes the program’s state.
describing its control flow.
Main Focus
Focuses on what the program should Focuses on how the program should achieve
accomplish. the result.
Flexibility
Provides less flexibility. Provides more flexibility.
Complexity

Simplifies the program. Increase the complexity of the program.

Categorization
Functional, Logic, Query programming Procedural and Object Oriented programming
falls into declarative programming. falls into imperative programming.

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

Procedure-Oriented vs. Object-Oriented 8

• Procedure-Oriented Programming
• Emphasis is on doing things
(algorithms).
• Large programs are divided into
smaller programs known as functions.
• Most of the functions share global
data.
• Data move openly around the system
from function to function.
• Functions transform data from one
form to another.
• Employs top-down approach in
program design.

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

4
1/9/2023

Procedure-Oriented vs. Object-Oriented 9

• Object Oriented Programming (OOP)


• Emphasis is on data rather than
procedure.
• Programs are divided into what are
known as objects.
• Data is hidden and cannot be accessed
by external function.
• Objects may communicate with each
other through function.
• New data and functions can be easily
added whenever necessary.
• Follows bottom up approach in
program design.
Object C
Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

10

Course Details
• Course Structure/Syllabus
• Course Materials
• Course Evaluation/Tests

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

5
1/9/2023

Course Structure/Syllabus 11

• Object Oriented Programming


– UNIT-I: Object Oriented Programming Concepts

– UNIT-II: Constructors and Destructors

– UNIT-III: Inheritance

– UNIT-IV: Exception Handling

– UNIT-V: Streams and formatted I/O, Templates

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

Course Materials 12

• Text Book and References


 B. Stroustrup , “The C++ Programming language”, Third edition, Pearson
Education, 2004.

 Herbert Schildt, “The complete Reference C++”.

 Peter E. Balagurusamy, “Object Oriented Programming with C++”.

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

6
1/9/2023

Evaluation/Tests 13

• Distribution of Marks:
 Quiz-1: 10 marks (Before Mid-Sem)
 Quiz-2: 10 marks (After Mid-Sem)
 Mid-Sem Exam: 32 marks
 End-Sem Exam: 48 marks

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

14

UNIT-I: Object Oriented Programming Concepts

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

7
1/9/2023

Basic Concepts of OOP 15

• Objects
• Classes
• Data Abstraction and Encapsulation
• Inheritance
• Polymorphism
• Dynamic binding
• Message passing

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

Objects 16

• The fundamental idea behind object oriented


approach is to combine both data and function into
a single unit and these units are called objects

• Basic run-time entities in an object-oriented system.

• May represent a person, a place, a bank account, a


table of data or any item.

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

8
1/9/2023

Classes 17

• Collection of objects of similar type.

• A new data type that contains member variables and member


functions that operate on the variables.

fruit apple;
student s1, s2;

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

Data abstraction and encapsulation 18

• Abstraction
– Act of representing essential features without including the background
details or explanations.
– Classes use the concept of abstraction and are defined as a list of abstract
attributes size, cost, etc., and functions to operate on the attributes.

• Encapsulation
– Wrapping up of data and function into a single unit (called class).
– The data is not accessible to the outside world and only those functions
which are wrapped in the class can access it.

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

9
1/9/2023

19

Questions?

Prof. Monidipa Das, Department of CSE, IIT (ISM) Dhanbad

10

You might also like