COMPROG

studied byStudied by 7 people
0.0(0)
Get a hint
Hint

Algorithm

1 / 64

65 Terms

1

Algorithm

step by step solution to solve a problem or to accomplish specific task.

New cards
2

Flowchart

graphical representation of algorithm. There are symbols and illustration to use.

New cards
3

Pseudo code

tool to plan the algorithm and use short English statements.

New cards
4

Programs

- instruction given to a computer.

New cards
5

IPO Chart

use to organized the result of program analysis.

New cards
6

compiler

converts programming language program to machine language

New cards
7

Computer Programming

It means giving instruction or directions to accomplish specific task

New cards
8

Analyze the problem

- Problem outline and list of requirements.

New cards
9

Plan the algorithm

Design algorithm using pseudo-code, IPO and flowcharts.

New cards
10

Check the algorithm

Trace algorithm.

New cards
11

Code the algorithm into a program.

implement algorithms into code.

New cards
12

Maintenance

Evaluate and modify the program if necessary. IPO chart is also applicable.

New cards
13

Interpreter

converts programming languages to machine language line by line

New cards
14

Machine Language

Instructions written in 0s and 1s are called _______. ___________ language (each type of machine has its own language) represent the only way to communicate directly with the computer

New cards
15

dataType varaibleName = value;

Write Data Types Syntax

New cards
16

const dataType varaibleName = value;

Write Data type of const

New cards
17

Assembly language

it simplify the programmer’s job by allowing the programmer to use mnemonics in place of the 0s and 1s in the program

New cards
18

High level language

It represent the next major development in programming languages. These languages are a vast improvement over machine and assembly language because they allow the programmer to use instructions that more closely resemble the English language.

New cards
19

Process

indicates any type of internal operation inside the Processor or memory

New cards
20

input/output

used for any _____/______ operation. indicates that the computer is to obtain data or output results

New cards
21

Decision

used to ask a question that can be answered in a binary format (yes/no, true/false

New cards
22

Connector

Allows the flowchart to be drawn without intersecting lines or without a reverse flow

New cards
23

Pre-defined Process

Used to invoke a subroutine or an interrupt program

New cards
24

Terminal

indicates the starting or ending of the program, process, or interrupt program.

New cards
25

Flow lines

show direction of flow

New cards
26

identifiers

All C++ variables must be identified with descriptive unique names. These unique names are called

New cards
27

==

equal to

New cards
28

! =

not equal to

New cards
29

<=

less than or equal to

New cards
30

>=

greater than or equal to

New cards
31

Sequence

In a computer program, the _________ structure directs the computer to process program instructions, one after another, in the order listed in the programs.

New cards
32

Selection

indicates that a decision (based on some condition) needs to be made followed by an appropriate action derived from that decision.

New cards
33

Repetition

or loops, are used when a program needs to repeatedly process one or more instructions until some condition is met, at which time the loop ends. Many programming tasks are repetitive, having little variation from one item to the next

New cards
34

Control Structures

All computer programs, no matter how simple or how complex, are written using one or more of three basic structures: Sequence, Selection, and Repetition. These structures are called __________ or logic structures because they control the flow of a program’s logic.

New cards
35

while loop

The loop construct in C++ is used when the number of iterations is known beforehand is called _________

New cards
36

Pseudo Code

The short English statements that represent an algorithm are called ____________

New cards
37

braces

In a C++ program, the body of a function is enclosed in ______

New cards
38

Compiler

Most high-level languages use a(n) _________________________ to translate the instructions into a language that the computer can understand.

New cards
39

High Level Language

When writing a(n) _________________________ program, the programmer concentrates on the major tasks

needed to accomplish a goal.

New cards
40

Object Oriented Program

When writing a(n) _________________________ program, the programmer breaks up a problem into

interacting objects.

New cards
41

Sequence

a series of actions that is completed in a specific order. Action 1 is performed, then Action 2, then Action 3, etc,. until all of the actions in the sequence have been carried out.

New cards
42

Diamond symbol

denotes decision symbol to represent condition in the selection and repetition structures.

New cards
43

For LOOP (__________, _____, _____)

Initialization, condition , Update

New cards
44

Continue Statement

1. if the condition is true, the iteration is continued in the loop otherwise the loop will stop.

2. if inside the loop, the continue skips the statements and transfer to execute the next loop.

New cards
45

Break Statement

1. user is not sure about the input value of iteration

2. user wants to stop the program based on different condition.

3. use also in switch statements.

New cards
46

Exception Handling

is a way of handling errors that may occur while the program is running, like dividing any number by zero.

New cards
47

try, throw, and catch

Exception handling is built upon three keywords

New cards
48

Try

Block identifies a block of code for which particular exceptions will be activated. It's followed by one or more catch blocks.

New cards
49

Throw

− A program throws an exception when a problem shows up.

New cards
50

Catch

A program catches an exception with an exception handler at the place in a program where you want to handle the problem.

New cards
51

Selection Structure, Sequence Structure and Repetition

Three types of control structure

New cards
52

Control Structure

It answers either true or false, yes or no, 1 or 0. The computer choose to execute depending on the operation used.

New cards
53

Array

Collection of elements that are of the same type. Group of related variables that have the same name and data type.

New cards
54

False

((5!=3) && (6<5))

New cards
55

TRUE

((6 == 6) && (6>3))

New cards
56

True

((6 == 6) || (6 < 3))

New cards
57

False

((5 == 3) || (6<3))

New cards
58

When need to use exception handling:

1. No new allocating memory - sometimes the storage is full and cannot allocate memory.

2. Division by zero

3. Invalid function parameter - occur in function overloading.

New cards
59

Post Test Loops

Condition is evaluated or tested after

the instruction.

It processed at least once.

New cards
60

Pretest Loops

Condition is evaluated or tested

first before the instruction.

The instruction is executed if the

condition is TRUE.

The loop repeats after the

executing the instruction.

New cards
61

Identifiers

can be short names (like x and y) or more descriptive names (age, sum, totalVolume).

New cards
62

B. %

Which of the following is a character literal constant?

a. ‘56’

b. ‘%’

c. “a”

d. Both a and b

New cards
63

d. All of the Above

Which of the following is a string literal constant?

a. “$”

b. “Good Morning”

c. “”

d. All of the Above

New cards
64

int population = 10000;

Write a C++ statement that declares and initializes an int variable named population.

New cards
65

const double MAX_PAY = 25.55;

Write a C++ statement that declares the MAX_PAY named constant. The constant should have a double data type and contain the number 25.55

New cards

Explore top notes

note Note
studied byStudied by 18 people
... ago
5.0(1)
note Note
studied byStudied by 36 people
... ago
5.0(1)
note Note
studied byStudied by 9 people
... ago
5.0(1)
note Note
studied byStudied by 22 people
... ago
5.0(1)
note Note
studied byStudied by 6 people
... ago
5.0(1)
note Note
studied byStudied by 5 people
... ago
5.0(1)
note Note
studied byStudied by 12 people
... ago
5.0(1)
note Note
studied byStudied by 91 people
... ago
5.0(2)

Explore top flashcards

flashcards Flashcard (54)
studied byStudied by 33 people
... ago
5.0(1)
flashcards Flashcard (166)
studied byStudied by 76 people
... ago
5.0(2)
flashcards Flashcard (30)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (30)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (135)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (71)
studied byStudied by 3 people
... ago
5.0(1)
flashcards Flashcard (303)
studied byStudied by 15 people
... ago
5.0(1)
flashcards Flashcard (26)
studied byStudied by 20 people
... ago
5.0(2)
robot