Domain 4

¡Supera tus tareas y exámenes ahora con Quizwiz!

A software developer wants to provide a compiled executable program to a customer. Which of the following computer languages would provide this capability? Correct Answer: Ruby Correct Answer: PowerShell Correct Answer: C++ Correct Answer: Perl

C++

A software developer is working on a website and has been tasked with adding interactive elements to it. Which of the following programming languages would work BEST for this task? HTML C++ JavaScript CSS

JavaScript

Alex is creating a loan program and need to use a program sequence repeatedly to calculate the interest for different loans. Which of the following is the BEST programming concept to accomplish the task? Correct Answer: An array Correct Answer: A function Correct Answer: A container Correct Answer: A boolean loop structure

A function

In programming, which of the following is the BEST use of a function? Correct Answer: Prevent unauthorized access to data Correct Answer: Bundle data and methods Correct Answer: Contain methods Correct Answer: Provide reusable code snippets

Provide reusable code snippets

Kris is creating the pseudocode for a program that needs a specific value that doesn't change. Which type of identifier is defined in the following pseudocode: declare pi as a float equal to 3.14 Correct Answer: Array Correct Answer: Variable Correct Answer: Constant Correct Answer: Container

Constant

A programmer is developing an application that will store names and addresses (street, city, state, and zip code). The zip code must be able to accommodate alphanumeric characters to accommodate international zip codes, such as Canada. Which data type should be used for the variable that will hold the zip code? Correct Answer: Integer Correct Answer: String Correct Answer: Float Correct Answer: Char

String

A method is declared within a class. Which of the following would be an example of a method for a Car class? Correct Answer: wheels Correct Answer: color Correct Answer: style Correct Answer: Start engine

Start engine

A programmer is developing a program that will list the order history for a customer. Which of the following data structures is the BEST one to use? Correct Answer: Variable Correct Answer: Constant Correct Answer: Function Correct Answer: Array

Array

Hans is programming a device driver that will interact directly with hardware. The language he's using is considered the most difficult human-readable language. Which of the following languages is he utilizing? Correct Answer: Interpreted Correct Answer: Markup Correct Answer: Compiled Correct Answer: Assembly

Assembly

A user is shopping online and has added two items to the cart. When the user clicks the Checkout button, the shopping cart programming logic checks to see if the user is logged in already. If the user is logged in, the checkout process continues, otherwise, the user is prompted to sign in. Which of the following describes the logical component being used? Correct Answer: Looping Correct Answer: Programming array Correct Answer: Branching Correct Answer: Encapsulation

Branching

Lisa is a software developer and needs to create a complied executable program for one of her clients. Which of the following is a compiled programming language she could use? (Select two.) JavaScript PHP Perl SQL C# Java

C# Java

Object-Oriented Programming (OOP) is a newer approach to programming where functionality is divided into smaller groups of tasks and actions. With OOP, you can model real world objects in a programming language. There are two main concepts. The first is like a template, and the second is the specific models built from the templates. What are these two concepts called? Values Classes Properties Objects Methods Attributes

Classes Objects

A programming paradigm is a method used to program a computer that guides the solving of a problem or performing of a task. Which of the following describes the procedural, or imperative, programming paradigm? Correct Answer: It uses a non-linear approach to solving problems. Correct Answer: It uses a domain-specific language (DSL) to instruct the program what needs to be done. Correct Answer: It uses a linear, top-down approach to solving problems. Correct Answer: It uses high-level instructions instead of detailed steps.

It uses a linear, top-down approach to solving problems.

Which of the following BEST describes a programming sequence? Correct Answer: A graphical representation of the program processes. Correct Answer: A list of steps written in pseudocode. Correct Answer: A list of subroutines used by a compiler. Correct Answer: A sequence of instructions that defines the input, processing, and output.

A sequence of instructions that defines the input, processing, and output.

