Question: COMP 1 2 3 0 Assignment 1 Topics and learning objectives! 1 . Variables, expressions, data types 2 . Arrays 3 . Forms, $ _

COMP1230 Assignment 1
Topics and learning objectives!
1. Variables, expressions, data types
2. Arrays
3. Forms, $_GET, $_POST
4. Conditional statements and comparison operators
5. Iteration statements (for, while, do-while)
6. Functions
How to submit!
Task Description
The aim of this assignment is to create an online store to sell a product of your choice. Compile a PHP code using these steps.
Specific requirements are listed later in this manual. Here is a broad overview:
The store sells one particular kind of product (e.g., video games, supplements, clothes, etc.)
Within this product, you should have 3 categories (e.g.,Adventure,Shooter,Puzzle, etc.)
Within each category, you should have 3 products (e.g.,Mario,Zelda,Metroid, etc.)
3 categories x 3 products =9 total products in the store.
Each product will have a price associated with it.
A customer should be able to choose what products they want to purchase from the store,
and your website should calculate their total price.
The requirements are listed below, along with examples of a store that sells TVs.
Note: your store should not sell TVs. Otherwise, you will just be copying the example.
CONTINUED ON NEXT PAGE
Group(s): 806451/5
COMP1230 Assignment 1
Task Requirements
1. Your code should be clean, and follow good coding practises [5 Marks].
Good code will have the following qualities:
i. Comments are used to explain the logic of your code. You dont have to explain your basic
code, syntax, etc. Instead, explain why your code is written a certain way (e.g., what your
if-statement is checking, what your array represents, etc.).
ii. Variables have sensible, human-readable names (e.g., $categories is better than $c).
iii. Use indentation inside if-statements, loops, function definitions, multi-line arrays, etc.
iv. Proper spacing around operators, function parameters, etc. (e.g.,
$choice == $categories[$i] is better than $choice==$categories[$i])
v. No redundant code (i.e., code that doesnt do anything, or is just used for testing, etc.)
2. Any PHP file that you make should have the following code at the bottom, so that the source
code is shown on the page [1 Mark].
echo "

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!