Problem-Solving v2
Problem-Solving v2
• Software, instructions that tell a computer what to do. The • Problem Analysis
software comprises the entire set of programs, procedures, • Algorithm Development
and routines associated with the operation of a computer • Flowcharting
system.
• Coding
• A set of instructions that directs a computer’s hardware to
perform a task is called a program, or software program. • Compilation and Execution
• The two main types of software are system software and • Debugging and Testing
application software. • Documentation
• System software controls a computer’s internal functioning,
chiefly through an operating system, and also controls
such peripherals as monitors, printers, and storage devices.
3 4
• Process of becoming familiar with the problem. • Algorithm development is the act of designing the steps
that solve a particular problem for a computer or any
• We need to analyze and understand it well before solving it. other device to follow not excluding human beings but in
this case computers only and computer-like devices.
• Algorithm development steps. Steps in the development of
• The user’s requirements cannot be fulfilled without a clear Algorithms.
understanding of his / her problem in depth.
• Step by step description of the method to solve the problem.
• Effective procedure for solving the problem with an infinite
• Inadequate identification of problem may cause program less number of steps.
useful and insufficient.
• Developing an algorithm in a step of program design.
5 6
1
20-12-2021
7 8
9 10
11 12
2
20-12-2021
Flowcharting Difference
Algorithm Flowchart
It is a procedure for solving It is a graphic representation of
problems. a process.
• Step 4: If X is less • Coding isn’t the only task to be done to solve a problem
than 20 then go back using computer.
to step 2.
15 16
Compilation Execution
• Process of changing high-level language into machine-level • Execution in computer and software engineering is
language. the process by which a computer or virtual machine
It is by special software, COMPILER reads and acts on the instructions of a computer
• The compilation process tests the program whether it program. ...
contains syntax errors or not. • Programs for a computer may be executed in a batch
• If syntax errors are present, the compiler can not compile the process without human interaction or a user may type
code. commands in an interactive session of an interpreter.
• Once the compilation is completed then the program is
linked with other object programs needed for execution,
there by resulting in a binary program
• And then the program is located in the memory for the
purpose of execution and finally it is executed.
17 18
3
20-12-2021
• Testing means verifying correct behavior. Testing can be • Any written text, illustrations, or video that describes
done at all stages of module development: requirements software or program to its users is called a program or
analysis, interface design, algorithm design, implementation, software document. Users can be anyone from a
and integration with other modules programmer, system analyst, and administrator to end-user.
• Debugging is a cyclic activity involving execution testing and • At various stages of development, multiple documents may
code correction. The testing that is done during debugging be created for different users. Software documentation is a
has a different aim than final module testing. Final module critical process in the overall software development process.
testing aims to demonstrate correctness, whereas testing • In modular programming documentation becomes even
during debugging is primarily aimed at locating errors. This more important because different modules of the software
difference has a significant effect on the choice of testing are developed by different teams.
strategies.
19 21
22 23
24 25
4
20-12-2021
• It is very close to writing actual machine instructions, and it • Machine language is the lowest and most elementary level of
deals with a computer's hardware components and programming language and was the first type of
constraints. It works to control a computer's operational programming language to be developed.
semantics and provides little or no abstraction of • Machine language is basically the only language that a
programming ideas computer can understand and it is usually written in hex.
• In fact, a manufacturer designs a computer to obey just one
• In contrast to high-level language that used for developing language, its machine code, which is represented inside the
software, low-level code is not human-readable, and it is computer by a string of binary digits (bits) 0 and 1.
often cryptic. • The symbol 0 stands for the absence of an electric pulse and
• Assembly language and machine language are two the 1 stands for the presence of an electric pulse. Since a
examples of low-level programming languages. computer is capable of recognizing electric signals, it
understands machine language.
26 27
28 29
• User-friendly, Similar to natural languages High level language Low level language
• Platform independent It is programmer friendly language. It is a machine friendly language.
• Easy to write or remember High level language is less memory Low level language is high memory
efficient. efficient.
• Easy to learn and work
• While execution: translated into assembly language than to It is easy to understand. It is tough to understand.
machine language. It is simple to debug. It is complex to debug comparatively.
• Slow in execution but is efficient for developing programs.
It is complex to maintain
• Ex: C, C++, Python, Java, etc. It is simple to maintain.
comparatively.
It is portable. It is non-portable.
5
20-12-2021
Compiler Interpreter
• A high-level source program must be translated into a format • Like a compiler, it is also a translator which translates high-
that machine can understand. This is done by a software level to machine-level language.
called the compiler.
• Source code => Machine language code(Object code) • Translates and executes the program line by line.
• During the process of translation, the compiler reads the
source programs statement-wise and checks for syntax • Each line is checked for syntax error and then converted to
errors. the equivalent machine code.
• In case of any error, the computer generates a message
about the error.
• Ex. QBASIC, PERL, PHP, ASP, PYTHON, RUBY
• C, C++, Java, FORTRAN, Pascal, etc.
32 33
Compiler Interpreter
Interpreter translates just one statement of Compiler scans the entire program and
the program at a time into machine code. translates the whole of it into machine code
at once.
An interpreter takes very less time to analyze A compiler takes a lot of time to analyze the
the source code. However, the overall time to source code. However, the overall time taken
execute the process is much slower. to execute the process is much faster.
Thanks…
An interpreter does not generate an A compiler always generates an intermediary
intermediary code. Hence, an interpreter is object code. It will need further linking. Hence
highly efficient in terms of its memory. more memory is needed.
Keeps translating the program continuously A compiler generates the error message only
till the first error is confronted. If any error is after it scans the complete program and
spotted, it stops working and hence hence debugging is relatively harder while
debugging becomes easy. working with a compiler.
34 38