This test has three tasks. It is due at the end of the period.
All of your work will be stored in the folder:
That folder already contains html.html, js.html, php.php
(all empty) and camera.jpg. Put your work in those files.
| Task | File | Weight |
|---|---|---|
| 1 - HTML | html.html | 50% |
| 2 - JavaScript | js.html | 25% |
| 3 - PHP | php.php | 25% |
Each task is marked on its own Level 1 to 4 scale based on what works. Code commenting, formatting and variable/function naming will move the mark up or down.
Rebuild the page in the picture as closely as you can in html.html.
The image is camera.jpg.
Things the picture cannot show you:
Page to replicate (working demo)
Rebuild the demo in js.html. Clicking Resize must call a function you write.
Try the demo several times with different numbers to see everything it does.
Page to replicate (working demo)
Rebuild the demo in php.php. Reload the demo a few times and watch what changes.
$equipment = [
["Tripod", rand(0, 3)],
["Camera bag", rand(0, 3)],
["Zoom lens", rand(0, 3)],
["Flash", rand(0, 3)],
["Memory card", rand(0, 3)],
["Light reflector", rand(0, 3)]
];
Reminder: print_r($equipment); prints the whole array so you can see what is inside it.
if statement makes the row green for every item with a quantity above 0, and the three totals are correct.