Problem Solving In Software Engineering
LECTURE 2
Introduction
Assist. Prof. Dr. Gülüzar ÇİT
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Outline
➢Problem Solving
➢Basic Terms
➢Programming Approaches
➢Why "C/C++"?
➢Why "Structural Programming"?
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Problem Solving
➢Problem
➢a situation that needs to be solved
➢has some constraints
➢Problem Solving
➢mental activity related to intelligence and thinking
➢meet all constraints as possible
➢fast
V. Anton Spraul defines problem solving in programming as:
"Problem solving is writing an original program that performs a
particular set of tasks and meets all stated constraints."
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Problem Solving
➢Example:
➢Problem ⇒
➢Make coffee for your friends (Ali, Berk, Ceylin and Deniz)
➢Constraints
➢ Ali wants his coffee black (without sugar and cream)
➢ Berk wants his coffee with cream only
➢ Ceylin wants her coffee with both sugar and cream
➢ Deniz wants her coffee with sugar only
➢Solution ⇒
➢Figure out a method (algorithm)
➢ the way everyone wants
➢ prepare as quickly & hot as possible
➢ serve the coffee to the four people at the same time
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Problem Solving
➢for "Software Engineers"
➢writing an original computer program
➢requirements
➢perform a particular set of tasks
➢meet all stated constraint
➢steps
➢figure out an algorithm/pseudo code, draw a flowchart/UML
➢code with a programming language
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Basic Terms
➢Computer
➢an electronic device that manipulates information, or data.
➢it can input, process, output and/or store data
➢Hardware & Software
➢Hardware
➢physical devices
➢ input/output devices, cpu
➢Software
➢Collection of all the programs that run on a the hardware of a computer
➢system software
➢application software
➢Program
➢an implementation of an algorithm with a programming language
➢a set of instructions which has been written by a programmer.
➢contains detailed instructions and complete procedures for performing the task(s)
➢there are a number of ways in which a programmer can write a program but not
all are effective.
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Basic Terms…
➢Programming
➢when a general or specific daily life problem desired to be solved with computers,
first of all, the problem should be abstracted from the real life and explained to
the computer.
➢these processes including introducing, teaching and providing the output with the
taught solution are called programming
➢Language
➢series of symbols & words
➢"Programming" + "Language" → Programming Language
➢tool used to solve a problem with computers
➢enables the software developer to tell the computer exactly what and how to do
under different conditions.
➢every programming language is different from each other. Each has its own
commands and rules. We can not say "this one is the best programming
language". Because one has advantages and weaknesses compared to another.
➢Todays the most widely used programming languages
➢Java ,C ,C++ ,C#, PHP, Python, JavaScript, ….
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Basic Terms…
➢Programming Language Systems
➢Depending on their similarity to human languages or hardware languages.
➢Low-level & High-level Programming Languages
➢Low-level languages
➢machine-oriented languages & assembly language
➢machine-oriented languages
➢commands consists of binary 0’s and 1’s.
➢processor reads binary code and implements.
➢machine (hardware) dependent
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Basic Terms…
➢Programming Language Systems…
➢Depending on their similarity to human languages or hardware languages.
➢Low-level & High-level Programming Languages
➢Low-level languages
➢machine-oriented languages & assembly language
➢assembley languages
➢second generation languages
➢relatively easy to understand
➢symbols consisting of English abbreviations are used
➢machine-dependent
➢converted into machine code with the assembler compiler
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Basic Terms…
➢Programming Language Systems…
➢High-level languages
➢languages that are reasonably machine independent and people-oriented
➢commands consists of English words and mathematical expressions
➢compilers convert into machine code.
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Basic Terms…
➢Compiler
➢Language systems that translate source code of a program written in high-
level languages into machine code, which the hardware can interpret and
execute directly.
➢Source Code
➢code written in a high-level programming language
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Basic Terms…
➢Algorithm
➢can be thought as the equivalent of the word "plan" in real life
➢expressing the solution steps of a problem in order and finite
➢a set of instructions that is used to perform a certain task
➢in software engineering: "the logical and symbolic description of the
predicted operations for the solution of a problem"
➢free from any programming language
➢Abdullah Muhammad bin Musa al-Khwarizmi, a Turkish-Islam
mathematician and astronomer who lived in 9th century, did a study
explaining some mathematical operations such as addition, subtraction,
division by two, find twice an number. This work is called as "algorismus"
in Latin from Westerners. So, todays "algorithm" was used firstly.
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Basic Terms…
➢Flowchart
➢Flow diagram
➢A graphical representation of an algorithm with specific geometric shapes.
➢Pseudocode
➢language used as algorithms
➢expressing the solution steps of a problem in order and finite
➢free from programming languages, so they are not compiled
➢between spoken language and programming language
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Programming Paradigms
➢Paradigm
➢preferred approach/methodology to programming that a language
supports.
➢concerned with how the programmer/coder arranges set of instructions
of a program
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Programming Paradigms…
➢Two core classifications of programming paradigms
➢Imperative
➢the programmer specifies how to solve a particular program
in the code
➢examples of paradigms that follow this technique include
➢ Procedural Programming
➢ Object Oriented Programming.
➢Declarative
➢the programmer only declares the problem to be solved
without explicitly describing how it is to be solved
➢examples of paradigms that follow this technique
➢ Functional Programming
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Programming Paradigms…
➢some popular/important paradigms
➢Procedural Programming
➢Structured Programming
➢Functional Programming
➢Object Oriented Programming
➢many others for other fields
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Programming Paradigm…
➢Structured Programming
➢a programming paradigm written with only the structured
programming constructions
➢control structures,
➢block structures
➢subroutines
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Programming Paradigm…
➢Structured Programming…
➢Control Structures
➢Sequence
➢A number of operations are carried out one after the other.
➢Lines or blocks of code are written and executed in sequential order
➢Selection
➢One of the two options is selected depending on the result of the condition.
➢if/then/else
➢Repetition/Iteration/Loop
➢One of the two options is selected depending on the result of the condition.
➢while / for
➢Block structures
➢block is a section of code that consists of a set of declarations and a sequence
of statements.
➢begin….end, {…}, etc.
➢Subroutines
➢callable units such as procedures, functions, methods, or subprograms
➢used to allow a sequence to be referred to by a single statement.
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Programming Paradigm…
➢Structured Programming…
➢Programmer focuses directly on the problem and develops
functions/methods for problem solving.
➢The main function/block starts the program and the required
operation is performed by calling methods, each of which
performs specific tasks.
➢The data needed by the methods are usually stored in databases
or variables (accessible from anywhere).
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Programming Approaches/Methodologies…
➢Structured Programming…
➢Advantage
➢good way to start!...
➢Disadvantages
➢when the system grows
➢relationships and dependency become more complex
➢finding errors becomes difficult
➢changing, adding, removing, etc. within the program becomes
difficult and may cause unexpected effects
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Programming Approaches/Methodologies…
➢Object-Oriented Programming – OOP
➢Basic component in object-oriented programming technique is
object and programs consist of objects working together.
➢The object contains both data and functions that process that
data.
➢Programmers focus their attention on developing the classes
that make up objects.
➢Tasks are performed by the object itself and functions can access
the data without sending parameters.
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Programming Approaches/Methodologies…
➢Object-Oriented Programming – OOP
➢Advantages
➢As it was developed with thinking real world, problems can be defined and solved more
easily.
➢Information Hiding (Data Abstraction)
➢data and functions inside objects are abstracted from other objects - they just know
what to do. Changes within the object don’t affect other objects. Therefore, the
maintenance phase becomes easier.
➢no unnecessary details, focus on the problem (just press the gas to drive the car
away). so, it provides faster development process.
➢Modular Programming
➢objects (data + function) are completely independent of each other (encapsulation)
➢a large and complex problem can be solved more easily by breaking it up into small
pieces. development and maintenance become easier.
➢program development is faster, a previously developed object can be used easily in
other programs. error handling-maintenance is easier (it also works when we give
the bike to someone else).
➢group work is enabled during the development process.
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Why "C/C++"?
➢C
➢one of the oldest programming languages
➢forms the basis for languages such as JavaScript and C#
➢C++
➢can be considered an extended version of the C language
➢C with classes
➢multi-paradigm language
➢C/C++
➢characterized by extremely high performance
➢widely used to create various applications, such as Adobe
Photoshop, Unity engine, OpenGL (a C library), etc.
➢powerful
➢a lot of control on computer resources
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Why "C/C++"?
➢easy to learn
➢efficient
➢speed
➢popular ⇒
Source: TIOBE ()
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Why "Structured Programming"?
➢Good beginning to programming
➢An introduction to more advanced programming (OOP)
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall
Further Reading
➢https://stackoverflow.com/questions/4399841/whats-the-
difference-between-functional-structured-and-procedural-
programming
➢https://www.tutorialspoint.com/programming_methodologies/pro
gramming_methodologies_introduction.htm
➢https://en.wikipedia.org/wiki/Comparison_of_programming_parad
igms#:~:text=Procedural%20programming%20%E2%80%93%20spec
ifies%20the%20steps,avoids%20state%20and%20mutable%20data.
➢https://scoutapm.com/blog/functional-vs-procedural-vs-oop
➢https://www.atatus.com/blog/programming-paradigms-compared-
function-procedural-and-oop/
➢https://www.linkedin.com/advice/0/what-some-historical-
theoretical-foundations-programming
SWE 101 – Problem Solving in Software Engineering 2025-2026 Fall