成a人片国产精品_色悠悠久久综合_国产精品美女久久久久久2018_日韩精品一区二区三区中文精品_欧美亚洲国产一区在线观看网站_中文字幕一区在线_粉嫩一区二区三区在线看_国产亚洲欧洲997久久综合_不卡一区在线观看_亚洲欧美在线aaa_久久99精品国产_欧美卡1卡2卡_国产精品你懂的_日韩精品91亚洲二区在线观看_国内一区二区视频_91丨国产丨九色丨pron

COMP 315代做、代寫Java/c++編程語言

時間:2024-05-02  來源:  作者: 我要糾錯



Assignment 2: Typescript and React
COMP 315: Cloud Computing for E-Commerce
April 27, 2024
1 Introduction
A reactive website will scale and reorder elements to suit the screen size of the device being used to access it. A
dynamic website will update the elements of the page without the need for a full reload. In this assignment you
will expand upon a skeleton program in order to build a dynamic and reactive e-commerce front end website.
2 Learning outcomes
By the end of this assignment, you will:
• Be able to implement functions using Typescript.
• Be familiar with how to use React components and hooks.
• Have a template website that you could expand upon for a portfolio piece.
3 Problem description
For this task, you have been provided with a skeleton website, as well as the assets to populate it with. At
the moment the site displays the: name, picture, rating, and price of a collection of items for sale. If you type
into the search bar, it will only display items that have your search term within their name. You must add the
following functionality:
• An indicator showing the number of search results or products available.
• Sorting the items by: name, price, or rating.
• The ability to show only in stock items in the search results.
• Adding or removing items from the shopping basket.
• A total cost of products in the shopping basket.
4 Initial setup
The skeleton code has been provided for you, which is a basic e-commerce website similar to the one shown in
lectures. Ensure that you have Node.js installed on your computer, this should come with V ite. Download
the zip file of this code and extract it to a suitable place on your computer. Navigate to that folder in your
terminal, and type npm install. Once this installation has completed, type in npm run dev, which should host
the website locally for you. Take the localhost address shown in the output and type it into your browser to
see the website. There are 4 JSON files included in the ’Assets’ folder, which are random products 1, 100, 150,
and 175. Each of these JSON files contains a list of products to be shown on the website. Each product has
the attributes outlined in Table 1, with the images being generated using Adobe Firefly.
1
Attribute name Note
ID This is a unique identifier for each product, and is an integer
name The name for each product.
price The price of the product in pounds.
category This is the general category of the product.
quantity The number of this product that is currently available in stock. This is a non-negative
integer.
rating This is a real number rating of the product between 0 and 5.
image link The file location of the promotional image.
Table 1: The attributes that are stored for each product
5 Developing the website
5.1 The results indicator
When searching for products, it is often useful to know exactly how many products the current search has
returned. This can help make the website feel more reactive. In the results − indicator paragraph tag, add
a notification about how many results or products the current search query has returned. If the search bar
is empty, then the the output should be nP roducts where n is the number of products. If there is only a
single product then the output should be 1P roduct. If the search bar is not empty, then the output should be
nResults where n is the number of products returned by the search query. If there is only a single product
returned by the query, then it should say 1Result. If there are no results returned by a query then the output
should be Nosearchresultsfound.
5.2 Enhance search functionality
When looking at a list of products, a useful feature is being able to sort them by some attribute such as price
or rating. Add functionality to the select tag inside of the search − bar, so changing the selected option will
result in that form of sorting being applied to the results. Once this task has been completed, add the following
functionality to the inStock checkbox input. When this checkbox is ticked, the results should only include
products that have a quantity larger than 0. Hint: this can be accomplished by using a combination of a state
and a hook.
5.3 Adding to the shopping basket
Each product currently has a button underneath that says ’Add to basket’. Update this code so that if the
quantity available of the product is 0, the button instead says ’Out of stock’ and is disabled. Add a function
to the ’Add to basket’ button that passes the information to a shopping basket variable in App.tsx. This
variable should be a list of type BasketItem. Adding multiple instances of the same product should increase
the quantity property of the relevant basket instance. Do not worry about disabling the product’s button if
the quantity added to the basket is more than the quantity available. Hint: The parent/child example given in
Tutorial 4 - question 7 can give you a good starting point.
5.4 Visualising the basket
Now that the data about the basket is being collected, we should visualise it for the user. If there are no items
in the basket then the shopping − area div should contain a paragraph text saying ’Your basket is empty’. If
the shopping basket variable contains a product, then the shopping −area div should contain that information.
Each item in the basket should be surrounded by a div with the class ’shopping-row’, and a suitable key such as
the name of the item. Inside of that div there should be another div with the class ’shopping-information’, and
a button with ’Remove’ text. The ’shopping-information’ div should contain a paragraph tag which shows the
information about the product in the format [P roductname]([P roductprice]) − [P roductquantity]. When the
’Remove’ button is pressed, then the quantity of that product in the basket should be reduced by 1. If pressing
that button reduces the quantity of the product to 0, then that item should be removed from the shopping
basket. At the bottom of the shopping −area div should be a paragraph tag with the total cost of the shopping
basket. This should be in the form of T otal : [T otalbasketcost]. This value should be shown to 2 decimal places.
2
6 Marking
Your completed assignment will be submitted through the Canvas submission system. This will account for
10% of your overall module score. You may use any library that comes with a default installation of Node.js.
Each variable should have the appropriate type, if the ’any’ type is required than a comment must be included
that justifies it’s use. This rule is in place to encourage the use of Typescript type checking instead of just
Javascript. Your work will be submitted to an automatic plagiarism/collusion detection system, and those exceeding a threshold will be reported to the Academic Integrity Officer for investigation regarding adhesion to the
university’s policy https://www.liverpool.ac.uk/media/livacuk/tqsd/code-of-practice-on-assessment/appendix
L cop assess.pdf.
7 Deadline
The deadline is 23:59 GMT Sunday the 12th of May 2024. Late submissions will have the typical
5% penalty applied for each day late, up to 5 days. Submissions after this time will not be marked. https:
//www.liverpool.ac.uk/aqsd/academic-codes-of-practice/code-of-practice-on-assessment/
8 Expansions for a portfolio piece
If you decided to expand upon this short example in order to create a portfolio piece, which I stress is not
something you have to do for the assignment, then you will need to make several changes. My suggestion for
these changes would be:
• Redesign the site to be more visually appealing, focus on the reactivity and showing off that it works on
all form factors of device.
• Use Next.js to add individual pages for each product. This will also mean that you’ll have to look into
how to allow the user to return to the search results.
• Connect to a database, such as Neo4j, as this is crucial in showing you understand role of the front end