Which of the following is a programming identifier that would be used to define values that don't change? Correct Answer: Constants Correct Answer: Vectors Correct Answer: Arrays Correct Answer: Variables

Constants

Which of the following is technically NOT a programming language? Correct Answer: JavaScript Correct Answer: Java Correct Answer: C++ Correct Answer: HTML

Correct Answer: HTML

What is the result of the following pseudocode when the value of currentDistance is 6? declare hike = 12 if currentDistance < hike display "Keep going, you can do it!" else if currentDistance >= hike display "Great job, you made it!" end Correct Answer: Keep going, you can do it! Correct Answer: Nothing. The comparison is never true. Correct Answer: Syntax error. Correct Answer: Great job, you made it!

Keep going, you can do it!

When programming a while statement, it is sometimes useful to use a logical NOT operator. The logical NOT operator reverses the logical state of an operand so that if the condition is normally true, the logical NOT operator makes it false. Which of the following is an example of a logical NOT operator? Correct Answer: (var1 = var2) || var3 Correct Answer: ~var1 Correct Answer: (var1 || var 2) Correct Answer: NOT(var1 || var2) Correct Answer: !(var1 && var2)

!(var1 && var2)

____________ is a principle that limits access to certain parts of a program to public methods. Correct Answer: Abstraction Correct Answer: Inheritance Correct Answer: Encapsulation Correct Answer: Polymorphism

Encapsulation

David is creating a cross-platform program using Python. Which of the following language types is Python? Correct Answer: Interpreted Correct Answer: Compiled Correct Answer: Markup Correct Answer: Query

Interpreted

Which of the following BEST describes a flowchart? Correct Answer: It is a step-by-step procedure that illustrates how a problem is to be solved. Correct Answer: It starts at the first line and then executes one line at a time until the end. Correct Answer: It is a visual representation of the logic in a program. Correct Answer: It does the same thing over and over in exactly the same way.

It is a visual representation of the logic in a program.

Match each language to its general purpose in a website. Makes website elements interactive JavaScript Adds colors, fonts, and other design elements to website CSS Creates website structure and content HTML

Match each language to its general purpose in a website. Makes website elements interactive JavaScript Adds colors, fonts, and other design elements to website CSS Creates website structure and content HTML

Python is a general purpose programming language that is popular for creating websites and mobile applications. Python is known as a readable and user-friendly language. What does the following code do? color = input('What is your favorite color?\n')print('Your favorite color is %s.' % color) Correct Answer: It gets input and produces output. Correct Answer: It sends the output to a printer. Correct Answer: It sets the system color variable. Correct Answer: It sets the font color to the color specified in the input.

It gets input and produces output.

Which of the following is used to model real-world objects into computer code? Correct Answer: Algorithms Correct Answer: Object-oriented programming Correct Answer: Pseudocode Correct Answer: Flow charting

Object-oriented programming

Which of the following programming languages are interpreted languages? (Select three.) C# Java Pascal Python Ruby JavaScript C++

Python Ruby JavaScript

Computer programming is ________________. Correct Answer: Operating a machine with computerized components, such as a smartphone. Correct Answer: Giving a computer precise instructions for what it should do. Correct Answer: Using advanced computer applications like Excel or Access. Correct Answer: An application that can run on a computer.

Giving a computer precise instructions for what it should do.

Which of the following programming models are built from class templates that have properties, attributes, and methods? Correct Answer: Functions Correct Answer: Encapsulation Correct Answer: Objects Correct Answer: Vector

Objects

A developer is creating a program that will store a customer's latest order number. The value will change each time a customer creates a new order. Which of the following would MOST likely be used to store the value? Correct Answer: Object Correct Answer: Constant Correct Answer: Variable Correct Answer: Array

Variable

