Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
assessment1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cosc360 in 2019
assessment1
Commits
d3720ff2
Commit
d3720ff2
authored
5 years ago
by
Will Billingsley
Browse files
Options
Downloads
Patches
Plain Diff
Added missing grocery_shop variable
parent
81568c89
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+3
-7
3 additions, 7 deletions
README.md
index.html
+32
-0
32 additions, 0 deletions
index.html
with
35 additions
and
7 deletions
README.md
+
3
−
7
View file @
d3720ff2
...
...
@@ -209,11 +209,7 @@ In the index.html file we have specified a global variable called `grocery_shop`
*
Welcome users to the shop
*
Allow the users to choose which isle they are shopping in
*
Allow the users to add items to their cart
*
For simplicities sake, all items will have a drop-down that has p
re
-
de
term
ined
quantities and costs
.
*
Costs for the items a
re
de
f
ined
in the JSON
.
*
Users should be able to add multiple of the same item to their cart
*
Have a check-out page that displays the cart in a table, each row containing the item, per instance cost, amount, and how much it is in total.
*
The check-out page should also display the total
*
The check-out page should allow users to cancel their order for an item.
*
This shouldn't get confused if I order e.g. "3 apples" and "5 apples" separately and cancel the "3 apples" - I still want "5 apples"!
*
Below the items, the page should also display the running total cost of the order
\ No newline at end of file
We might use a different
`grocery_shop`
value that follows the same structure for marking.
This diff is collapsed.
Click to expand it.
index.html
+
32
−
0
View file @
d3720ff2
...
...
@@ -38,6 +38,38 @@
<script
src=
"provided.js"
></script>
<script>
grocery_shop
=
{
aisles
:
[
{
name
:
"
fruit and veg
"
,
items
:
[
{
name
:
"
apples
"
,
cost
:
"
4.50
"
,
per
:
"
kg
"
},
{
name
:
"
bananas
"
,
cost
:
"
3.50
"
,
per
:
"
kg
"
},
{
name
:
"
mandarins
"
,
cost
:
"
2.50
"
,
per
:
"
kg
"
}
]
},
{
name
:
"
bakery
"
,
items
:
[
{
name
:
"
sandwich loaf
"
,
cost
:
"
2.50
"
,
per
:
"
ea
"
},
{
name
:
"
tiger loaf
"
,
cost
:
"
3.50
"
,
per
:
"
ea
"
},
{
name
:
"
baguette
"
,
cost
:
"
2.50
"
,
per
:
"
ea
"
},
{
name
:
"
cob
"
,
cost
:
"
1.50
"
,
per
:
"
ea
"
}
]
},
{
name
:
"
biscuits
"
,
items
:
[
{
name
:
"
jaffa cakes
"
,
cost
:
"
2.50
"
,
per
:
"
200g
"
},
{
name
:
"
fig rolls
"
,
cost
:
"
3.50
"
,
per
:
"
150g
"
},
{
name
:
"
jam drops
"
,
cost
:
"
2.50
"
,
per
:
"
300g
"
}
]
}
]
}
</script>
<script
src=
"studentcode.js"
></script>
</body>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment