Worksheetsprogramming 8.2 and 8.3
Total questions: 22
Worksheet time: 11mins
A programmer is creating an application that needs to store a value indicating if the user is logged in or not. Which of the following would be the BEST data type to accomplish this?
Integer
String
Float
Boolean
A developer is creating an application that requires a value to be stored with decimal precision. Which of the following data types should be used for the variables that will store these values?
String
Float
Boolean
Integer
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?
Object
Constant
Variable
Array
Which of the following programming models are built from class templates that have properties, attributes, and methods?
Vector
Objects
Encapsulation
Functions
Which of the following is a programming identifier that would be used to define values that don't change?
Vectors
Vectors
Constants
Arrays
In object-oriented programming, which of the following concepts is used to describe properties?
Attributes
Methods
Polymorphism
Encapsulation
Match each language to its general purpose in a website.
Makes website elements interactive
JavaScript
CSS
HTML
Adds colors, fonts, and other design elements to website
CSS
HTML
JavaScript
Creates website structure and content
HTML
CSS
JavaScript
A software developer wants to provide a compiled executable program to a customer. Which of the following computer languages would provide this capability?
C++
PowerShell
Perl
Ruby
Alan, a programmer, needs to create an interactive web page. Which of the following programming languages types would he MOST likely use?
Assembly
Query
Compiled
Interpreted
Which programming language type is the most basic human-readable and closest to actual machine language?
Assembly
Compiled
Query
Interpreted
On a flowchart, which of the following represents a decision?
Parallelogram
Parallelogram
Arrow
Diamond
Which of the following BEST describes a flowchart?
It is a step-by-step procedure that illustrates how a problem is to be solved.
It is a step-by-step procedure that illustrates how a problem is to be solved.
It is a visual representation of the logic in a program.
It starts at the first line and then executes one line at a time until the end.
What is the term for code that keeps running as long as a certain condition is met?
Branch
While loop
Decision
For loop
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?
A constant
An array
A variable
A float
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
8
9
10
11
Which of the following flow chart concepts is depicted below?
Vectors
Arrays
Methods
Sequence
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?
Encapsulation
Looping
Branching
Programming array
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?
Branching
Case statement
Looping
Scripting
Jessica, a programmer, has created specific statements, including conditional loops to accomplish a task. What has she created?
Pseudocode
Flowchart
Algorithm
Software
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%.
Query
Branching
Looping
7%
8%
