Software Development Flashcards
Objective 4
A programmer needs an element that will automatically store customer orders consecutively by order number every time a new order is placed. Which of the following elements should be used?
A. Vector
B. Sequence
C. Array
D. Constant
B. Sequence
A sequence is a data structure that automatically maintains the order of elements in which they were added or inserted. In the context of the programmer’s requirement to store customer orders consecutively by order number every time a new order is placed, a sequence would be the most appropriate choice.
A programmer is generating results by iterating rows that provide values needed for one calculation. Which of the following functions best accomplishes this task?
A. Branching
B. Pausing for input
C. Sorting
D. Looping
D. Looping
Looping is a programming construct that allows a programmer to execute a block of code repeatedly based on a condition or for a specific number of iterations. In this scenario, where a programmer needs to iterate through rows to perform calculations, looping would be the most appropriate function. The programmer can use loop statements such as “for” loops or “while” loops to iterate over the rows of data and perform the necessary calculations.
A programming construct that is most beneficial for organizing a program’s data and behavior is:
A. an object.
B. a licensing agreement.
C. a query.
D. a constant.
A. An Object.
organizing data and behavior
An object is a programming construct that encapsulates both data (attributes or properties) and behavior (methods or functions) into a single entity. This concept is fundamental to object-oriented programming (OOP) paradigms, where objects represent real-world entities or abstract concepts. Objects allow for the organization of a program’s data and behavior into modular, reusable components, promoting code organization, maintainability, and scalability.
Which of the following programming concepts uses properties and attributes?
A. Objects
B. Functions
C. Containers
D. Identifiers
A. Objects
In programming, objects are instances of classes or data structures that encapsulate data (properties) and behavior (methods or functions). Properties represent the characteristics or attributes of an object, while methods represent the actions or behaviors that the object can perform. For example, in object-oriented programming languages like Java or Python, you can define a class called “Car” with properties such as “color,” “make,” and “model,” and methods such as “drive” and “stop.” Objects created from this class would have specific values assigned to their properties and could perform actions using their methods.
Given the following lines: This is an example of:
If child 1 is fed AND child 2 is fed
Echo “dinner is complete!” and set spouse to satisfied
Else echo “Please feed the kids!”
A. a flowchart.
B. looping.
C. an assembly.
D. pseudocode.
D. Pseudocode
Pseudocode is a high-level description of a computer program or algorithm that uses natural language and structured formatting to outline the logic and steps of the program without adhering to the syntax of a specific programming language. Pseudocode is often used as an intermediate step in program development to plan and design algorithms before implementing them in code. The given lines represent a logical condition (If-Else statement) written in pseudocode to describe a scenario where dinner is considered complete if both child 1 and child 2 are fed, and the spouse is then set to satisfied. If either child 1 or child 2 is not fed, a message is echoed indicating that the kids need to be fed.
Which of the following is an example of a compiled language?
A. C++
B. SQL
C. Python
D. XML
A. C++
Python, XML = interpreted, SQL = database language
A compiled language is a programming language whose source code is translated into machine code (binary code) before execution. C++ is a compiled language where the source code is compiled into executable machine code, which can then be directly executed by the computer’s hardware.
Which of the following data types should a database administrator use to store customer postal codes?
A. Float
B. String
C. Boolean
D. Integer
B. String
Postal codes typically contain alphanumeric characters and may include special characters like hyphens or spaces. Therefore, using a string data type (also known as VARCHAR or CHAR) allows for the storage of variable-length character sequences, making it suitable for storing postal codes of varying formats and lengths.
Given this example:
FEB8077911AB12TB -
Which of the following is being represented?
A. MAC address
B. String
C. Hexadecimal
D. Unicode
B. String
In computer programming, a string is a sequence of characters, which can include letters, numbers, and special symbols. The example provided (“FEB8077911AB12TB”) is a sequence of characters, resembling a string of alphanumeric characters. It does not appear to follow any specific encoding or representation pattern such as hexadecimal or Unicode. Hence, the most suitable classification for this example is as a string.
a.MAC Addresses use Hexidecimal (0-9, A-F)
c.Hexadecimal is a notational system 0-9 and A-F
d. Is the standard for all the languages, universal code.
Which of the following scripting languages is most likely to be used in a Linux command-line environment?
A. JavaScript
B. PowerShell
C. C++
D. Bash
D. Bash
JavaScript, PowerShell = types of interpreted, C++ = compiled
Bash (Bourne Again Shell) is a command language interpreter for Unix and Linux operating systems. It is the default shell for most Linux distributions and provides a powerful scripting environment for automating tasks, managing system configurations, and executing commands. Bash scripts, written in the Bash scripting language, are commonly used to create automated workflows, system administration tasks, and custom utilities within the Linux command-line environment.
Which of the following language types is MOST likely used to retrieve data from a database?
A. Query language
B. Scripted language
C. Assembly language
D. Compiled language
A. Query Language
A query language, such as SQL (Structured Query Language), is specifically designed for retrieving data from databases. SQL allows users to interact with databases by querying and manipulating data, retrieving specific information based on criteria specified in the query.
Which of the following shows how many results are possible when evaluating Boolean data types?
A. Two
B. Four
C. Three
D. Five
A. Two
Boolean data types can represent only two possible values: true or false. Therefore, when evaluating Boolean data types, there are two possible results: true or false.
Which of the following is the exact number of bytes in a gigabyte?
A. 1,024 bytes
B. 1,048,576 bytes
C. 1,073,741,824 bytes
D. 1,099,511,627,776 bytes
C. 1,073,741,824 bytes
0 comma = B
1 comma = KB
2 commas = MB
3 commas = GB
4 commas = TB
A gigabyte (GB) is equal to 1,073,741,824 bytes. This is the binary definition of a gigabyte, based on the binary prefix “giga” which represents 2^30 bytes.
A programmer wants to use a programming language in which high performance is a requirement. Which of the following language types is the BEST option?
A. Markup language
B. Scripting language
C. Compiled language
D. Interpreted language
C. Compiled Language
high performance
Compiled languages are translated directly into machine code that the processor can execute. They are often chosen for projects where high performance is a requirement because the code is translated into efficient machine code before execution, resulting in faster performance compared to interpreted languages.
A consultant is designing a flowchart for a presentation. The flowchart uses red arrows to guide viewers to the next object. Which of the following represents the function being used?
A. Engagement
B. Sequence
C. Exit strategy
D. Color-coding
D. Sequence
The use of arrows in a flowchart represents the sequence or order of steps or processes. Red arrows guiding viewers to the next object indicate the flow or sequence of the steps in the flowchart, helping viewers understand the order in which things should be done.
Which of the following is a programming language data type that contains a list of related values, such as colors?
A. String
B. Array
C. Float
D. Boolean
B. Array
keyword = list
An array is a data structure that can hold a fixed-size sequential collection of elements of the same type. It is used to store a collection of related values under a single variable name. Arrays are particularly useful for storing lists of related values, such as colors, because they allow for easy access to individual elements based on their position within the array.