COM PROG Reviewer
COM PROG Reviewer
COM PROG Reviewer
Types of Computers
1. PC (Personal Computer) - single user
computer system having moderately
powerful microprocessor
2. Workstation - a single user computer system,
similar to personal computer however has a
more powerful microprocessor.
3. Minicomputer - a multi-user computer
system, capable of supporting hundreds of
users simultaneously.
4. Main Frame - a multi-user computer system,
capable of supporting hundreds of users A LAYERED
simultaneously. Software technology is VIEW OF
different from minicomputer. THE
5. Supercomputer - an extremely fast
COMPUTER
computer, which can execute hundreds of
millions of instructions per second.
• Qualities of a good algorithm
• Inputs and outputs should be defined
precisely.
• Each step-in algorithm should be clear and
PROGRAM AND PROGRAMMING
unambiguous.
LANGUAGES • Algorithm should be most effective
Program – is a set of instruction that the among many different ways to solve a
computer follows. problem.
Programming Language (PL) – is a • An algorithm shouldn’t have computer
standardized communication technique for code. Instead, the algorithm should be
expressing instructions to a computer. written in such a way that, it can be used
Syntax – set of rules that define the correct in similar programming languages.
structure of statements or expressions.
Semantics – deals with the meaning or Pseudocode
interpretation of code. • An English-like representation of the logical
Grammar – structure and composition of steps it takes to solve a problem.
valid statements or expressions • Describes steps of an algorithm in the
“Design” phase
PROGRAM ERRORS • Not a programming language
Syntax Errors
Flowchart
Errors in grammar of the language
Runtime error • Flowchart can have only one start and one
Divide by zero and invalid input data stop symbol
Logical errors • On-page connectors are referenced using
delivers incorrect results and incorrect usage numbers
of parentheses • Off-page connectors are referenced using
alphabets
Programming Development Cycle • General flow of processes is top to bottom or
• It is a model which is used to represent left to right
the stages and tasks that are included • Arrows should not cross each other
orderly in each step to write and put
software.
• It is a set of steps or phases that are
used to develop a program in any
programming language.
1. Problem Definition – define prob. state
2. Problem Analysis – required variables
3. Algorithm Development – stepbystep proced
4. Coding & Documentation – write n implem.
5. Testing & debugging – check the code
6. Maintenance – actively used
Algorithm
An algorithm is the sequence of steps necessary Looping
to solve any programming problem. The repeated use of one or more steps such as
the statement or block of statements.
• Fixed loop where the operations are design of suitable data structures.
repeated a fixed number of times. • Data abstraction – general and
• Variable loop, the operations are repeated representations in particular.
until a specific condition is met. • Object-oriented programming – use of
class hierarchies.
C++ Basics
• Generic programming – an algorithm can
• C++ is a statically typed, compiled, be designed to accept a wide variety of
general-purpose, case-sensitive, free- types as long as they meet the
form programming language that algorithm’s requirements on its
supports procedural, object-oriented, and arguments.
generic programming.
• C++ is regarded as a middle-level Using IDE
language, as it comprises a combination An Integrated Development Environment
of both high-level and low-level language (IDE) is an application used to write,
features. compile, and execute C/C++ programs
• C++ was developed by Bjarne Stroustrup STEPS FOR C++ PROGRAM DEVT AND
starting in 1979 at Bell Labs in Murray EXECUTION:
Hill, New Jersey, as an enhancement to • Editing
the C language and originally named C • Compiling
• Linking Library Files
with Classes but later it was renamed C++
• Loading
in 1983.
• Execution
• C++ is a superset of C, and that virtually
any legal C program is a legal C++
Parts of Coding C++
program.