• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 14 pages
Exam (elaborations)

CMSC389N Final Exam Study Guide

Document preview thumbnail
Preview 2 out of 14 pages

CMSC389N Final Exam Study Guide ...

Content preview

CMSC389N Final Exam Study Guide


Using the <img> tag define a image entry where the image name is myPhoto.jpg and the
message "Customer Photo" will appear when the image cannot be displayed. - ANSWER
<img src="myPhoto.jpg" alt="Customer Photo">

Define a CSS rule that associates the color blue with links that have not been visited. -
ANSWER a:visited {

color: purple;

}

What is the difference between an id selector and a class selector? - ANSWER Class
selector allow us to apply the same rules to many elements; an id selector allows to
apply rules to only one element. Another difference: class selectors are defined using #;
id selectors using a period.

Which of the following are considered false in PHP? Circle all that apply.

a. 0

b. "" (empty string)

c. false

d. 10

e. "0" - ANSWER a., b., c., e.

What is the difference between == and === while comparing objects? - ANSWER = = true
if two objects have same attributes and values and are instances of the same class; = = =

true if and ony if the two variables refer to the same object instance

Using PHP define a constant called MAX_LENGTH that has a value of 50. - ANSWER
define("MAX_LENGTH", 50);

What takes place when a file included using require_once is not found? - ANSWER A
fatal error will take place and the script will be terminated.

What is an empty variable? (PHP) - ANSWER a variable that has a value that evaluates to
false.

Name two differences that exits between echo and print. - ANSWER i. Print returns a
value; echo does not

ii. echo can print expressions separated by commas

, What is HTTP? - ANSWER Protocol that defines how user agents (e.g., browser) and web
server can communicate. Accept as valid Hypertext Transfer Protocol

Provide an example of what is possible by using server side includes. - ANSWER file
inclusion, timestamp for file modification, timestamp for local date / time or any other
valid one they may have provided.

In HTML what is the difference between an inline element and a block element? -
ANSWER Block elements begin on new lines whereas inline elements don't. Any other
valid difference receives full credit.

Which of the following are VALID variable names (will not cause an error during script
execution) in PHP? Circle the valid ones.

a. $age_55

b. $LOCATION

c. Area

d. window_position$ - ANSWER a. and b.

Name three PHP superglobals seen in class. - ANSWER $_GET, $_POST, $_COOKIE,
$_FILES, $_SERVER, $_ENV, $_REQUEST, $_SESSION

We have defined a PHP function as follows:

function process() { echo "hello"; }

Which of the following are VALID ways to call the function?

a. Process();

b. process();

c. PROcess();

d. None of the above. - ANSWER a., b., c.

Name two uses we saw in class for the header function. - ANSWER Redirection to a site
(e.g., header("Location:http://www.cs.umd.edu")) Authentication (to ask for a username
and password via a pop-up window)

Name one reason why you want to use post over get when submitting data to a server. -
ANSWER Security (password information will not be in the URL),

Amount of information to be sent is large,

The request changes the state of the server (e.g., adding or removing data from a
database)

Document information

Uploaded on
April 7, 2025
Number of pages
14
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Evergreenview
4.8
(5)
Sold
19
Followers
1
Items
3302
Last sold
1 week ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions