0% found this document useful (0 votes)
21 views10 pages

Prog Reviewer

The document provides an overview of computer programming concepts including what programming is, different types of programming languages, programming paradigms, the program development life cycle, and basic C++ concepts like variables, data types, input/output statements, and expressions. Key topics covered include what a compiler and interpreter are, structured and object-oriented programming, and C++ features such as namespaces, data types, and arithmetic operators.

Uploaded by

Tsuki ninam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
21 views10 pages

Prog Reviewer

The document provides an overview of computer programming concepts including what programming is, different types of programming languages, programming paradigms, the program development life cycle, and basic C++ concepts like variables, data types, input/output statements, and expressions. Key topics covered include what a compiler and interpreter are, structured and object-oriented programming, and C++ features such as namespaces, data types, and arithmetic operators.

Uploaded by

Tsuki ninam
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 10

Lesson 1

According to Bebbington computer programming is the process of


designing and building an executable computer program to accomplish
a specific computing result.

Programming means giving a mechanism the direction to accomplish a


task.

Computer programs These instructions that are given to a computer.

Programmers are the people who write these instructions.

Programming languages to write computer instructions, programmers


use a specific set of language,

Machine language all data is represented by microscopic switches that


can be either off or on. 0s and 1s. Represents only the way to
communicate directly with the computer.

Assembly language Slightly more advanced programming language.

Mnemonics memory aids, alphabet abbreviations for instructions.

High level language represents the next major development in


programming languages.

Compiler translates all of program’s high-level instructions before


running the program

Interpreter translates the instructions line by lune as the program is


running.
Two types of Programming paradigm

Programming paradigms are a way to classify programming languages


based on their features.

Structured Programming

Procedure- oriented programming the programmer determines and


controls the order in which the computer processes the instructions.

COBOL (Common Business Oriented Language), BASIC (Beginner’s All-


Purpose Symbolic Instruction Code)

Sequence Structure one after another, in the order listed in the program.

Selection Structure followed by an appropriate action derived from that


decision.

Repetition Structure to repeat one or more instructions until some


condition is met. The repetition structure is also referred to as a loop or
as iteration.

Object-oriented language requires the programmer to focus on the


objects that the program can use to accomplish its goal.

Program Development Life Cycle

1. Analyze the problem .

2. Design the algorithm.

3. Implement the algorithm.

4. Test and Verify program.


5. Maintain and update program.

Input items are needed to achieve the goal.

Output the goal of solving the problem.

Algorithm step by step instruction that accomplish a task.

Pseudocode composed of short English statement and means false


code.

Flowchart standardized symbols to visualize depict an algorithm.

Oval start/end

Arrow connector that shows the relationship between representative


shapes.

Parallelogram represents input and output.

Rectangle represents a process.

Diamond indicates a decision.

Bugs indicate that the program contains errors.

Debugging locating and correcting a bug in a program.

Syntax error occurs when you break one of the programming language’s
use.

Logic error can occur for a variety of reasons.

Source code a computer program before it is compiled.


IDE (Integrated Development Environment) examples code blocks.

Lesson 2

Bjarne Stroustrup developed C++ middle-level programming language in


1979 at bell labs.

Applications of C++ Programming

 Applications Software Development

 Programming Languages Development

 Computation Programming

 Games Development

 Embedded System

using namespace std; tells that compiler to use the std namespace.

int main where that program execution begins.

return 0; terminate main function.

Semicolon statement terminator.

Block set of logically connected statements that are surrounded by open


and closing braces.
Identifier is used to identify a variable, function, class module or any
other used-defined item.

Manpower and manpower two different identifier in C++.

Whitespace to describe blanks, tabs, newline characters and comments.

C++ Data types

Bool stores either value true or false.

char typically a single octet (one byte).

int the most natural size of integer for the machine.

float single precision floating point value.


double double precision floating point value.

void represents the absence of type.

wchar_t wide character type.

Variable declaration provides assurance to the compiler that there is


one variable existing with the given type.

Local variables that are declared inside function or block of code.

Global variables outside of all functions.

Initialization of Variables

 C-like initialization

 Constructor initialization

 Uniform initialization

Input/Output Statement

Streams input and output is performed in the form of a sequence of


bytes or more.

Input stream the direction of flow of bytes is from the device to the main
memory.

Output stream the direction of flow of bytes from the memory the device.

iostream stands for input-output stream.


iomanip input-output manipulators.

fstream describes the file stream.

Standard output stream (cout) the standard device is the display screen.

Standard input stream (cin) the input device.

C++ Expressions

Expressions an operator and any of its operands taken together


constitute.

Arithmetic expressions contain arithmetic operators.

String expressions contain string operators.

Logical expressions contain relational and logical operators.

Arithmetic Operators
Relational Operators

Logical operators
Lesson 3

Rules apply to a switch statement

You might also like