Review 2 Flashcards
Which of the following numbers is written in hexadecimal format?
A. 100101
B. 3268
C. 18AF
D. 100101.11
18AF
Hexadecimal is also known as base 16. It uses the numbers 1 to 9 and letters A to F.
Which of the following terms describe concepts related to breaking code into smaller, repeatable sections? (Choose two.)
A. Functions B. Variables C. Containers D. Methods E. Objects
Functions and methods
Functions and methods are used to break code into small, reusable segments.
Which of the following are examples of object-oriented programming languages? (Choose two.)
A. Java B. XML C. Python D. C E. SQL
Java and Python
Java and Python are considered object-oriented languages, as are C++, C#, PHP, Perl, and Ruby.
Which of the following statements is true regarding arrays and vectors?
A. Arrays contain one data type and are dynamic in length. Vectors can have multiple data types and are fixed in length.
B. Arrays can have multiple data types and are fixed in length. Vectors have one data type and are dynamic in length.
C. Arrays can have multiple data types and are dynamic in length. Vectors have one data type and are fixed in length.
D. Arrays contain one data type and are fixed in length. Vectors can have multiple data types and are dynamic in length.
Arrays and vectors are containers for data. An array can have only one data type and is fixed in length. Vectors are more flexible, containing multiple data types and being dynamic in length.
A developer needs to use a code designation for non-English letters. Which notational system does the developer need to use?
Unicode
ASCII and Unicode are used for numerical representations of letters and symbols. ASCII covers English letters and some symbols. For non-English, use the superset of ASCII called Unicode.
Which of the following are examples of interpreted languages? (Choose two.)
A. Compiled
B. Query
C. Scripted
D. Markup
Scripted and Markup
The three classes of interpreted languages are scripting, scripted, and markup languages.
What type of high-level programming language is translated into machine code once and then executed many times?
A. Compiled
B. Scripted
C. Scripting
D. Markup
Compiled
Compiled language programs are compiled once and then executed as many times as needed. Scripted, scripting, and markup languages are interpreted languages, which are not compiled with a compiler.
A programmer wants to write code that directly accesses the computer’s hardware. Which is the best type of language for the programmer to use?
Assembly
Assembly is the lowest-level programming language, and it is used when developers want to access computer hardware directly.
Interpret the following logic. For data input on someone who is 20 years old, which category will they fall into?
if age < 13, then category “Child”
else if age < 20, then category “Teen”
else if age < 65 then category “Adult
Adult
The logic says that anyone younger than 20 is a teen, while anyone younger than 65 is an adult. Since this person is 20 exactly, they are in the Adult category.
A programmer is writing a program that needs to accept an input of someone’s name. What type of variable should the programmer create?
String
A string is a group of characters—technically, zero or more characters, but not having a fixed length.
Looping logic makes use of which of the following statements?
A. while
B. when
C. loop
D. if
Looping logic is characterized by the while statement.
In object-oriented programming, which of the following are integral parts of objects? (Choose two.)
A. Arrays
B. Properties
C. Attributes
D. Variables
Properties and Attributes
Objects are made up of properties, attributes, and methods. Arrays and variables could be part of an object but do not have to be.
A program shows the number 11010.11. Which data type is this?
Float
It’s a float data type, which is a number with a decimal place. It could be binary, but binary is a notational system, not a data type.
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 doing this?
A. Add it to the existing array.
B. Create a separate variable for the 16th integer.
C. Convert the integers to floats and add the 16th integer.
D. Create a vector and replace the array with it.
Create a vector and replace the array with it
Arrays are of a fixed length, so you can’t just add another variable if it’s at its maximum length. Vectors can have their length dynamically adjusted and might work better in this situation.
What type of programming language is designed to retrieve data from a database?
Query
Query languages are used to obtain data from databases.
Interpret the following logic. A law enforcement agency has received data indicating that there are ten current threats to public safety. What should the threat level be?
if threats < 3, then level “Green”
else if threats < 6, then level “Yellow”
else if threats < 9, then level “Orange”
else if threats < 12, then level “Red”
Red
The threat level should be red. Anything from 9 to 11 is in the red range.
Which of the following is an example of a markup language?
HTML or XML
You want to understand the sequence of a program, from start to finish. Which of the following is the best to use for this purpose?
A. Pseudocode
B. Function
C. Flowchart
D. Object
Flowchart
A flowchart is designed to depict visually the sequence of events and logic within a program.
Which of the following programming language types is the lowest-level language?
A. Assembly
Assembly is the lowest-level programming language. Interpreted and compiled are high-level languages, and query languages are used to get data from a database.
Flowcharts depict which one of the following?
A. Programs
B. Objects
C. Functions
D. Identifiers
A. Programs
A flowchart is a visual depiction of a program. It includes the logic components, inputs, and all other properties of the program.
You have an address book for a small business with contact information for about 100 clients. The address book is used by two people. Which solution should you use to store the data?
A. Spreadsheet
B. Relational database
C. Word processing software
D. Nonrelational database
Spreadsheet
For a small number of rows, with only two people accessing the data, a spreadsheet is fine in this situation.
A database developer is working on generating queries. If the developer needs to ensure that the output of the query has data persistence, to where should the data be written?
A. RAM
B. Cache
C. SSD
D. CPU
C. SSD
Data persistence means that the data is permanently available. Hard drives store data in a persistent way, so the answer is SSD.
Which of the following consists of columns and rows of numerical or text data?
relational database
A relational database has structured data, which is predictable and organized, with tables containing columns and rows of text or numerical data.
Joe creates a database. What does he need to do next to make it usable?
A. Enable permissions
B. Import data
C. Run queries
D. Create forms
import data
After a database is created, data needs to be imported or inputted.
A user, Ann, is granted permissions to access a database. What is this an example of?
Permissions are considered part of data definition.
A medical office needs to create a solution to manage patient records. They have about 10,000 patients and eight staff, they want to include notes from medical professionals, emails to and from patients, and images such as X-rays. What should they create?
A. Spreadsheet
B. Relational database
C. Nonrelational database
D. Primary key
nonrelational database
With different types of data, including images, the best choice for a database is a nonrelational database such as a document database or a key/value database.
You have created a relational database. Which of the following elements uniquely identifies a record in the database?
Primary key
A primary key is one or more fields whose data is used to uniquely identify a record.
Mary, an administrator, creates a field and designates it to hold integer data. Joe, a user, tries to enter his name into the field, but it doesn’t let him save the data. What is this an example of?
Constraints
Constraints can be placed on fields such that they will accept only certain types of data. For example, if a field is set to accept only integers, users will not be allowed to enter in text data.
Rachel, a database administrator, has created a database for her website. It contains pictures of vacations that people have uploaded. In the database, pictures have associated information about who uploaded them and the date. What is this an example of?
A. Semistructured data
B. Nonstructured data
C. Structured data
D. Schema definition
Semistructured data
Pictures by themselves would be nonstructured data, but since metadata is included, these pictures are classified as semistructured data.
Peter is accessing a database using a JDBC connection. Which of the following terms best describes the type of access he is using?
A. Direct/manual access
B. Programmatic access
C. User interface/utility access
D. Query/report builder
Using a JDBC connection to a database is an example of programmatic access.
Oscar’s user account has been granted permissions to view a database. Nathan then uses the deny command in an attempt to deny Oscar the ability to view the database and applies it to a group to which Oscar belongs. Which of the following statements is true?
A. Oscar will still be able to view the database because a grant overrides a deny.
B. Oscar will no longer be able to view the database because a deny overrides a grant.Your selection is incorrect
C. Oscar will no longer be able to view the database, because the deny cancels the grant, giving Oscar no specific permissions.
D. Oscar will still be able to view the database because granted permissions must be removed with the revoke command.
Oscar will not be able to view the database because if there is a permission conflict, a specific deny overrides a specific grant.
A school has a database with four tables, but it needs a fifth table. Which command is used to accomplish this task?
CREATE
The CREATE TABLE command is used to create new tables in a database.
Michael, an administrator, needs to add a column to an existing table. Which command should he use?
ALTER
You can use ALTER to add, delete, and modify columns.
Laura, your manager, instructs you to remove a table from a database permanently. Which command should you use?
DROP
Sometimes you need to delete tables or databases, and in database terms this is known as dropping. The DROP command is used for dropping a database or a table in a database.
Which of the following statements most accurately describes what a primary key refers to?
A. A schema in a database
B. A table in a schema
C. A field in a table
D. A record in a table
A primary key is one or more fields whose data is used to identify a record uniquely. They are required, and there can be only one primary key per table.
Kate, a database administrator, needs to add records into a database. Which command should she use?
INSERT
The INSERT command is used to insert records into an existing table.
Henry wants to understand which of his customers has purchased part number BB8. Which command should he use?
SELECT
The SELECT command is used to create queries to search for data.
George needs to remove a customer’s information completely from a table. Which command should he use?
DELETE
The DELETE command is used to remove records (rows) from a table.
Which of the following descriptions best describes the type of structure that stores values as blobs?
A. Relational database
B. Nonrelational database
C. Document database
D. Key/value database
Key/value database
In a key/value database, data is represented as a collection of key/value pairs. Keys are an arbitrary string of characters, such as filename or a URL, and must be unique. Values are stored as blobs, meaning that they don’t conform to a schema.
An employee at your office just got married and changed their last name. Which command do you use to change their last name in the employee database?
UPDATE
The UPDATE command is used to update existing data in the database.
You are configuring a computer to participate on a network. Which of the following are mandatory? (Choose two.)
A. IP address
B. Default gateway
C. DHCP server
D. Subnet mask
IP address and default gateway
For network communications on a TCP/IP network, an IP address and a subnet mask are required. If you want to communicate outside of your network, a default gateway is also required. DHCP servers automatically assign clients’ IP configuration information.
Which one of the following types of network connections can give you the highest data transfer rates?
A. T1
B. DSL
C. ISDN
D. Cellular
DSL
DSL, and broadband in general, can get up to around 50 Mbps without exploring fiber options. This is faster than T1 (1.544 Mbps), ISDN (the basic rate is 128 Kbps), or cellular (up to 20 Mbps).
You are configuring a wireless router to let clients get on the Internet while using private IP addresses. In this scenario, which of the following services do you need to make sure is enabled on the router?
NAT
Network Address Translation (NAT) is a service that runs on a router that translates private IP addresses into a public IP address so you can get on the Internet.
You have a scenario where you need to disable the guest network on your wireless router. You try to log in, but your password does not work. After several attempts, you realize that you forgot your password. What can you do?
Hold the reset button down for 30 seconds to reset the router.
Wireless routers will have a reset button on their bottom or back. Press and hold the button for about 30 seconds, and the router will reset to factory specifications. If you never changed the password, then using admin would work, but I am hoping you changed the password!
On Monday, you log into your computer at work, but you are not able to access any network resources. You run ipconfig and see that your IP address is 169.254.18.53. What is the most likely cause of the problem?
A. The DNS server is down.
B. The DHCP server is down.
C. The NAT server is down.
D. Your default gateway is set incorrectly.
The DHCP server is down.
The DHCP server automatically configures clients with TCP/IP information. If the server is not able to provide information, your computer will automatically configure itself with an APIPA address, which starts with 169.254.
Your friend Maria asks you which router feature provides for guaranteed bandwidth. What do you tell her?
QOS
Quality of Service (QoS) is a strategy that allows an administrator to control resources to maintain a certain service level. By using QoS, an administrator can set different priorities for one or more types of network traffic based on different applications, data flows, or users.
Which one of the following addresses is considered a private IP address?
A. 192.168.100.101
B. 168.192.100.101
C. 19.21.68.100
D. 172.15.100.101
192.168.100.101
Addresses that are in the 192.168.x.x range are private IP addresses, as are those in the 10.x.x.x range and the 172.16.x.x–172.31.x.x range.