Software Design Chapter 1-4

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

1/114

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

115 Terms

1
New cards

Which of the following is not an example of application software?

Microsoft Word

Windows

PowerPoint

A web browser

Windows

2
New cards

The ____ cycle is used by the CPU to execute instructions in a program.

decode-fetch-execute

decode-execute-fetch

fetch-decode-execute

execute-fetch-decode

fetch-decode-execute

3
New cards

Assembly language is referred to as a high-level language because it is similar to the C++ language.

True

False

False

4
New cards

________ is the coding scheme that contains a set of 128 numeric codes which are used to represent characters in a computer's memory.

Unicode

ASCII

Binary numbering

Two’s complement

ASCII

5
New cards

Interpreted programs always execute faster than compiled programs.

True

False

True

6
New cards

A syntax error does not prevent a program from being compiled and execute.

True

False

False

7
New cards

IDEs are specialized software packages that help programmers write programs.

True

False

True

8
New cards

The physical devices that make up a computer are its ________.

software

applications

hardware

CPU

hardware

9
New cards

Which of the following is not an example of operating system software?

Microsoft Word

Windows

Linux

Mac OS X

Microsoft Word

10
New cards

Which of the following functions does an interpreter perform with the instructions from a high-level language?

It translates

It compiles

It compiles and translates

It executes

It translates and execute

It compiles and executes

It translates and execute

11
New cards

________ is the term used for a set of rules that must be strictly followed when writing a program.

Semantics

Syntax

Grammer

Key words

Syntax

12
New cards

The main reason to use secondary storage is to hold data for long periods of time, even when the power to the computer is turned off.

True

False

True

13
New cards

Computers can do many different jobs because they are ________.

programmable

reliable

automated

electronic

programmable

14
New cards

USB drives store data in a special type of memory known as ___.

magnetic memory

flash memory

optical server memory

disks

flash memory

15
New cards

The statements that a programmer writes in a high-level language are called ________.

binary code

pseudocode

source code

processor code

source code

16
New cards

________ is used to encode real numbers to store them in the computer's memory.

Floating-point notation

Unicode

Assembly language

RAM

Floating-point notation

17
New cards

RAM is volatile memory which means it cannot be erased.

True

False

False

18
New cards

A(n) ________ is a software package that usually consists of a text editor, a compiler or interpreter, and tools to test and debug programs.

compiler

CPU

storage device

IDE

IDE

19
New cards

A(n) ________ is a program that translates a high-level language into a machine language program.

compiler

CPU

storage device

IDE

compiler

20
New cards

What is syntax?

the symbols or words that perform operations in a program

21
New cards

What is the largest value that can be stored in one byte?

255

128

8

16

255

22
New cards

Programs that use an interpreter generally execute faster than compiled programs because they are already entirely translated into machine language when executed.

True

False

False

23
New cards

Which of the following companies does not manufacture microprocessors?

Intel

Dell

AMD

Motorola

Dell

24
New cards

________ refers to the physical components that a computer is made of.

The device

Hardware

Software

The system

Hardware

25
New cards

________ is the encoding technique used to store negative numbers in the computer's memory.

Unicode

ASCII

Floating-point notation

Two’s complement

Two’s complement

26
New cards

________ is an extensive encoding scheme that is compatible with ASCII.

Floating-point notation

Unicode

Assembly language

RAM

Unicode

27
New cards

The first high-level programming language that could perform complex mathematical calculations was ________.

COBAL

C++

FORTRAN

Ada

FORTRAN

28
New cards

System software typically includes applications that people normally use most often on their computers, such as word processing programs, games, or web browsers.

True

False

False

29
New cards

The following is an example of an instruction written in the ________ computer language.

1011000 010100110

C++

Assembly

Java

machine language

machine language

30
New cards

The computer language that uses mnemonics for writing programs is ________.

Assembly

Ada

Java

Pascal

Assembly

31
New cards

The term ________ can be used to describe anything that uses binary numbers.

digital

computer

mnemonic

processor

digital

32
New cards

Application software refers to ________.

programs that make the computer useful to a user

the operating system

key words

mobile devices

programs that make the computer useful to a user

33
New cards

A computer system consists of all of the following except ________.

the CPU

main memory

the operating system

input and output devices

the operating system

34
New cards

A bit that is turned off is represented by the value -1.

True

False

False

35
New cards

Programs that make a computer useful for everyday tasks are known as ________.

system software

application software

IDEs

operating systems

application software

36
New cards

Each different type of CPU has its own ________.

syntax

high-level language

machine language

software

machine language

37
New cards

The CPU understands binary instructions.

True

False

True

38
New cards

A program is a sequence of instructions stored in ________.

the CPU

the computer’s memory

software

the operating system

the computer’s memory

39
New cards

Software refers to ________.

programs

physical components of a computer

the CPU

data stored in RAM

programs

40
New cards

Main memory is also called ________.

ROM

RAM

the hard drive

secondary storage

RAM

41
New cards