.請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp


















 

標簽:

掃一掃在手機打開當前頁
  • 上一篇:代寫COM6511、代做Python設計程序
  • 下一篇:代寫program、代做c/c++,Python語言編程
  • 無相關信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • NBA直播 短信驗證碼平臺 幣安官網下載 歐冠直播 WPS下載

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    成a人片国产精品_色悠悠久久综合_国产精品美女久久久久久2018_日韩精品一区二区三区中文精品_欧美亚洲国产一区在线观看网站_中文字幕一区在线_粉嫩一区二区三区在线看_国产亚洲欧洲997久久综合_不卡一区在线观看_亚洲欧美在线aaa_久久99精品国产_欧美卡1卡2卡_国产精品你懂的_日韩精品91亚洲二区在线观看_国内一区二区视频_91丨国产丨九色丨pron
    日韩女优毛片在线| 国产精品乱人伦中文| 久久久午夜精品理论片中文字幕| 亚洲黄一区二区三区| 国产一区二区三区精品欧美日韩一区二区三区 | 高清视频一区二区| 欧美成人一区二区三区| 亚洲成人你懂的| 欧洲精品在线观看| 亚洲色图制服丝袜| 成人av资源在线| 国产欧美精品国产国产专区| 黄一区二区三区| 精品国产乱码久久久久久牛牛| 日韩高清一区二区| 欧美精品xxxxbbbb| 午夜久久久影院| 欧美美女一区二区在线观看| 亚洲午夜电影网| 欧美在线视频不卡| 亚洲国产综合视频在线观看| 色88888久久久久久影院按摩| 国产精品乱码久久久久久| 国产精品亚洲综合一区在线观看| 精品国产乱码久久久久久牛牛 | 欧美剧情片在线观看| 一区二区三区产品免费精品久久75| 99久久久国产精品免费蜜臀| 成人免费在线视频观看| 国产a精品视频| 欧美国产激情一区二区三区蜜月| 国产黑丝在线一区二区三区| 国产亚洲欧美日韩俺去了| 国产精品1区二区.| 日本一区二区不卡视频| 成人国产亚洲欧美成人综合网 | 午夜精品久久久久久久久| 久久综合网色—综合色88| 国产精品久线观看视频| 国产精品亚洲一区二区三区妖精| 精品久久国产字幕高潮| 久久精品国产精品亚洲精品| 日韩免费高清视频| 久久99精品久久久| 久久亚区不卡日本| 成人午夜激情在线| 亚洲色图在线播放| 在线看一区二区| 亚洲3atv精品一区二区三区| 欧美一区二区人人喊爽| 激情小说亚洲一区| 欧美国产一区二区| 色综合网站在线| 午夜免费欧美电影| 精品久久久网站| 国产91精品免费| 亚洲乱码精品一二三四区日韩在线 | 日韩精品亚洲一区二区三区免费| 欧美一级理论片| 国产一区二区在线视频| 国产精品亲子伦对白| 色婷婷激情综合| 日日摸夜夜添夜夜添精品视频| 91精品在线麻豆| 久久精品72免费观看| 欧美激情艳妇裸体舞| 色综合久久88色综合天天免费| 一区二区三区在线不卡| 91精品国产91热久久久做人人 | 91在线你懂得| 午夜视频一区在线观看| 精品成人佐山爱一区二区| www.视频一区| 视频一区二区三区入口| 久久久久国产精品人| 色老综合老女人久久久| 蜜臀av一级做a爰片久久| 国产欧美一区二区在线| 欧美亚洲国产一区二区三区va | 国产·精品毛片| 一个色妞综合视频在线观看| 日韩一区二区三区电影在线观看| 国产高清成人在线| 亚洲午夜久久久| 久久亚洲二区三区| 在线视频你懂得一区| 黄色成人免费在线| 一区二区三区在线影院| 精品国产乱码久久久久久蜜臀| 91啪九色porn原创视频在线观看| 全国精品久久少妇| 1024成人网色www| 91精品国产综合久久精品麻豆| 成人黄色大片在线观看| 日本91福利区| 亚洲日本在线a| 精品国产一区二区亚洲人成毛片 | 最近中文字幕一区二区三区| 91精品国产欧美日韩| 成人动漫中文字幕| 美女一区二区三区在线观看| 欧美视频一区二区三区四区| 亚洲欧洲一区二区三区| 欧美日韩久久一区二区| 国产老肥熟一区二区三区| 一区二区三区蜜桃| 国产亚洲欧洲一区高清在线观看| 精品视频1区2区| 成人av电影在线观看| 奇米777欧美一区二区| 国产精品毛片久久久久久久| 日韩午夜在线观看视频| 一本一道久久a久久精品| 久久91精品国产91久久小草| 亚洲一区二区欧美激情| 国产精品三级在线观看| 日韩精品中文字幕一区二区三区 | 精品一区免费av| 亚洲香蕉伊在人在线观| 国产精品久久久久精k8 | 亚洲成精国产精品女| 亚洲国产精品高清| 日韩免费看网站| 欧美日韩日本视频| 一本色道亚洲精品aⅴ| 国产精品一区久久久久| 男人的j进女人的j一区| 亚洲综合视频网| 自拍偷在线精品自拍偷无码专区| 国产精品一区二区三区乱码| 亚洲成av人片| 樱桃国产成人精品视频| 国产精品超碰97尤物18| 国产欧美精品一区二区色综合朱莉 | 欧美日韩一二三| 91亚洲国产成人精品一区二三| 国产丶欧美丶日本不卡视频| 蜜桃视频第一区免费观看| 午夜视频在线观看一区二区三区| 亚洲激情欧美激情| 亚洲欧美电影一区二区| 国产精品久久久久影院色老大| 国产亚洲精品精华液| 精品99999| 精品1区2区在线观看| 欧美大片国产精品| 日韩欧美黄色影院| 日韩欧美美女一区二区三区| 欧美一区二区三区喷汁尤物| 欧美日韩aaa| 精品视频免费在线| 欧美午夜视频网站| 欧美视频第二页| 欧美日韩午夜影院| 欧美日韩高清一区| 欧美视频一二三区| 欧美视频在线一区二区三区| 欧美性一级生活| 欧美日韩精品欧美日韩精品一| 欧美日韩一区二区在线观看| 欧美丝袜丝交足nylons| 欧美色综合网站| 欧美肥大bbwbbw高潮| 91精品一区二区三区久久久久久 | 1区2区3区国产精品| 中文字幕一区不卡| 亚洲美女区一区| 亚洲伊人伊色伊影伊综合网| 性做久久久久久免费观看欧美| 丝袜诱惑亚洲看片| 久久精品国产亚洲高清剧情介绍| 蜜臀av一区二区| 国产一区视频导航| 成人涩涩免费视频| 91网站黄www| 欧美日韩性生活| 3751色影院一区二区三区| 日韩无一区二区| 26uuu亚洲| 国产精品久久久久久久久图文区 | 亚洲成年人网站在线观看| 午夜精品成人在线视频| 美女视频黄免费的久久| 韩国v欧美v亚洲v日本v| 日本亚洲视频在线| 国产日产精品1区| 国产日产欧产精品推荐色| 中文字幕精品在线不卡| 中文字幕一区二区三区不卡在线 | 精品国产91乱码一区二区三区| 精品福利一区二区三区 | 国产成人av一区二区三区在线| 顶级嫩模精品视频在线看| 91视频www| 欧美老肥妇做.爰bbww视频| 精品久久久久久综合日本欧美| 中文字幕欧美区| 一片黄亚洲嫩模| 久久精品噜噜噜成人88aⅴ| 懂色av一区二区夜夜嗨|