COMPROG

0.0(0)
studied byStudied by 7 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/64

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

65 Terms

1
New cards

Algorithm

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

2
New cards

Flowchart

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

3
New cards

Pseudo code

tool to plan the algorithm and use short English statements.

4
New cards

Programs

- instruction given to a computer.

5
New cards

IPO Chart

use to organized the result of program analysis.

6
New cards

compiler

converts programming language program to machine language

7
New cards

Computer Programming

It means giving instruction or directions to accomplish specific task

8
New cards

Analyze the problem

- Problem outline and list of requirements.

9
New cards

Plan the algorithm

Design algorithm using pseudo-code, IPO and flowcharts.

10
New cards

Check the algorithm

Trace algorithm.

11
New cards

Code the algorithm into a program.

implement algorithms into code.

12
New cards

Maintenance

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

13
New cards

Interpreter

converts programming languages to machine language line by line

14
New cards

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

15
New cards

dataType varaibleName = value;

Write Data Types Syntax

16
New cards

const dataType varaibleName = value;

Write Data type of const

17
New cards

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

18
New cards

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.

19
New cards

Process

indicates any type of internal operation inside the Processor or memory

20
New cards

input/output

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

21
New cards

Decision

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

22
New cards

Connector

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

23
New cards

Pre-defined Process

Used to invoke a subroutine or an interrupt program

24
New cards

Terminal

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

25
New cards

Flow lines

show direction of flow

26
New cards

identifiers

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

27
New cards

==

equal to

28
New cards

! =

not equal to

29
New cards

<=

less than or equal to

30
New cards

>=

greater than or equal to

31
New cards

Sequence

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

32
New cards

Selection

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

33
New cards

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

34
New cards

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.

35
New cards

while loop

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

36
New cards

Pseudo Code

The short English statements that represent an algorithm are called ____________

37
New cards

braces

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

38
New cards

Compiler

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

39
New cards

High Level Language

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

needed to accomplish a goal.

40
New cards

Object Oriented Program

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

interacting objects.

41
New cards

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.

42
New cards

Diamond symbol

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

43
New cards

For LOOP (__________, _____, _____)

Initialization, condition , Update

44
New cards

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.

45
New cards

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.

46
New cards

Exception Handling

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

47
New cards

try, throw, and catch

Exception handling is built upon three keywords

48
New cards

Try

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

49
New cards

Throw

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

50
New cards

Catch

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

51
New cards

Selection Structure, Sequence Structure and Repetition

Three types of control structure

52
New cards

Control Structure

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

53
New cards

Array

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

54
New cards

False

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

55
New cards

TRUE

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

56
New cards

True

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

57
New cards

False

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

58
New cards

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.

59
New cards

Post Test Loops

Condition is evaluated or tested after

the instruction.

It processed at least once.

60
New cards

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.

61
New cards

Identifiers

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

62
New cards

B. %

Which of the following is a character literal constant?

a. ‘56’

b. ‘%’

c. “a”

d. Both a and b

63
New cards

d. All of the Above

Which of the following is a string literal constant?

a. “$”

b. “Good Morning”

c. “”

d. All of the Above

64
New cards

int population = 10000;

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

65
New cards

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