What does the following pseudocode do when the input is 10? program DaysInMonth declare number array dayspermonth = [31,28,31,30,31,30,31,31,30,31,30,31]declare number monthget input "Enter a month"if month < 1 or month > 12then display errorelsedisplay "Number of days in month", month, "is ", dayspermonth[month]end Correct Answer: 31 Correct Answer: 28 Correct Answer: 30 Correct Answer: error

31

Databases, authentication, and user accounts are all part of a website's ______________. Frontend Protocols Full stack Backend

Backend

Which of the following programming languages is a compiled language? Correct Answer: Ruby Correct Answer: SQL Correct Answer: JavaScript Correct Answer: C

C

Tyler, a software developer, is creating a program written in Java to calculate loan payments. Which language type BEST describes Java? Correct Answer: Markup Correct Answer: Compiled Correct Answer: Interpreted Correct Answer: Scripting

Compiled

Martin, a software developer, is working on a programming function that takes input and displays a message based on which input the user enters. The input is the primary colors, red, blue, and green. Which is the BEST programming construct to use? Correct Answer: If Correct Answer: Constant Correct Answer: Object Correct response: Variable

If

Lydia, a programmer, is using a two-dimensional array to store a user's status for their chat program. As a container, an array is a special kind of variable that can store many values. Lydia created the following: declare user(40,2) as a string Which of the following is true about containers? Correct Answer: A container cannot be used for string vectors. Correct Answer: A container is not relevant to this array example. Correct Answer: A container is an identifier that is used to reference the user array. Correct Answer: A container is only used to declare arrays.

A container is an identifier that is used to reference the user array.

Alan, a programmer, needs to create an interactive web page. Which of the following programming languages types would he MOST likely use? Compiled Interpreted Query Assembly

Interpreted

Which of the following is a programming identifier that would be used to define values that change? Correct Answer: Variables Correct Answer: Constants Correct response: Arrays Correct Answer: Vectors

Variables

Diana, a developer, needs to program a logic component that will allow the user to enter a series of values. Which of the following would BEST provide that functionality? Correct Answer: Looping Correct Answer: Scripting Correct Answer: Case statement Correct Answer: Branching

Looping

Carlos is building a web page using HTML. The web page is not interactive and only contains static content. Which of the following language types BEST describes HTML? Correct Answer: Interpreted Correct Answer: Markup Correct Answer: Scripting Correct Answer: Compiled

Markup

A business user wants to retrieve data from a relational database. Which of the following would they use to get the data they need? Correct Answer: Markup language Correct Answer: Query language Correct Answer: Compiled language Correct Answer: Interpreted language

Query language

Phillip, a programmer, is trying to decide whether to use a compiled language or an interpreted language. The program needs to work on multiple platforms. Which of the following would be the BEST reason for choosing an interpreted language? A compiled language executes slower than interpreted languages. A interpreted language does not require code to be compiled into bytecode. A interpreted language can be provided to customers on different platforms in the form of an executable file. A compiled language requires rewriting and recompiling for each platform.

A compiled language requires rewriting and recompiling for each platform.

Give the following example of a class, which of the following represent an attribute? DriversLicense name: string birthdate: number height: number eyeColor: string valid() expired() Correct Answer: eyeColor: string Correct Answer: weight: number Correct Answer: valid() Correct Answer: expired()

eyeColor: string

Classes contain properties, which are the attributes or characteristics that objects can hold as fields or private variables. Which of the following is TRUE about properties? Correct Answer:The properties are read-only, so there is no need to access them publicly. Correct Answer: Other programs can access and change properties directly. Correct Answer:Properties in a class do not actually have the ability to store data in the fields or private variables. Correct Answer: Methods are used to read or write properties.

Methods are used to read or write properties.

Julien, a programmer, was fixing a bug in the programming code written by another developer. He discovered that the code with the bug was repeated several times. Instead of fixing the bug in multiple places, which of the following programming features should he use so the code is only located in one place? Correct Answer: Container Correct Answer: Functions Correct Answer: Loops Correct Answer: Variables

