Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. Which of the following best describes an object? It is a specific instance of a class. b) It is the general description of a

. Which of the following best describes an object?

It is a specific instance of a class.

b) It is the general description of a type of thing.

c. It is a method of a class.

d. It is an attribute of a class.

. To instantiate an object in PHP from the class Artist, you would use which of the following?

$example new Artist);

b.) example new $Artist();

c. example _construct();

d. example construct("Artist")

e. None of the above

. Consider the following class:

class IdentifyMyParts {

public static $x = 7;

public $y = 3;

}

What is the output from the following code:

$a=new ldentifyMyParts();

$b=- new IdentifyMyParts();

$c=new IdentifyMyParts();

$a->y= 5;

$b->y= 6;

IdentifyMyParts:$x=1;

IdentifyMyParts: $x= 2;

echo "a->y=.$a->y. " ;

echo "b->y=..$b-y." ;

echo "c->y=- $c->y. " ";

echo IdentifyMyParts::x= . IdentifyMyparts::$x;

. Write SOL statement to create a table named college with the following columns:

collegeld (this is primary key and should be auto incremented)

Name (varchar with 255 characters)

Address (varchar with 255 characters)

. Write SQL statement to create a table named students with the following columns: d. studentid (this is primary key and should be auto incremented)

e. firstName (varchar with 255 characters)

f. lastName (varchar with 255 characters)

g. gpa (float)

. Write SQl statement to insert a college into the college table. use Century College for the name and "3300 white bear ave" for the address.

. Write SQL statement to insert a student into the student table. Use "john", "smith", 3.4 for firstname, lastname and gpa, respectively.

. PHP language is composed out of three main modules. List those modules and briefly describe each one of them.

. The following script is used in a bookstore to determine how many discount coupons a customer gets. Complete the table that appears after the script.

$books;; // see table below for different values.

$coupon;

if ($books < 1)

$coupon= 0;

else if ($books <3)

$coupon=1;

else if ($books<5)

$coupon=2;

else

$coupon=3;

?>

._____are divided into elements, each of which acts like an individual variable?

. Data submitted through the HTTP post method is store in array $_POST.

g. True

h. False

. In the PHP code below, the string "cat" is a(n)____?

$abc= $example["cat"];

array

array value

ordered map

array element

array key

. The_____function in PHP returns an array of strings, each of which is a substring of main string formed by splitting it on boundaries formed by a delimiter.

explode

substring

delimit

array

file

. What classes of information are available via the $_SERVER super global array?

14.Variable created outside of function in the main script are available within the function. (Explain by giving an example)

.What will be the output of the following script?

$numbers=[ 100. 200,300,400];

$values=array("Hello", 'world",from", "csci2006");

For ($i< count ($numbers);$i++)

{

echo "numbers[$i]=.$numbers[$i].
;

echo "values[$i]= .$value[$i].
;

"?>

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is human nature?

Answered: 1 week ago