4351 Exam 4 Review

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What condition causes the for loop to output the numbers 100 down to 50, inclusively? for ($c = 100; ______; $c--) { echo $c; }

$c >= 50

Which code segment produces a notice error message?

$count= 2; echo $COUNT; $count = 2; echo $count;

Which statement produces a parse error?

$owner = 'Pam's';

What file extension does a PHP script have?

.php

What compound assignment operator makes $points become 2.5? $points = 5; $points ____ 2;

/=

What is $x at the end of each code segment? $a = 2; if ($a == "2"){ if ($a === "2") { $x = 1; } else { $x = 0; } }

0

What is $x at the end of each code segment? $x = 0; if ($x > 10) { $x = 1; }

0

What is $x at the end of each code segment? if ("history" < "math") { $x = 1; } else { $x = 0; }

1

In one experiment, artifacts with the Cyclomatic Complexity M greater than _____ were shown to have statistically more errors

10 or ten

What are the first and last numbers output by the code segment? $c = 100; while ($c > 0) { echo $c; $c -= 10; }

100 and 10

$points = 10; $points--; $points + 2 = ?

11

3 + 5 * 2 = ?

13

What numbers are output by the code segment? for($x = 1; $x <= 3; $x++) { for($y = 2; $y <= 4; $y++) { echo $y; } }

2, 3, 4, 2, 3, 4, 2, 3, 4

Nested if statements rule of thumb: if statements nested to a depth greater than _____ should be avoided as poor Programming Practice

3 or three

What numbers are outputted by the code segment? for ($c = 5; $c < 10; $c += 2) { echo $c; }

5, 7, 9

What value is $points? $points = 2; $points *= 3 + 1;

8

What output is produced by the PHP script?

<h1><h1>This is a test</h1>echo "This is only a test";

In choosing the Implmentation Language, the following techniques are used:

Cost Benefit Analysis

Client-side data validation makes server-side data validation unecessary

False

Fault Distribution in modules is Uniform

False

Indicate if the expression evaluates to true or false "123" === 123

False

Indicate if the expression evaluates to true or false "bat" < "ball"

False

Indicate if the expression evaluates to true or false 2 > 10 || 1 > 2

False

The code below outputs "Angie"

False

Indicate if the expression evaluates to true or false "123" !== 123

False "123" is identical to "123"

PHP code runs in a web browser.

False it runs on a web server javascript runs in a web browser

These are techniques for the Testing Workflow:

Glass Box Testing Black Box Testing Code Walkthroughs and Inspections

Code reuse is the most common form of reuse However, artifacts from all workflows can be reused (Design ______)

Patterns

QUESTION 27

Q27

Q43

Q43

Q47

Q47

QUESTION 12

QUESTION 12

These are examples of 4GL languages:

SQL RoR (ruby on rails)

Integration of Object Oriented Products is done using:

Sandwich implementation and Integration

What value is $message? $message = "Top"; $message .= "secret";

Topsecret

$this in a method contains an object reference.

True

Indicate if the expression evaluates to true or false !(2 > 10 && 5 > 0)

True

Indicate if the expression evaluates to true or false "123" == 123

True

Indicate if the expression evaluates to true or false 2 > 10 || (3 % 2 != 2 && 5 > 0)

True

Many PHP applications run on Linux with an Apache webserver and MySQL as the datebase.

True

Must PHP statements be terminated by a semicolon?

Yes

What does the code output? $test = "adios"; echo "$test test";

adios test

Glass Box Testing is also known as Testing to ____.

code

Glass Box Testing is also known as Testing to _____.

code

One measure of the complexity of a code artifact is the number of lines of code. Another measure of complexity is ______ complexity M (McCabe) which measures essentially the number of decisions (branches) in the code artifact. It is also a good measure of number of faults.

cyclomatic

Which loop always executes the loop body at least once?

do-while

A technique to select minimum test cases for the Black Box Testing is called Equivalence Testing and Boundary Value Analysis. It divides the Input or Output Specifications in ______ Classes.

equivalence

The var_dump (variable) function outputs trhe data type of a variable. What is the output of the code below? $x = 1.23; var_dump($x);

float(1.23)

The art of testing is to select a small, managable set of Test Cases to: - ______ the chances of detecting a fault, while - ______ the chances of wasting a Test Case

maximize minimize or maximizing minimizing or maximizes minimizes

Consider the statement <condition 1> && <condition 2> In Java and C++ the semantics of the && operator are such that if <condition 1> is false, then <condition 2> is not evaluated. What is the technical term for this?

minimal evaluation short-circuit evaluation

Which line of code adds a "title" property to the Book class?

public $title;

The following are metrics for the Implementation Workflow:

size cost duration effort complexity metrics

Black Box Testing is also known as Testing to ________.

specification or specifications

The Integration Process must be run by:

the SQA group


Kaugnay na mga set ng pag-aaral

MGT 312 Final Exam Ch. 10, 11, 12, 13, 14, 16

View Set

Música de los Pobres a Los Ricos Preguntas

View Set

TEMA 1: Conceptualización general y desarrollo psicológico

View Set

System of Linear Equations - Part 1

View Set

Data and Info. Management Chapter 8 continued (Marist College Eitel Lauria)

View Set

Dr Jekyll and Mr Hyde Annotations

View Set

Cells, synapses, and Neurotransmitters

View Set