Functions

When a programmer is using branching or looping, a comparison is made to determine the next instruction to execute. A credit score of 690 or above is considered good, and below 690 is considered poor and a greater risk to lend someone money. In the following pseudocode, what would be the correct comparison operator to use? IF creditScore _____ 690 THEN interest = 8%, ELSE interest = 18%. Correct Answer: = Correct Answer: <> Correct response: <= Correct Answer: >=

>=

You are working on a program that needs to keep track of many values at the same time. Which of the following would you use? Correct Answer: An array Correct Answer: A variable Correct Answer: A float Correct Answer: A constant

An array

Which of the following is a type of variable that can hold many values at the same time? Correct Answer: Value Correct Answer: Constant Correct Answer: Array Correct Answer: Variable

Array

Which programming language type is the most basic human-readable and closest to actual machine language? Correct Answer: Interpreted Correct Answer: Compiled Correct Answer: Assembly Correct Answer: Query

Assembly

After running the following pseudocode, what will the value of VARIABLE be? Set value of VARIABLE to 5 Increase the value of VARIABLE by 3 If the value of VARIABLE is odd, increase its value by 1 If the value of VARIABLE is even, increase its value by 1 If the value of VARIABLE is odd, increase its value by 1 Correct Answer: 8 Correct Answer: 9 Correct Answer: 10 Correct Answer: 11

10

What does the following pseudocode do if the input entered is 10, 12, 18, 4, 6? program calculateAverage declare array of numbers n[5] declare number i declare number average get input from user "Enter 5 numbers to calculate the average" for (i=0; loop for 5 iterations; increment i) average = average plus n[i] end average = average divided by 5 display "The average is", average ;displays the average Correct Answer: 12 Correct Answer: 50 Correct Answer: 10 Correct Answer: 25

10

What is displayed based on the output from the following pseudocode if the count is 42? declare number total = 32 declare number count while count > total count = count - 1 loop display count Correct Answer: 0 Correct Answer: 33 Correct Answer:32 Correct Answer:31

32

Which of the following logic components is being used and how much is the interest if the amount is 5,000? (Select two.) IF amount < 5,000 THEN interest = 7%, ELSE interest = 8%. Correct response: 7% Correct Answer: Looping Correct Answer: Query Correct Answer: 8% Correct Answer: Branching

8% Correct Answer: Branching

Jessica, a programmer, has created specific statements, including conditional loops to accomplish a task. What has she created? Correct Answer: Flowchart Correct Answer: Pseudocode Correct Answer: Software Correct Answer: Algorithm

Algorithm

Lynda, a programmer, is developing a Linux device driver in assembly language. Many device drivers are written in the C language. Which of the following is the BEST reason for using assembly language instead of C? Correct Answer: Code written in assembly is more efficient and allows direct access to hardware. Correct Answer: Assembly code is more detailed and doesn't use libraries. Correct Answer: Code written in assembly is easier to read than compiled C code. Correct Answer: Assembly code is more portable than C.

Code written in assembly is more efficient and allows direct access to hardware.

Maria is working on the design for a program and has created the following pseudocode. What is the result of this pseudocode? declare loanBalance as a decimal value equal to 0.00 declare loanLimit as a decimal value to 1000.00 declare withdrawal as a decimal value While loanBalance >= 0 input withdrawal loanBalance equals loanBalance + withdrawal print loanBalance Loop Correct Answer: It results in an infinite loop. Correct Answer: It displays the loan balance each time a withdrawal is made. Correct Answer: It results in a syntax error. Correct Answer: It stops processing withdrawal input after 1000.00 is reached.

It results in an infinite loop.

The idea of programming by modeling real-world things into computer code is called _____________. Correct Answer: Encapsulation Correct Answer: Object-oriented programming Correct Answer: Inheritance Correct Answer: Polymorphism

Object-oriented programming

