Lecture 1
Lecture 1
PROGRAMMING
CSE 202. Winter 23-24
Lecture 1.1
INTRODUCTION
PRANAV BISHT
ASSISTANT PROFESSOR
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
IIT(ISM) DHANBAD
• Structured Programming
• Popularized in 1960s.
• Lack of reliance on GOTO statements.
• Before that, problem of spaghetti code due to indiscriminate use of GOTO statements.
• “GOTO Statement Considered Harmful” open letter in 1968 by Edsger W. Dijkstra
sparked a debate.
• "GOTO Considered Harmful' Considered Harmful" letter by opposition.
• A common method to perform operations over the captured data, is through functions
• Relevant data must be supplied to and received from these functions appropriately
• For example, through parameters and returned values
• Remember, you can use nesting with structures to capture data hierarchically
• Structures, combined with functions to operate over them, is a legitimate way to build
applications
Pranav Bisht | Dept. of CSE | IIT (ISM) Dhanbad
Structured Programming
• In this approach, you decouple the “data” from the “operations over the data”
• The data is stored in multiple variables, often collected together inside a wrapper like a
structure
• The operations are implemented as functions…
• … which take the required data as parameters, and return the results, if any
• The design documents produced in the process follow some terminology and conventions
• Usually, these documents contain one or more diagrams, e.g. Class Diagrams
• These documents do not necessarily follow any standards…
• … but they usually communicate enough information to describe the software in context
• There are two major reasons for the popularity of Object Oriented Modelling approach
• First, it aligns well with the real world (we will see how)
• Second, Object Orientation support is fairly common with many general-purpose programming
languages