CH15 Assessment Flashcards

1
Q

Interpret the following logic. A law enforcement agency has received data indicating that there are ten current threats to public safety. What is the threat level?

if threats < 3, level is “green”
else if threats < 6, level is “yellow”
else if threats < 9, level is “orange”
else if threats < 12, level “red”
else level is “emergency”

  A. green 
  B. orange 
  C. yellow 
  D. red 
  E. emergency
A

D. Red

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

You are creating a function that must return either True or False. Which data type should the function return?

A

Boolean

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which type of coding practice uses smaller code modules working together to support an application?

A

Microservices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the SDLC phase is the shortest in duration?

A

Deployment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

A programmer needs to write code that has direct access to the computer’s hardware. Which is the best type of language for the programmer to use?

A. Compiled
B. Query
C. Interpreted
D. Assembly

A

D. Assembly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which of the following is an example of Markup Language?

A. XML
B. SQL
C. Python
D. Java

A

A. XML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following terms describe concepts related to breaking code into smaller, repeatable sections? (Choose Two)

A. Methods
B. Objects
C. Variables
D. Containers
E. Functions
A

A. Methods

E. Functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which SDCL phase involves the use of a Flowchart?

A

Design

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which of the following programming language types is the lowest-level language?

A

Assembly

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What type of high-level programming language is translated into machine code once and then executed many times?

A

Compiled

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

You are using the C programming language to create a software solution. A single variable must be tested for multiple possible values. Which programming construct is best suited to achieve this?

A. Select Case
B. Switch
C. IF
D. While

A

B. Switch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In OOP, which of the following are integral parts of objects? (Choose Two)

A. Properties
B. Variables
C. Arrays
D. Attributes

A

A. Properties

D. Attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which of the following programming languages requires a compiler?

A. Microsoft PowerShell
B. Assembly
C. Linux Bash
D. C

A

D. C

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

You are working with file system objects in your code. You need to determine the modification timestamp for a file. What should you reference?

A

Property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which term describes running an action against an object variable?

A

Method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

A developer needs to use a code designation for non-English letters. Which national system does the developer need to use?

A. ASCII
B. Unicode
C. Strings
D. International

A

B. Unicode

17
Q

You have created an array that can hold 15 items, all of the integer data type. You want to add a 16th integer. Which of the following is the BEST approach to this?

A. Create a separate variable for the 16th Integer.
B. Create a Vector and replace the array with it.
C. Add it to the Existing Array
D. Create a new array, that can hold 16 integers, copy all the first array to it, then add the 16th integer.

A

B. Create a Vector and Replace the Array with it.

18
Q

Which of the following are examples of interpreted languages? (Choose Two)

A. Query
B. Markup
C. Scripted
D. Compiled

A

B. Markup

C. Scripted

19
Q

Which of the following are examples of OOP languages? (Choose Two)

A. Java
B. SQL
C. XML
D. C
E. Python
A

A. Java

E. Python

20
Q

Your code needs to execute the same code for each month of the year, so 12 times. Which type of loop is best suited for this?

A

FOR

21
Q

Which of the following statements is true regarding arrays and vectors?

A. Arrays contain one data type and are fixed in length. Vectors can have multiple data types and are dynamic in length.
B. Arrays contain one data type and are dynamic in length. Vectors can have multiple data types and are fixed in length.
C. Arrays can have multiple data types and are fixed in length. Vectors have one data type and are dynamic in length.
D. Arrays can have multiple data types and are dynamic in length. Vectors have one data type and are fixed in length.

A

A. Arrays contain one data type and are fixed in length. Vectors can have multiple data types and are dynamic in length.

22
Q

What type of programming language is designed to retrieve data from a database?

A

Query

23
Q

Which of the following numbers is written in HEX format?

A. 100101.11
B. 3268
C. 18AF
D. 100101

A

C. 18AF

24
Q

Looping logic makes use of which of the following statements?

A. WHEN
B. IF
C. WHILE
D. LOOP

A

C. WHILE

25
Q

Interpret the following logic. For data input for someone who is 20 years old, which category will they fall into?

  if age < 13, category is "child"
  else if age < 20, category is "teen"
  else if age < 65, category is "adult"
  else category is "senior"

A. Child
B. Adult
C. Teen
D. Senior

A

B. Adult