Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Arrays.php Sub-Task 1: Create an array, $noKeyArray without specifying any key. Display the keys and the corresponding values of the array using the following command:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Arrays.php Sub-Task 1: Create an array, $noKeyArray without specifying any key. Display the keys and the corresponding values of the array using the following command: var_dump($noKeyArray) Display the keys, the values and the key data type of the array using the 'foreach' loop. Sub-Task 2: Create an array, $stringKeyArray with only string keys. Display the keys and the corresponding values of the array using the following command- var_dump($stringKeyArray) Display the keys, the values and the key data type of the array using the 'foreach' loop. Sub-Task 3: Create an array, $intKeyArray with only integer keys. Display the keys and the corresponding values of the array using the following command: var_dump($intKeyArray) Display the keys, the values and the key data type of the array using the foreach' loop. Sub-Task 4: Create an array, $mixedKeyArray with both string and integer keys. Display the keys and the corresponding values of the array using the following command: var_dump($mixedKeyArray) Display the keys, the values and the key data type of the anay using the "foreach' loop. Sub-Task 5: Create a multi-dimensional (2-D) array, $multiDimensionArray. Display the keys and the corresponding values of the array using the following command: var_dump($multiDimensionArray) Display the keys, the values and the key data type of the array using the 'foreach' loop. The sample output for Anays.php is below No Way Array-Output ning var_durre CDs with No Key Are Output steg foreach kuva: wydata na by data 2. ve: 49. kaydet: Integer String Key Array Output using var_dump avaCH"-""key" :-)) String Kay Array Guiput nach by: ke, los cuatro Integer Key Array-Output using var_dump way100-string)" - - Integer Kay Array Output wing forach want to save 1. d. data per layan ba datatyper Med kay Array Output warme vi 1 Mrval"]= ' I")" g(3) "4" I]- H [4] " I 34 , " [1]- Med Key Array-up sing foreach Kebon kwkwa hestar 2. Valoba data type Visa ber: 3. SEE by dating berbeda Multimedial Array-Output using wor_n 24]-> arada ]=> 120 []=> 20 => [21]=> }} Multi-dimmonal Array-Output ning och Level2 ber 10. berdata per by van be Lavabo La data reler ve 3 berdua typer N.B.: It is NOT necessary to make the output identical to the sample output of Arrays.php provided in this documentation. You just need to make sure that you have satisfied all the requirements for Anays.php specified in this documentation. You must include common Header, Menu and Footer to the Arrays.php web page. Hints for retrieving the key data type of the array: In PHP, the built-in function to retrieve the data type of a variable. Svar is: gettype(Svar) Calculator.php Create a calculator using PHP script and HTML form elements that will perform the following mathematical operations: Addition, Subtraction, Multiplication, Division, Exponentiation. This calculator needs to determine whether the calculated result is an even or an odd number. This calculator also needs to determine whether the calculated result is a prime number or not. The calculator should be designed as below: Operating manual for the calculator: In order to operate the calculator, you need to provide numeric values (operands) in two text boxes, select one (+ - X,1, exp) of the operators and then click '=' button. Sample input and output screenshots of the calculator are below: Input screen Output screen sostes als 13 13 is a prime number 10 + 3 13 is an odd number 10 102 8 is NOT a prime number Bis an even number 10 10 reply 30 30 is NOT a prime number 30 is an even number 10 10 divided by 2 5 is a prime number 5 is an odd number 10 exp 3 1000 is NOT a prime number 1000 is an even number You must include common Header, Menu and Footer to the Calculator.php web page. Hints for Exponentiation operation: Exponentiation is a mathematical operation, written as b", involving two numbers, the base b and the exponent or power n. In PHP, the built-in function for exponentiation operation is: pow (bn) Objects.php Create a PHP script that will perform the following tasks. Sub-Task 1: Define an interface Employee with a method displayEmployeeInfo(). Sub-Task 2: Define a class Management which implements Employee interface and contains protected properties: sin, age, salary. Create a constructor method that takes in sin, age, and salary. Implement the method displayEmployeeInfo() to display the properties of each object instance. Sub-Task 3: Define a derived class Manager that inherits from the Management class and contains a private property: adminLevel. You may need to ovemide the constructor and displayEmployeeInfo method for this derived class. Sub-Task 4: Define a class Development which implements Employee interface and contains protected properties: sin, age, salary. Create a constructor method that takes in sin, age, and salary. Implement the method displayEmployeeInfo() to display the properties of each object instance. Sub-Task 5: Define a derived class ITSpecialist that inherits from the Development class and contains a private property: projectAssigned. You may need to override the constructor and displayEmployee Info() method for this derived class. Sub-Task 6: Instantiate (Create) at least two objects of Manager and display the properties of each object instance. Sample output is as follows: Manager SIN: 123456789, Age: 45. Salary: 110000. Admin Level: MG-06 SIN: 987654321, Age: 55, Salary: 120000. Admin Level: MG-07 Sub-Task 7: Instantiate (Create) at least two objects of IT Specialist and display the properties of each object instance Sample output is as follows: IT Specialist SIN: 567451234. Age: 35. Salary: 100000, Assigned Project: TISR SIN: 234451234. Age: 30. Salary: 90000. Assigned Project: HIMS You must include common Header, Menu and Footer to the objects.php web page

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

Step: 3

blur-text-image

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

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions

Question

LO2 Explain the major laws governing employee compensation.

Answered: 1 week ago