The ________ structure consists of a set of statements that execute in the order in which they appear.

control

decision

repetition

sequence

sequence

42
New cards

What is the error in the following pseudocode?

Declare Integer widgets

Declare Real cost

Set widgets = 3.5

Set cost = widgets * 5

widgets is an invalid variable name for this code.

You cannot mix a Real variable and an Integer variable in a program.

widgets has been declared as an Integer and cannot hold a floating-point value.

There is no error

widgets has been declared as an Integer and cannot hold a floating-point value.

43
New cards

Flowcharts and pseudocode documents are the same thing.

True

False

False

44
New cards

What is the value of the variable result in the following expression?

Set result = (6+8)*4/2

22

7

28

10

28

45
New cards

The structure of the camelCase naming convention is to write the first word of the variable name in lowercase letters and then to capitalize the first character of the second and subsequent words.

True

False

True

46
New cards

The process of stepping through each of a program's statements, one by one, to see what each statement does is known as _____.

debugging

executing

hand tracing

bug checking

hand tracing

47
New cards

A variable declaration typically specifies the variable's ________ and ________.

name, value

data type, value

number, name

name, data type

name, data type

48
New cards

A(n) ________ is a diagram that graphically depicts the steps that take place in a program.

flowchart

algorithm

pseudocode document

code list

flowchart

49
New cards

A(n) ________ is a name that represents a value which cannot be changed during the program's execution.

uninitialized variable

named constant

input variable

named varibale

named constant

50
New cards

In a mathematical expression, addition and subtraction will be evaluated before multiplication.

True

False

False

51
New cards

What is the error in the following pseudocode?

Declare String user

Display “How many widgets do you want to buy?”

Input user

user is an invalid variable name for this code.

The Input statement should be the first statement.

user has been used before it is declared.

The input is a number, not a string.

The input is a number, not a string.

52
New cards

What is the error in the following pseudocode?

Display “What is your name?”

Input userName

Declare String userName

userName is an invalid variable name.

The Input statement should be the first statement.

userName has been used before it is declared.

There is no error

userName has been used before it is declared.

53
New cards

Which of the following is not a variable data type?

Integer

Real

Numeral

String

Numeral

54
New cards

What is the value of the following expression?

(12-4)*3/2+9

21

15

-6

2.18

21

55
New cards

The following two expressions will always yield identical results:

(a+b)/c

a+b/c

True

False

False

56
New cards

What symbol is used to mark the beginning and end of a string?

a slash /

an asterisk *

a quote mark “

a semicolon ;

a quote mark “

57
New cards

Pseudocode is often used to plan out a program because the programmer does not have to worry about syntax rules.

True

False

True

58
New cards

Which of the following is not an actual programming language?

C++

Python

Pseudocode

Java

Pseudocode

59
New cards

What is the value of the variable result in the following expression?

Set results = (6+8)/4×2

22

7

28

10

7

60
New cards

Which of the following would cause an error in a program?

attempting to store a floating-point value in a variable with Integer data type

attempting to store a floating-point value in a variable with String data type

attempting to store an integer in a variable with String data type

All of these would cause errors

All of these would cause errors

61
New cards

Which of the following error types produces incorrect results but does not prevent the program from running?

syntax

logic

human

grammer

logic

62
New cards

What is the value of the following expression?

12-4×3/2+9

21

15

-6

2.18

15

63
New cards

A(n) ________ symbol is used for an assignment statement in a flowchart.

parallelogram

oval

processing

triangle

processing

64
New cards

The program development cycle is made up of ________ steps that are repeated until no errors can be found in the program.

five

four

three

two

five

65
New cards

The ________ operator is used to raise 5 to the second power.

MOD

^

/

*

^

66
New cards

What does the following expression evaluate to, given that a = 3 and b = 6?

(a ≠ b) AND (b>a)

True

False

True

67
New cards

An If-Then-Else statement must be used to write a single alternative decision structure.

True

False

False

68
New cards

A nested decision structure can be used to test more than one condition.

True

False

True

69
New cards

A case structure is a ________ alternative decision structure.

single

dual

multiple

All of these

multiple

70
New cards

In a flowchart, the ________ symbol indicates that some condition must be tested.

rectangle

oval

parallelogram

diamond

diamond

71
New cards

In many languages, the case structure is called a ________ statement.

branch

jump

selective

switch

switch

72
New cards

The short-circuit evaluation is always performed with all expressions that contain any logical operators.

True

False

False

73
New cards
<p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">If the following pseudocode was coded and run, what would display, given that </span><span style="font-family: Courier New">rate = 8</span><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">?</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">A</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">B</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">C</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">Rating not possible</span></p>

If the following pseudocode was coded and run, what would display, given that rate = 8?

A

B

C

Rating not possible

B

74
New cards
<p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">If the following pseudocode was coded and run, what would display, given that </span><span style="font-family: Courier New">rate = 9</span><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">?</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">A</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">B</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">C</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">Rating not possible</span></p>

If the following pseudocode was coded and run, what would display, given that rate = 9?

