HSYD300 1 Jan Jun2025 FA1 RM V3 06012025
HSYD300 1 Jan Jun2025 FA1 RM V3 06012025
Weighting: 40%
Instructions
1 HSYD300-1-Jan-Jun2025-FA1-RM-V3-06012025
Learning outcomes assessed in this assessment:
• Understand the theory of material design and its effects on the GUI.
• Understand the structure of PHP
• Variables and constants
• Benefits of using predefined constants in programming
• Variable access and scopes
• The flow of logic in a PHP program through dry running/code inspection
• Operation and behaviours of common PHP functions
• Error handling
• String manipulation
• Function definition and function calling
• Return values from functions
• PHP file processing
• Arithmetic operators, function definitions and function calls
You are tasked with designing a PHP-based product management system for an e-
commerce platform. The system will allow users (store owners) to manage their
product inventory with functionalities for adding, editing, deleting, and viewing
products. Additionally, the system should calculate the total price based on product
quantities and prices, helping the store owner assess stock value.
Required
2 HSYD300-1-Jan-Jun2025-FA1-RM-V3-06012025
Rubric
Criteria Marks
HTML structure: Create a basic HTML layout with forms, tables, and 5
buttons.
PHP logic: Implement PHP code to handle form submissions, data 2
processing, and display.
Data storage: Use an array to store product information. 5
Control structures: Employ conditional statements (if-else, switch) and 2
loops (for, while) to control program flow.
Functions: Define functions for common tasks like adding, editing, 7
deleting, and displaying products.
Data validation: Ensure user input is valid non-empty price and numeric 2
for price).
Error handling: Implement error handling mechanisms to prevent 2
unexpected behaviour.
Design an application that calculates the speed required for a car to catch up with
another car that is 40 kilometres ahead. The user should input the car's speed ahead
and the time that has elapsed since the car started. Additionally, the application
should:
3 HSYD300-1-Jan-Jun2025-FA1-RM-V3-06012025
Rubric
Criteria Marks
String handling: Format the calculated speed with appropriate units and 4
decimal places.
File handling: Create and write calculation data to a file (e.g., txt). 4
User input: Handle user input (e.g., speed of car ahead, time elapsed) 4
and validate it.
You are tasked with designing a game called "Leap of the Frog" with a MySQL
database. In this game, players help a frog cross a river by timing its jumps based on
the leaves that fall onto the river. The river has several positions, and the frog can only
jump to positions where a leaf has landed. The goal is to get the frog safely across the
river as quickly as possible.
Ultimately, you are required to design an application that simulates a frog attempting
to cross a river. The frog starts on one bank (position 0) and needs to reach the
opposite bank (position X+1). Leaves fall from a tree onto the river, and the frog can
only jump to positions covered by leaves. Given an array A representing the positions
of falling leaves over time, determine the earliest time the frog can cross the river.
4 HSYD300-1-Jan-Jun2025-FA1-RM-V3-06012025
Database Structure:
Create a MySQL database table named leaf_positions with the following columns:
Rubric
5 HSYD300-1-Jan-Jun2025-FA1-RM-V3-06012025
Question 4 [20 marks]
You are tasked with designing an Olympic fantasy game. In this game, players assume
the role of an Olympic event manager responsible for recording, organising, and
managing the results of various Olympic competitions. The goal is to manage and
retrieve results efficiently, ensuring the accuracy and timeliness of the records.
1. Input results: Enter the athlete's name, event, and result for each Olympic
competition.
2. View results: Display a list of all recorded results, sorted by event or athlete.
3. Search results: Search for results based on athlete name, event, or result.
Rubric
Criteria Marks
HTML forms: Create HTML forms with appropriate input fields (text, 5
number, select) for data entry.
PHP data handling: Use PHP to retrieve and process form data, validate 5
input, and interact with the database.
HTML5 enhancements: Utilize HTML5 features like required, placeholder, 2
datalist, and input types (e.g., date, time) for enhanced user experience.
User tracking: Implement session tracking to store user preferences and 3
maintain session information.
HTTP authentication: Use HTTP authentication (e.g., Basic, Digest) for 2
password-protected areas.
Database: Create a MySQL database table to store Olympic results data. 3
6 HSYD300-1-Jan-Jun2025-FA1-RM-V3-06012025