LIS 4381 Midterm
click event
In Java, what is a tap of the touch screen known as? click event display action tap event touch event
.
In PHP, the concatenation operator is + & . !
timer
Which feature in Java executes a one-time task? alarm start task timer
strings.xml
Which file is a default file that contains commonly used strings for an application? consts.xml data.xml strings.xml values.xml
ACTION_VIEW
Which intent action opens a Web browser on the Android? ACTION_VIEW BROWSE_VIEW HTTP_VIEW WEB_VIEW
==
Which symbol is the operator for "equal to?" = == != <=
has a default value
When you code an INSERT statement, you don't have to include the data for a column that is a foreign key is a primary key has a default value does not allow null values
Server name
When you create a PDO object, you have to pass all but one of these arguments to it: Which one is it? Data source name Server name User name Password
parameters
When you create a function definition (i.e., code a function) in PHP, you can list one or more ____________________ separated by commas (if more than one), and wrapped within parentheses. functions controls keywords parameters
underscores
A variable name in PHP can only contain letters, numbers, and _______________________. underscores percent signs pound symbols caret symbols
client/server application
A web application is a type of client/server application database application client-side application server-side application
MIDI
A(n) ____ composition is smaller than a WAV or an MP3 file, but cannot include speech. MP3 MIDI AIFF WAV
image
A(n) ____ map lists the position of all hotspots within a particular image. target practice image hot
unary
A(n) ____ operator requires a single operand either before or after the operator. unary single binary ternary
absolute
A(n) ____ path provides a precise location for a file. relative interpreted absolute indexed
relative
A(n) ____ path specifies the location for a file in relation to the folder containing the current Web document. absolute interpreted relative regular
logic error
An error that lets the application run but produces the wrong results is known as a runtime error user error logic error syntax error
runtime error
An error that occurs after an application is running is known as a runtime error user error logic error syntax error
syntax error
An error that violates the rules for how PHP statements must be written is known as a runtime error user error logic error syntax error
*/
Block comments begin with /* and end with _____. /* */ // **
conditions
Decision-making statements in Java allow you to test which of the following? conditions data types imperatives syntax
True
Git repositories and Bitbucket: https://confluence.atlassian.com/bitbucket/create-a-git-repository-759857290.html You have access to all files in a repository, whether you are working on one file or multiple files. You can view public repositories without a Bitbucket account if you have the URL for that repository. Each repository belongs to a user account or a team (Links to an external site.). The person who creates the repository is its owner. The repository owner is the only person who can delete the repository. A user or a team can have an unlimited number of public and private repositories. A code project can consist of multiple repositories across multiple accounts but can also be a single repository from a single account. True False
onStop() to hide the live image
In a camera app, the next step in the life cycle after tapping the button to take a picture is to call on which method? onPause() to let the user do something else onRestart() to restart the rest of the app onResume() to reactivate the camera onStop() to hide the live image
NOT
In a conditional expression that includes logical operators, the AND operator has a lower order of precedence than the ______________ operator. NOT OR || XOR
java
Java code source files are stored in the __________ folder. manifests res java Gradle Scripts
select pst_id, cus_fname, cus_lname, cus_balance from petstore natural join pet natural join customer;
List each pet store ID, along with all of the customer first, last names and balances associated with each pet store. select pst_id, cus_fname, cus_lname, cus_balance from petstore natural join petstore natural join customer; select pst_id, cus_fname, cus_lname, cus_balance from petstore natural join pet natural join customer select pst_id, cusfname, cus_lname, cus_balance from petstore natural join pet natural join customer; select pst_id, cus_fname, cus_lname, cus_balance from petstore natural join pet natural join customer;
text-level element
Marks content within a grouping element
tag
Marks each element in a document
Version: 2.2 API: 8 - Froyo Version: 2.3.3 - 2.3.7 API: 10 - Gingerbread Version: 4.0.3 - 4.0.4 API: 15 - Ice Cream Sandwich Version: 4.1.x API: 16, Version: 4.2.x API: 17, Version: 4.3 API: 18 - Jelly Bean Version: 4.4 API: 19 - Kitkat Version: 5.0 API: 21, Version: 5.1 API: 22 - Lollipop Version: 6.0 API: 23 - Marshmallow
Match the Android version and API with the codename:
1 second
On an Android, what is 1000 milliseconds equivalent to in seconds? 0.1 seconds 1 second 10 seconds 100 seconds
fix all errors in the application
The goal of debugging is to fix all errors in the application find all errors in the application make sure the application works with valid data make sure the application works with invalid data
find all errors in the application
The goal of testing is to fix all errors in the application find all errors in the application make sure the application works with valid data make sure the application works with invalid data
launcher icon
The icon on the home screen that represents your application is referred to as which of the following? home icon logo icon launcher icon app icon
setText()
To display text in a TextView control, which method should be used? assignText() displayText() setText() showText()
False
Should a developer design an app targeted for the most recent version of the Android OS? True False
Uniform Resource Locator
What does the acronym URL stand for? Uniform Resource Locator Universal Redirection Locale Usual Random Lesson Utility Rendering Logo
initialize resources for your app
What does the splash screen provide time for Android to do? bootstrap the phone driver download updates initialize resources for your app stream data from Google
scaled-independent pixels
What does the unit sp stand for? scaled-dependent pixels scaled-independent pixels size preference standard pixel
AndroidManifest.xml
What file lists the permissions needed to access other Android functions required by your app? styles.xml AndroidManifest.xml activity_main.xml Strings.xml
res
What folder keeps resources such as images and music? assets gen res src
TimerTask
What invokes a scheduled Timer? AbstractTask ScheduledTask Task TimerTask
milliseconds
What unit of time is used when scheduling a timer? milliseconds minutes picoseconds seconds
position
When a list item is selected, what part of it is passed to the executing code? bytecode name position signature
nested
When an If statement is placed inside another If statement, what is the inner If statement considered to be? folded internal nested stacked
memory
When buying a phone, what specification should be considered to allow more music to be stored? memory number of speakers screen size text plan
a green dashed vertical line
When centering a control, what kind of line is displayed when you drag the control to the center of the emulator window? a blue solid vertical line a green dashed vertical line a green solid vertical line a red dashed horizontal line
It automatically fades after a set amount of time.
When does a toast notification disappear from the screen? It always fades after one second. It automatically fades after a set amount of time. It never goes away. It requires a button push to fade.
compound condition
When more than one condition is included in an If statement, what is the condition called? compound condition expanded condition linked condition multicondition
URI
When opening a Web site with an intent, what is the last argument? image string URI URL
PHP interpreter
When the web server recieves an HTTP request for a PHP page, the web server calls the database server static web page web browser PHP interpreter
a WHERE clause
When you code a DELETE or an UPDATE statement, you usually need to include a SORT BY clause a WHERE clause an inner join an outer join
function
When you code a function in PHP, you start with the keyword __________________. function add get parameter
If Else statement
When you have one set of instructions to execute when a condition is true and another set of instructions if the same condition is false, which statement would you use? If statement If Else statement While statement Do statement
view
When you use the MVC pattern, the ___________________ consists of the PHP files that make up the user interface of the application. model database controller view
the model and the view
When you use the MVC pattern, the controller gets the HTTP requests and then directs the use of the files that represent the model, the view, and the database the database and the view the model, the view, and the user interface the model and the view
data or database
When you use the MVC pattern, the model consists of the PHP files that work with and represent the _________________________ of the application. model view controller data or database
make each layer as independent as possible
When you use the MVC pattern, you make each layer as independent as possible perform all data validation on the client use the pattern for every page in the application put all of the PHP code in the controller
android:textSize="20sp"
Which statement in a custom XML layout for a ListView sets the size of the test to 20sp? android:textSize="20sp" ListView:textSize="20sp" android:text="20sp" ListView:text="20sp"
emulator
Which term best describes "a program that duplicates the look and feel of a particular device"? mobile application emulator operating system smartphone
class
Which term best describes a blueprint or a template for creating objects by defining its properties? app class control widget
margins
Which term can be used to change the spacing around each object in your layout? borders margins cellpadding cellspacing
decision structure
Which term defines a fundamental control structure used in computer programming? choice point code block decision structure referential structure
Package name
Which term defines the namespace where your code resides in Java? Application address File extension Package name Program name
hint
Which term is best defined as a short description of a field that is visible as light-colored text? abstract clue hint synopsis
ListView
Which type of control do you use to contain a list of items that allows a user to select an item in the list for further action? ArrayView TableLayout ListView RadioGroup
Linear layout
Which type of layout organizes layout components in a vertical column or horizontal row? Table layout Grid layout Linear layout Relative layout
Relative layout
Which type of layout organizes layout components in relation to each other? Grid layout Table layout Linear layout Relative layout
local
Which type of variable ceases to exist when execution of its declaring method completes? constant global local static
array variable
Which variable allows you to store multiple values in one variable at the same time? array variable index variable list variable temporary variable
the file format is unsupported
Why might a music player fail to play a given file? the file format is unsupported another file is already playing the file is stored on the memory card the volume is too high
ORDER BY
You can arrange query results from a SELECT statement using the keyword(s) ____. SORT SORT BY ORDER ORDER BY
blockquote
You can mark extended quotes with the HTML _________ element. hgroup blockquote paragraph list
WHERE
You can specify which records to return from a database by using the ____ clause. CRITERIA MATCH LIKE WHERE
# //
You create line comments in PHP code by adding to a line you want to use as a comment. (Choose all that apply.) || ** # //
byte
You have a variable that will only assume values between 0 and 100. What would be the most compact primitive type to use? byte float int long
SELECT
You use the ___ statement to retrieve records from a table. RETRIEVE GET SELECT CHOOSE
Initializing
____ a variable is the processing of assigning a first value to a variable at the time of creation. Initializing Declaring Finalizing Instantiating
Line
____ breaks must be placed within grouping elements, such as paragraphs or headings. Space Block Line List
Text-based
____ browsers were incapable of displaying images. PDA Text-based Graphical Markup
<div>
_____ is a generic grouping element. <dir> <div> <dd> <span>
Small
_____ is a text-level element that displays text in a smaller font than the surrounding content. Samp Sup Sub Small
White space
______ includes the blank spaces, tabs, and line breaks found within the file. Blank space White space Empty space Black space
Empty elements
_________ do not contain content, but often are employed to send directives to browsers regarding how a page should be rendered. Elements Empty elements Nested elements One-sided elements
Name: Bob
6. What will the variable $name contain after the code that follows is executed? $first_name = 'Bob'; $last_name = 'Roberts'; $name = "Name: $first_name"; Bob $first_name Name: Bob Name: $first_name
class
A Java program is stored in an executable file called a(n) ____ file. exe class java js
is case-sensitive
A PHP variable name is case-sensitive can contain special characters can start with a letter, a digit, or two underscores can be a PHP reserved word
<!-- [if condition IE version] >
A conditional comment uses ____ to specify the condition for Internet Explorer. <!-- [if condition IE version] > <!-- [condition IE ]> <!--[ version ]> none of the above
an inner join
A join that returns records from related tables only if their related fields match is called an outer join an inner join a cross join a data join
Check the User Interface Test with valid data Test with invalid data Try various methods to make the application fail
A simple sequence of testing web applications (or other software): 1 2 3 4
echo
A simple way to trace the execution of an application is to insert __________________ statements at appropriate points within the code. runtime error echo keyword
web browser
A software program that retrieves Web pages and displays them
classid
ActiveX controls are identified using the ____ attribute. src classelem classid data
insert into customer values (null, 'John', 'Doe', '123 Main St.', 'Tallahassee', 'FL', 324035467, 8509871234, '[email protected]', 101.67, 593.42, 'testing1'), (null, 'Jane', 'Doe', '456 Oak St.', 'Chipley', 'FL', 327199164, 8506752645, '[email protected]', 242.19, 841.01, 'testing2'); insert into customer (cus_id, cus_fname, cus_lname, cus_street, cus_city, cus_state, cus_zip, cus_phone, cus_email, cus_balance, cus_total_sales, cus_notes) values (null, 'John', 'Doe', '123 Main St.', 'Tallahassee', 'FL', 324035467, 8509871234, '[email protected]', 101.67, 593.42, 'testing1'), (null, 'Jane', 'Doe', '456 Oak St.', 'Chipley', 'FL', 327199164, 8506752645, '[email protected]', 242.19, 841.01, 'testing2');
Add two more customers. insert into customer value (null, 'John', 'Doe', '123 Main St.', 'Tallahassee', 'FL', 324035467, 8509871234, '[email protected]', 101.67, 593.42, 'testing1'), (null, 'Jane', 'Doe', '456 Oak St.', 'Chipley', 'FL', 327199164, 8506752645, '[email protected]', 242.19, 841.01, 'testing2'); insert into customer values (null, 'John', 'Doe', '123 Main St.', 'Tallahassee', 'FL', 324035467, 8509871234, '[email protected]', 101.67, 593.42, 'testing1'); (null, 'Jane', 'Doe', '456 Oak St.', 'Chipley', 'FL', 327199164, 8506752645, '[email protected]', 242.19, 841.01, 'testing2'); insert into customer values (null, 'John', 'Doe', '123 Main St.', 'Tallahassee', 'FL', 324035467, 8509871234, '[email protected]', 101.67, 593.42, 'testing1'), (null, 'Jane', 'Doe', '456 Oak St.', 'Chipley', 'FL', 327199164, 8506752645, '[email protected]', 242.19, 841.01, 'testing2'); insert into customer (cus_id, cus_fname, cus_lname, cus_street, cus_city, cus_state, cus_zip, cus_phone, cus_email, cus_balance, cus_total_sales, cus_notes) values (null, 'John', 'Doe', '123 Main St.', 'Tallahassee', 'FL', 324035467, 8509871234, '[email protected]', 101.67, 593.42, 'testing1'), (null, 'Jane', 'Doe', '456 Oak St.', 'Chipley', 'FL', 327199164, 8506752645, '[email protected]', 242.19, 841.01, 'testing2'); insert into customer (cus_id, cus_fname, cus_lname, cus_street, cus_city, cus_state, cus_zip, cus_phone, cus_email, cus_balance, cus_total_sales, cus_notes), values (null, 'John', 'Doe', '123 Main St.', 'Tallahassee', 'FL', 324035467, 8509871234, '[email protected]', 101.67, 593.42, 'testing1'), (null, 'Jane', 'Doe', '456 Oak St.', 'Chipley', 'FL', 327199164, 8506752645, '[email protected]', 242.19, 841.01, 'testing2'); insert into customer (cus_id, cus_fname, cus_lname, cus_street, cus_city, cus_state, cus_zip, cus_phone, cus_email, cus_balance, cus_total_sales, cus_notes) values (null, 'John', 'Doe', '123 Main St.', 'Tallahassee', 'FL', 324035467, 8509871234, '[email protected]', 101.67, 593.42, 'testing1'); (null, 'Jane', 'Doe', '456 Oak St.', 'Chipley', 'FL', 327199164, 8506752645, '[email protected]', 242.19, 841.01, 'testing2');
40
After the if statement that follows is executed, what will the value of $discountAmount be? $discount_amount; $order_total = 200; if ($order_total > 200) { $discount_amount = $order_total * .3; } else if ($order_total > 100) { $discount_amount = $order_total * .2; } else { $discount_amount = $order_total * .1; } 0 20 40 60
WebM
An open source format introduced by Google to provide royalty-free video and audio to be used with the HTML5 video element is ____. Flash Video MP4 Ogg Theora WebM
Open source
Android code was released under the Apache license which means the platform is considered which of the following? Proprietary Virtual license Open source Private code
value
Assignment operators are used to assign a ____ to a variable. name value data type comparison
MP3
Case-Based Critical Thinking Questions Sadie Helman runs a Web site for amateur snowboarders. She likes to post videos and music related to snowboarding on her site as well as interviews with different snowboarding professionals. For her stereo-recorded audio interviews, Sadie should use the ____ file format SND MP3 MIDI AU
Flash Video
Case-Based Critical Thinking Questions Sadie Helman runs a Web site for amateur snowboarders. She likes to post videos and music related to snowboarding on her site as well as interviews with different snowboarding professionals. Which would be the best format for Sadie to use for her videos so that they are compatible with the most browsers and can be displayed in YouTube? AVI RealVideo Flash Video QuickTime
displayText.setText(fall);
Choose the option that completes the following code so that the text is displayed in a TextView object named displayText. String sports = "Football"; String fall = sports + " season begins in the Fall."; ---- code goes here ---- displayText.getText(sports+fall); displayText = fall.getText(); setText(fall).displayText; displayText.setText(fall);
an array of the columns in the row with the specified product ID
Code example: function get_product($product_id) { global $db; $query = "SELECT * FROM products WHERE productID = '$product_id'"; $product = $db->query($query); $product = $product->fetch(); return $product; } What does this function return when it is called? an array of all the rows in the products table an array of all the rows with the specified category ID an array of the columns in the first row of the products table an array of the columns in the row with the specified product ID
$product = get_product($product_id);
Code example: function get_product($product_id) { global $db; $query = "SELECT * FROM products WHERE productID = '$product_id'"; $product = $db->query($query); $product = $product->fetch(); return $product; } Which of the following is a proper PHP statement for calling the function in this example and storing the returned result in a variable named $product. $product = get_product($product_id); $product = get_product(product_id); $product = $get_product($product_id); $product = $get_product(product_id);
XHTML
Designed to overcome some of the problems of competing HTML standards
select pst_name, count(pet_id) as `number of pets` from petstore natural join pet group by pst_id;
Display the pet store name, along with the number of pets each pet store has. select pst_name, count(pet_id) as `number of pets` from petstores natural join pet group by pst_id; select pst_name, count(pet_id) as `number of pets` from petstore natural joins pet group by pst_id; select pst_name, count(pet_id) as `number of pets` from petstore natural join pet group by pst_id; select pst_name, count(pet_id) as `number of pets from petstore natural join pet group by pst_id;
continue()
Each of the following are a common state for the MediaPlayer class except for which one? continue() pause() start() stop()
0
How many times will the while loop that follows be executed? $months = 5; $i = 1; while ($i > $months) { $futureValue = $futureValue * (1 + $monthlyInterestRate); $i = $i+1; } 0 1 4 5
the list is made scrollable
If a Java View list exceeds the length of the screen, what is done to the list? the list is made scrollable the list is paginated the list is shrunk to fit the list is truncated
a list of all of the directories in that directory
If a URL specifies a directory that doesn't contain a default page, Apache displays an error message a list of the PHP applications in that directory a list of all of the web applications in that directory a list of all of the directories in that directory
one-to-one relationship
If a row in one table is related to just one row in another table, the tables are said to have a one-to-many relationship one-to-one relationship many-to-many relationship unary relationship
ListActivity
If the primary purpose of a class is to display a ListView control, which of the following controls is recommended to extend the class from? Activity ListActivity SelectionActivity ViewingActivity
_blank
If you want an external document to be displayed in its own browser window, you can assign the ____ keyword to the target attribute. _same _blank _this _over
widget
In Android Studio, which term describes a single element such as a TextView, Button, or CheckBox control? app layout modality widget
#majors
In the URL http://www.mwu.edu/course/info.html#majors, the id/anchor name is ____. http:// www.mwu.edu /course/info.html #majors
PDOException object
In the catch block of a try/catch statement for handling PDO exceptions, you can get a message that describes the exception by using the getMessage method of the PDO object PDOStatement object PDOException object Result set array
control is passed to a page named index.php that's in the current directory
In the code that follows, if $error_message isn't empty if ($error_message != '') { include('index.php'); exit(); } control is passed to a page named index.php that's in the current directory control is passed to a page named index.php that's in the parent directory control is passed to a page named index.php that's in the child directory nothing happens because the condition is false
RadioGroup
In what are RadioButton controls usually used together, which causes only one RadioButton to be selected at a time? GroupControl MultiButton RadioGroup Selector
.png
In what graphics format should launcher icons be saved? .png .jpg .tif .gif
[ ]
In what is the reference for an array enclosed? {} [ ] ( ) <>
drawable-mdpi folder
In which folder are resources for medium-density screens placed? drawable-hdpi folder drawable-ldpi folder drawable-mdpi folder drawable-medium folder
white space
Includes the blank spaces, tabs, and line breaks found within the file
select pst_id, pst_street, pst_city, pst_state, pst_zip, pst_phone from petstore;
List only the pet store IDs, full address, and phone number for all of the pet stores. select pst_id, pst_street, pst_city, pst_state, pst_zip, pst_phone from petstore; insert pst_id, pst_street, pst_city, pst_state, pst_zip, pst_phone from petstore; select pst_id, pst_street, pst_city, pst_zip, pst_phone from petstore; select pst_id, pst_street, pst_city, pst_state, pst_zip, pst_phone from pet;
widgets
Objects like buttons, check boxes, and TextViews are called ______________. elements widgets properties resources
is to have a PHP file run itself again
One reason for using the header() function to redirect a request, rather than using the include() or require() functions is that it's more efficient than forwarding a request is to have a PHP file run itself again is to reduce the number of round trips that are required is to do all processing for the request on the server
empty
One-sided tags are also known as this type of tag
$
PHP variables begin with _____________________. & ! $ #
delete from pet where pet_id=2;
Remove Pet #2 delete from pet where pet_id=2 delete where pet from pet_id=2; delete from pet where pet_id=2; delete pet where pet_id=2;
4
SELECT vendorName, invoiceNumber, invoiceDate, invoiceTotal FROM vendors Inner Join invoices On vendors.vendorID = invoices.vendorID WHERE invoiceTotal >= 500 ORDER BY vendorName DESC How many columns will the result set have? 4 5 6 7
alphabetically starting with Z
SELECT vendorName, invoiceNumber, invoiceDate, invoiceTotal FROM vendors Inner Join invoices On vendors.vendorID = invoices.vendorID WHERE invoiceTotal >= 500 ORDER BY vendorName DESC If vendorName contains string data and invoiceTotal contains decimal values, how will the result set be ordered? alphabetically starting with A alphabetically starting with Z numerically starting with 0 numerically starting with 500
vendors and invoices
SELECT vendorName, invoiceNumber, invoiceDate, invoiceTotal FROM vendors Inner Join invoices On vendors.vendorID = invoices.vendorID WHERE invoiceTotal >= 500 ORDER BY vendorName DESC What table(s) does the data in the result set come from? vendors invoices vendors and invoices vendorName and invoiceNumber
internal style sheet
Specifies the appearance of different HTML elements
from the web server to the browser
The HTTP response for a dynamic web page is passed from PHP to the browser from the web server to the browser from the database server to the web server from the web server to PHP
UPDATE
The ____ keyword specifies the name of the table that needs to be modified when updating records. SELECT MODIFY UPDATE CHANGE
tooltip
The accompanying figure shows an example of a(n) ____ applied to a link. (image is of text popping up when hovering over a link) access tooltip alternative base
what range of values the column can contain
The column definition for a MySQL table can be used to determine all but one of the following. Which one is it? what type of data the column can contain whether the column can contain a null value whether the column has a default value what range of values the column can contain
place a phone call
The emulator mimics almost every feature of a real Android except for the ability to do what? load programs place a phone call play video games use the Internet
JavaScript
The most often-used program language for the Web is ________ VB.NET JavaScript Java C.NET
increment operations to be done first
The order of precedence for arithmetic expressions causes addition to be done before subtraction multiplication to be done before division increment operations to be done first modulus operations to be done last
two of the columns from the accounts table where balance is less than 0
The result set retrieved by the following SELECT statement contains rows that have SELECT balance, number FROM accounts WHERE balance < 0 all of the columns from the accounts table two of the rows from the account table all of the columns from the accounts table where balance is less than 0 two of the columns from the accounts table where balance is less than 0
Create a PDO object named $db that connects to the right database
The starting code for the index.php file which is the first page of an application <?php require 'database.php'; $category_id = $_GET['category_id']; if (!isset($category_id)) { $category_id = 1; } // Routine 1 $query = "SELECT * FROM categories WHERE categoryID = $category_id"; $category = $db->query($query); $category = $category->fetch(); $category_name = $category['categoryName']; // Routine 2 $query = "SELECT * FROM products WHERE categoryID = $category_id ORDER BY productID"; $products = $db->query($query); ?> The first statement in this example gets and runs a file named database.php. What must this code do for the rest of the statements in this example to work? Create a PDOStatement object named $db that connects to the right database Create a PDOStatement object named $db-> that connects to the right database Create a PDO object named $db that connects to the right database Create a PDO object named $db-> that connects to the right database
The category name for the row in categories table that corresponds to the value in $category_id
The starting code for the index.php file which is the first page of an application <?php require 'database.php'; $category_id = $_GET['category_id']; if (!isset($category_id)) { $category_id = 1; } // Routine 1 $query = "SELECT * FROM categories WHERE categoryID = $category_id"; $category = $db->query($query); $category = $category->fetch(); $category_name = $category['categoryName']; // Routine 2 $query = "SELECT * FROM products WHERE categoryID = $category_id ORDER BY productID"; $products = $db->query($query); ?> What does routine 1 store in the variable named $category_name? The category name for the first row in the categories table of the database The category name for the row in categories table that corresponds to the value in $category_id The category name for the row in categories table that has a category ID of 1 An array of the category names in the categories table
A PDOStatement object for the rows in the products table that have a category ID equal to the value in $category_id
The starting code for the index.php file which is the first page of an application <?php require 'database.php'; $category_id = $_GET['category_id']; if (!isset($category_id)) { $category_id = 1; } // Routine 1 $query = "SELECT * FROM categories WHERE categoryID = $category_id"; $category = $db->query($query); $category = $category->fetch(); $category_name = $category['categoryName']; // Routine 2 $query = "SELECT * FROM products WHERE categoryID = $category_id ORDER BY productID"; $products = $db->query($query); ?> What does routine 2 store in the variable named $products? A PDOStatement object for all rows in the products table A PDOStatement object for the columns in the first row in the products table A PDOStatement object for the rows in the products table that have a category ID equal to the value in $category_id A PDOStatement object for the rows in the products table that have a category ID equal to 1
ol
The structure of ordered and unordered lists is the same, except that the list items for an ordered list are nested within the ___ element. li ol ul p
<hn>content</hn>
The syntax to mark a heading element is _______. <li>content</li> <ol> content</ol> <hn>content</hn> <p>content</p>
nesting
The technique of placing one element within another is called ____. linking nesting loading interlacing
<p>
To designate a paragraph element you would use the ____ tag. <p> <li> <ol> <h1>
<!--comment-->
To add notes or comments, insert a comment tag using the syntax ______ <---comment> <!--comment--> </--comment> <!--comment!-->
<!--Welcome John Smith -->
To add the comment, Welcome John Smith, the syntax would be ________ <Welcome John Smith> < !--- Welcome John Smith? <!--Welcome John Smith --> <"Welcome John Smith -->
double quotation marks
To assign a phrase as the value of a String variable, in which of the following characters should the text be placed? brackets double quotation marks parentheses single quotation marks
arguments
To call a function in PHP, you code the function name followed by a list of any _________________________ that are required. functions arguments keywords controls
compareTo method
To compare the alphabetical order of two strings, what should be used? < operator > operator compareTo method equals method
return
To pass data back to the statement that calls a function, the function can use the _________________________ statement. global control return function
DESC
To perform a reverse sort on query results from a SELECT statement, add the ___ keyword after the name of the field by which you want to perform the sort. REVERSE DESC A-Z Z-A
$number_formatted = number_format($number, 3);
To round and format the value of a variable named $number to 3 decimal places and store it in a variable named $number_formatted, you code $number_formatted = number_format($number, 3, round); $number_formatted = number_format($number, 3); $number_formatted = format_number($number, 3, round); $number_formatted = format_number($number, 3);
uses localhost as the domain name
To run a PHP application that has been deployed on your own computer, you can enter a URL in the address bar of your browser that specifies just the application root directory uses localhost as the domain name specifies just the application root directory and the starting filename uses apache as the domain name
VARCHAR
To store text in an address field, you specify a data type of ____ because the amount of storage space allocated will vary depending upon the number of characters in the field. VARTEXT CHAR CONTENT VARCHAR
View menu
To view the source code for a web page in the Firefox or IE browser, you can select the appropriate command from the File menu Source menu View menu Tools menu
update customer set cus_lname='Tidwall' where cus_id=4;
Update the customer last name to 'Tidwall' for Customer #4. select customer set cus_lname='Tidwall' where cus_id=4; update customer set cus_lname='Tidwall' where cus_id=4; update customer set cus_lname=Tidwall where cus_id=4; update customer set cus_lname='Tidwall' where cusid=4;
attribute
Used to control the behavior/appearance of an element in a page
presentational attribute
Used to describe deprecated parts of a tag, such as align
ordered list
Used to display information in a sequential order
unordered list
Used to present list items, but not in a particular order
HTML
Web pages are text files written in a language called ____. SGML Java Perl HTML
DecimalFormat
What Java class should you use if you want to format a number such as 279.55 to display in currency format such as $279.55? DecimalFormat DollarFormat NumericFormat StringFormat
Processing objects
What are the components of a program that perform the tasks required in the program? Activities Event handlers Processing objects Task items
life cycle
What can be described as the series of actions from the beginning of an Activity to its end? life cycle flow chart run time execution period
prompt
What can be used to display instructions at the top of Spinner controls? abstract hint lead-in prompt
string array
What defines a string resource of related items in a central location within strings.xml? text table string matrix string array character column
onClickListener()
What do you use if you want an app to wait for a user to click or tap a button before taking action? onClickListener() onCreate() findViewById() setContentView()
relational operators
What does Java provide to compare the relationship between variables being tested in conditional statements? byte analysis logical operators relational operators static methods
Software Development Kit
What does SDK stands for? Special Description Kit Software Development Kit Standard Domain Knowledge Support Development Knowledge
foreign keys
What does a relational database use in the child tables to relate to the primary keys in the parent tables? indexes foreign keys non-primary keys primary keys
primary keys
What does a relational database use to uniquely identify each row in a table? indexes foreign keys non-primary keys primary keys
only the amount of space needed
What does a toast notification use to display a message? half of the screen only the amount of space needed one line the whole screen
the resources available to the app
What does the R in findViewById(R.id.txtTickets) refer to? the resource folder for the app the resources available to the app a static property of the txtTickets variable a variable named 'R'
using the assignment operator instead of the comparison operator
What is a common mistake made when forming a conditional statement? using the assignment operator instead of the comparison operator using the compareTo method instead of the assignment operator using the greater than operator instead of the assignment operator using the less than operator instead of the comparison operator
event handler
What is a part of a program coded to respond to a specific event? action responder event handler response method triggered method
method
What is a set of Java statements (grouped together to perform an operation) that can be included inside a Java class? activity block intent method
API number
What is contained in the Minimum SDK text box? API number compiler version serial number UPC code
background
What is the TextView property for backgrounds? graphic background picture image
onCreate method
What is the entry point of an Activity? begin method onEntry method onCreate method prepare method
No fee
What is the fee you must pay to Google for each free app you publish on Google Play? $25 $1.00 No fee $1.99
gather program requirements
What is the first phase of program development? code the program design the user interface gather program requirements test the program
simple_list_item_checked
What is the generic layout that displays checkboxes? boxed_list_item checked_list_item list_item_checked simple_list_item_checked
simple_list_item_1
What is the generic layout to a simple list? simple_list_item_1 simple_list_item_2 simple_list_item_checked simple_list_item_multiple_choice
Application name
What is the human-readable title for your application? Application name Class title External name Program namespace
launcher icon
What is the icon used to start your app called? boot icon launcher icon master icon starter icon
intuitive interface
What is the key to successful usage of an app? colorful interface intuitive interface simple interface sophisticated interface
isChecked() method
What is the method used to test a checked property on a radio button? getChecked() method isChecked() method checked() method setChecked() method
mp3
What is the most common file type of media supported for audio playback on the Android? midi mp3 ogg wav
soft keyboard
What is the on-screen keyboard called? electronic keyboard screenboard soft keyboard touchkey
greater than 0
What is the resulting value of the expression "sears".compareTo("chicago")? equal to 0 greater than 0 less than 0 unknown
void
What is the return type of a method that returns nothing? double int null void
variable
What is used in a Java program to contain data that changes during the execution of the program? constant item literal variable
intents
What is used so apps can talk to each other in a very simple way? activities classes intents values
equals method
What is used to compare Strings in Java for equality? = operator == operator compareTo method equals method
Toast.makeText
What method call is used to display a toast notification? Toast.alert Toast.makeText Toast.showText Toast.toastNotify
onDestroy
What method marks the end of an Activity? atEnd onClose onDestroy onEnd
setListAdapter method
What method projects your data to the onscreen list by connecting a ListView object to array data? createViewAdapter method projectArrayAdapter method setListAdapter method useListAdapter method
getSelectedItem()
What method returns the text label from a selected Spinner item? getItem() getSelectedItem() getSpinnerItem() selectedItem()
declare it
What must you do before you can use a variable in a Java application? declare it check its data type display it store it in the manifest
break;
What should end the block of code in each case statement to prevent the subsequent case statement from being executed as well? default; break; exit; end;
default:
What statement should you put at the end of a switch statement if you want a block of code to be executed in the event none of the case statement values matches? default: option: try: execute:
red curly lines
What symbol indicates errors in program code? blue solid lines bolded text green curly lines red curly lines
instantiate
What term best describes defining a specific object of a class? initiate instantiate justify stabilize
gestures
What term can be described as multitouch interactions such as pressing two fingers to pan, rotate, or zoom? taps gestures actions swipes
class variable
What type of variable is visible in multiple methods throughout the program? scope variable class variable local variable universal variable
a response is returned to the browser that tells it to request another page
When you use the header function to redirect a request, a response is sent to the web server so it requests another page the web server returns a new page to the browser a response is returned to the browser that tells it to request another page the web server returns a new page to the controller of the MVC pattern
italics
When you using the address element, the address text is displayed in _____ by default. bold underline italics bold italics
web server
Where Web pages are stored
Google Play
Where are apps written for Android sold and deployed? App Store iTunes Google Play Mobile Mall
resources folder
Where do you need to put a picture file that will be used with an ImageView control? pictures folder resources folder controls folder drawable folder
res/values folder
Where is the strings.xml file located? res/drawable-hdpi folder res/drawable-mdpi folder res/layout folder res/values folder
res\drawable folder
Where should you place an image file that will be used as a background image for a TextView control? res\images folder manifests folder res\drawable folder values\backgrounds folder
ExpandableListView
Which ListView control provides a two-level list? DoubleListView MultiListView AdvancedListView ExpandableListView
android:drawableRight="@drawable/ic_city"
Which XML code statement places an icon named ic_city.png to the right of the text in a ListView display? android:drawableRight="@drawable/ic_city" android:iconRight="@icon/ic_city" icons:drawableRight="@drawable/ic_city" icons:iconRight="@icon/ic_city"
Internet Explorer
Which browser is not supported in Android? Firefox Internet Explorer Opera Dolphin
parseInt()
Which class should you use if you want to convert the string "123" to the number one hundred and twenty-three? parseInt() strInt() convertStr() convertNum()
ImageView control
Which control can display an icon or a graphic such as a picture file or shape? Display control JPG control ImageView control Picture control
btnStart.setVisibility(View.VISIBLE);
Which is the correct statement to make a button named btnStart visible? btnStart.setVisibility(Show.VIEW); btnStart.setVisibility(Show.VISIBLE); btnStart.setVisibility(View.SHOW); btnStart.setVisibility(View.VISIBLE);
AutoComplete TextView
Which kind of TextView can suggest the completion of a word after the first few letters? AutoComplete TextView Alphanumeric TextView Imaging TextView String TextView
final variable
Which kind of variable can be initialized only once? final variable local variable static variable temporary variable
startActivity method
Which method creates an intent to start another Activity? beginActivity method createActivity method prepareActivity method startActivity method
setContentView method
Which method displays the content of a specific screen? drawContents method getDisplay method makeDisplay method setContentView method
onListItemClick
Which method is called when an item in a list is selected? clicked itemClicked itemWasClicked onListItemClick
pause
Which method will temporarily stop music while it is playing? cease pause start stop
ft
Which of the following abbreviations is not a valid measurement unit for text display? dp ft px sp
report its current state
Which of the following actions can the MediaPlayer class NOT do? play different music formats play music files report its current state stop playing music
Delete the rows
Which of the following can a SELECT statement not do to the data in a table? Get selected rows List selected columns Sort the rows Delete the rows
MediaPlayer
Which of the following classes comes with the Android platform to play audio and video files? iTunes MediaPlayer Player VideoPlayer
ExpandableListView control
Which of the following controls allows you to create a two-level list? ExpandableListView control ListView control MajorListView TwoListView control
switch statement
Which statement allows you to evaluate a value and execute a block of statements based on an integer or single character input? choose statement case statement select statement switch statement
smartphones tablets netbooks e-readers MP4 players Internet TVs The NOOK Kindle Fire
Which of the following devices will run the Android OS? iPhone BlackBerry (Note: PRIV™ is the first-ever BlackBerry smartphone to run Android™) smartphones tablets netbooks e-readers MP4 players Internet TVs The NOOK Kindle Fire
node
Which of the following is NOT part of an HTTP URL: protocol path node filename
layout
Which of the following is a container that can hold as many widgets as needed? emulator layout property pane
Power management Multiple monitors Onscreen keyboard Facial recognition
Which of the following is a feature supported by the Android platform? Power management Multiple monitors Onscreen keyboard Facial recognition
Open Handset Alliance
Which of the following is an open-source business partnership of around 80 or more firms that develop standards for mobile devices? Association of Wireless Computers Cordless Union Open Handset Alliance Mobile Computing Consortium
the application runs more efficiently
Which of the following is not a benefit of using the MVC pattern for an application? it's easier to make changes to the application web designers can work independently on the view there's less repetition of code it's easier to test and debug the application the application runs more efficiently
switch(choice) {
Which of the following is the correct syntax for the beginning of a switch statement that evaluates a variable named choice? case(choice): switch[choice] { case[choice]: switch(choice) {
$product = $products->fetch();
Which of the following is the correct way to code a PHP statement that puts the first row of PDOStatement object named $products in an array named $product? $product = $db->query($products); $product = $db->fetch($products); $product = $products->query(); $product = $products->fetch();
$results = $db->query($statement);
Which of the following is the correct way to code a PHP statement that returns the result set for a SELECT statement that's stored in $statement if the PDO object is $db?
onStop
Which of the following methods hides an Activity? onDestroy onResume onStart onStop
( )
Which of the following operators has the highest order of precedence? ( ) ++ % -
mpTrombone = new MediaPlayer();
Which of the following statements creates a new instance of MediaPlayer and assigns it to mpTrombone? MediaPlayer.new(mpTrombone); mpTrombone = MediaPlayer.create(); MediaPlayer.create(mpTrombone); mpTrombone = new MediaPlayer();
import statement
Which of the following statements is a way of making more Java functionality available to your specific program? assignment statement import statement include statement reference statement
stub
Which of the following terms best describes a piece of code that actually serves as a placeholder to declare itself? control inclusion event handler stub
hexadecimal color code
Which of the following terms best describes a triplet of three colors which encodes different colors? controlled color code hexadecimal color code standard color encoding triple-coded color
Spinner control
Which of the following terms best describes a widget similar to a drop-down list for selecting a single item from a fixed listing? EditText control Message control Spinner control TextView control
adapter
Which of the following terms provides a data model for the layout of the list? abstraction adapter blueprint skeleton
CheckBox control
Which of the following types of controls always operates independently, therefore selecting it will never deselect any other controls? CheckBox control EachButton control SingleSelect control TextView control
Vector-based graphics
Which of the following types of graphics are best to use for icon design because the images can be scaled without loss of detail? Composite graphics Raster graphics Scanned graphics Vector-based graphics
Event listeners
Which of the following wait for user interaction. Action subscribers Event listeners Polling objects Targeted components
Android project view
Which part of Android Studio contains the key source application folders for the project? Development Window Overview Pane Android project view Android App control
user experience
Which phrase refers to how a user feels when using a particular device? look and feel sensory outcome total perception user experience
char
Which primitive data type can hold alphanumeric values? string char int short long
boolean
Which primitive data type should you use if the variable should have only two values and will be used in conditional statements? char byte boolean int
Java
Which programming language is used to write Android apps? C++ Fortran Java Python
gravity property
Which property can center a control horizontally as well as position it at other places on the screen? elastic property gravity property rubber band property stretch property
visibility property
Which property determines whether a control is displayed or not? display property seen property viewable property visibility property
Visibility
Which property of a control determines whether the control is displayed on the screen? Display Visibility Active Show
state
Which property of an Activity determines whether the Activity is active, paused, stopped, or dead. label name state tag
A file called strings.xml
By default, what does @string specified in a TextView control refer to? A file called strings.xml A data type of string A variable named string The word "string" in a resource file
Edit the strings.xml file
If you want to modify the value of the default TextView control in a new Android app, what should you do? Change the @strings variable Edit the res file Edit the strings.xml file Change the file named hello_world
The Choose Device dialog box is displayed
What happens when you click the Run 'app' button in Android Studio? The Android debugger opens The Choose Device dialog box is displayed The app runs in a browser window The app runs on the device connected to the USB port
Ctrl+space
What keystroke can you use to invoke possible code completion suggestions as you type an XML or Java line of code? Ctrl+space Alt+home Ctrl+end Alt+insert
Translations Editor
What should a beginner typically use to change the contents of the strings.xml file? Emulator Editor Text Viewer Resource Viewer Translations Editor
"Hello World!"
What string is placed in the default TextView control in a new Android app created using Android Studio? "I am Android" "Hello World!" "Default text" "TextView control"
DecimalFormat USdollars = new DecimalFormat("$###,###.##");
Which statement establishes a currency decimal format so that the variable itemCost is displayed in U.S. dollar format in the following statement? USdollars.format(itemCost)); new USdollars = DecimalFormat("$###,###.##"); CurrencyFormat USdollars = new CurrencyFormat("$###,###.##"); DecimalFormat USdollars = new DecimalFormat("$###,###.##"); new USdollars = CurrencyFormat("$###,###.##");