A

B

C

Rating not possible

B

75
New cards

The first line of a case structure starts with the word CASE, followed by the test expression.

True

False

False

76
New cards

What does the following expression evaluate to, given that a = 3 and b = 6?

(a == b) OR (b>a)

True

False

NOT

cannot tell

True

77
New cards

The OR operator will evaluate to True only if both subexpressions are also True.

True

False

False

78
New cards

Decision structures and selection structures are completely different.

True

False

False

79
New cards

The following statement will evaluate to True:

(5>6) AND (12<14)

True

False

False

80
New cards

A decision structure will produce unpredictable results if the programmer does not use proper indentation in the pseudocode.

True

False

False

81
New cards

The ________ operator is a unary operator, which means it works with only one operand.

AND

OR

NOT

All are unary operators

NOT

82
New cards

Which of the following expressions would check if a number, x, is outside the range 90 - 100, inclusive (i.e., either less than 90 or greater than 100)?

x < 90 AND x > 100

x <= 90 AND x >= 100

x < 90 OR x > 100

x <= 90 OR x >= 100

x < 90 OR x > 100

83
New cards
<p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">Given the following pseudocode, what would display if this pseudocode was coded and executed, given that </span><span style="font-family: Courier New">examGrade = 73</span><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif"> and </span><span style="font-family: Courier New">homeworkGrade = 67</span><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">?</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">You are doing very well!</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">Study harder for the next exam. See me for help with homework.</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">Study harder for the next exam. See me for help with homework. Let’s talk about your grades.</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">Let’s talk about your grades.</span></p>

Given the following pseudocode, what would display if this pseudocode was coded and executed, given that examGrade = 73 and homeworkGrade = 67?

You are doing very well!

Study harder for the next exam. See me for help with homework.

Study harder for the next exam. See me for help with homework. Let’s talk about your grades.

Let’s talk about your grades.

Let’s talk about your grades.

84
New cards
<p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">What would be displayed if the following pseudocode was coded and executed?</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">These animals are the same</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">These animals are different</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">These animals are the same. These animals are different.</span></p><p>puppy   kitten   These animals are <span>different</span>.</p>

What would be displayed if the following pseudocode was coded and executed?

These animals are the same

These animals are different

These animals are the same. These animals are different.

puppy kitten These animals are different.

puppy kitten These animals are different.

85
New cards

What type of operator determines whether a specific relationship exists between two values?

Boolean

logical

relational

mathematical

relational

86
New cards

Which of the following operators is used in most languages to test if two operands do not have the exact same value?

==

!

=!

!=

!=

87
New cards

Which of the following expressions would check if a number, x, is between 90 and 100, inclusive?

x > 90 AND x < 100

x >= 90 AND x <= 100

x > 90 OR x < 100

x >= 90 OR x <= 100

x >= 90 AND x <= 100

88
New cards

The following statement will evaluate to True:

(5>6) OR (12<14)

True

False

True

89
New cards

Which of the following is not a logical operator?

AND

OR

NOT

all are logical operators

all are logical operators

90
New cards
<p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">What would be displayed if the following pseudocode was coded and executed, with </span><span style="font-family: Courier New">salary = 400</span><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">?</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">80</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">400</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">410</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">480</span></p>

What would be displayed if the following pseudocode was coded and executed, with salary = 400?

80

400

410

480

480

91
New cards

The While loop gets its name from the way it works: It does a task while a condition is false.

True

False

False

92
New cards

The following is an example of a ________ loop.

While x < 10
Set sum = sum + x
Set x = x + 1
End While

count-controlled

condition-controlled

While

Do-While

count-controlled

93
New cards

The amount by which the counter variable is incremented or decremented in a For loop is known as the ________.

incremental value

step amount

accumulator

counter index

step amount

94
New cards

Which type of loop repeats a statement or set of statements as long as the Boolean expression is false?

Do-While

For

While

Do-Until

Do-Until

95
New cards

You can only use positive integers as step values in a For statement.

True

False

False

96
New cards

A condition-controlled loop can be used to iterate the body of the loop a specific number of times.

True

False

True

97
New cards

A(n) ________ represents a special value that marks the end of a list of values.

sentinel

Step

End For

counter

sentinel

98
New cards
<p>I<span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">n the following pseudocode, which value is the accumulator?</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">x</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">m</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">x+m</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">There is no accumulator</span></p>

In the following pseudocode, which value is the accumulator?

x

m

x+m

There is no accumulator

x

99
New cards

Select all that apply. Which of the following cause(s) a statement or set of statements to repeat as long as a condition is true?

While loops

Do-While loops

Do-Until loops

For loops

While loops

Do-While loops

For loops

100
New cards
<p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">How many times would the following loop iterate?</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">0</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">4</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">5</span></p><p><span style="font-family: Lato Extended, Lato, Helvetica Neue, Helvetica, Arial, sans-serif">infinite</span></p>

How many times would the following loop iterate?

0

4

5

infinite

0