Pam is working with a database that contains all the product and customer orders for her company. Pam is using SQL to access the database to retrieve a customer's order. Which of the following BEST describes SQL? Correct Answer: Markup language Correct Answer: Query language Correct Answer: Compiled language Correct Answer: Object-oriented language

Query language

Enrique, a web developer, is creating a new website for a customer and is using Ruby to provide dynamic content for the web pages. Which language type is he using? Correct Answer: Scripting Correct Answer:Machine Correct Answer: Assembly Correct Answer: Compiled

Scripting

Given the following pseudocode, which of the following is displayed if the user enters 4? declare number guess input "Guess a number between 1 and 10?" if guess <= 1 || guess >= 10 display "Your guess is not valid." else if guess >=1 && guess <= 10 display "Your guess is valid." else display "Error." end Correct Answer: Your guess is not valid. Correct Answer: Your guess is valid. Correct Answer: No output. Correct Answer: Error.

Your guess is valid

A programmer needs to store the input from a user so it can be used later in the program. Which of the following would be the BEST choice to accomplish this task? Correct Answer: Variable Correct Answer: Constant Correct Answer: Method Correct Answer: Function

Variable

A developer is creating a container that needs the ability to resize itself dynamically when an element is added or removed and can hold many values. Which of the following would BEST provide this functionality? Correct Answer: Vector Correct Answer: Variable Correct Answer: Constant Correct Answer: Array

Vector

What is the term for code that keeps running as long as a certain condition is met? Correct Answer: While loop Correct Answer: Decision Correct Answer: For loop Correct Answer: Branch

While loop

Select the tags you MUST use to have a proper HTML document. (Select three.) <h1> <body> <div> <a> <html> <head> <p>

<html> <head> <body>

In object-oriented programming, which of the following concepts is used to describe properties? Correct Answer: Methods Correct Answer: Attributes Correct Answer: Encapsulation Correct Answer: Polymorphism

Attributes

On a flowchart, which of the following represents a decision? Correct Answer: Parallelogram Correct Answer: Rectangle Correct response: Arrow Correct Answer: Diamond

Diamond

What does the following JavaScript code snippet do when the code is loaded in a browser? Correct response: Displays a pop-up window with the message "You are coding with JavaScript!" Correct Answer: Displays the text "My JavaScript Button" and a button labeled "Click me!" Correct Answer: Displays a button labeled "Click me!" Correct Answer: Nothing, this code will not load in a browser

Displays the text "My JavaScript Button" and a button labeled "Click me!"

A programmer wants to create a visual representation of all the branching and sequencing for a program. Which of the following should the programmer use? Correct Answer: Algorithm Correct Answer: Flow chart Correct Answer: Function Correct Answer: Pseudocode

Flow chart

Using HTML and CSS to provide visual elements to the end user would be considered part of a website's _____________. Correct Answer: Protocols Correct Answer: Backend Correct Answer: Frontend Correct Answer: Full stack

Frontend

When using an if...else statement or a while loop, a programmer must test for a certain condition to be true. In the following pseudocode example, which line contains the condition? program guessMyFavoriteColor declare favoriteColor equal to Yellow declare guess read guess from user do while (guess does not equal favoriteColor) display "You guessed my favorite color" else display "That is not my favorite color" end while end program Correct Answer: do while Correct Answer: guess does not equal favoriteColor Correct Answer: declare favoriteColor equal to Yellow Correct Answer: end while

guess does not equal favoriteColor

Python provides programming functions that can be used by a software developer. Which of the following would be used to make the random function available? Correct Answer: export random Correct Answer: load random Correct Answer: set num = random() Correct Answer: import random

import random


Conjuntos de estudio relacionados

Experiencing The LifeSpan 4th edition Chapter 10, Chapter 11, & 12

View Set

Simplifying Equations and the Distributive Property

View Set

第21课 在邮局 At the post office

View Set

Real Estate Private Equity Questions

View Set