日本欧洲视频一区_国模极品一区二区三区_国产熟女一区二区三区五月婷_亚洲AV成人精品日韩一区18p

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)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區(qū)
    昆明西山國家級風景名勝區(qū)
    昆明旅游索道攻略
    昆明旅游索道攻略
  • NBA直播 短信驗證碼平臺 幣安官網下載 歐冠直播 WPS下載

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

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

    日本欧洲视频一区_国模极品一区二区三区_国产熟女一区二区三区五月婷_亚洲AV成人精品日韩一区18p

              欧美视频在线观看 亚洲欧| 亚洲视频在线二区| 久久久精品动漫| 欧美日韩在线高清| 久久综合伊人77777麻豆| 日韩视频不卡中文| 国产亚洲欧美一级| 欧美激情精品久久久| 午夜在线播放视频欧美| 亚洲电影免费| 国产人成精品一区二区三| 狼人社综合社区| 亚洲一区二区三区乱码aⅴ蜜桃女 亚洲一区二区三区乱码aⅴ | 亚洲国产另类久久精品| 欧美网站大全在线观看| 久久亚洲国产成人| 亚洲欧美日韩直播| 亚洲精品日韩综合观看成人91| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久 | 欧美成人xxx| 亚洲一区免费视频| 亚洲老司机av| 黄色日韩网站| 国精品一区二区| 国产精品视频免费在线观看| 欧美精品一区二区在线播放| 久久青草欧美一区二区三区| 午夜精品一区二区三区在线播放 | 国产美女精品视频| 欧美日韩在线一区二区| 欧美激情第三页| 免费看的黄色欧美网站| 久久成人亚洲| 欧美中文字幕第一页| 亚洲综合激情| 亚洲字幕在线观看| 亚洲影音一区| 午夜亚洲影视| 性欧美8khd高清极品| 亚洲一级在线观看| 亚洲一级黄色av| 亚洲网站在线| 午夜精品视频在线观看| 亚洲欧美日韩精品一区二区| 亚洲视频欧美在线| 亚洲一区在线免费观看| 亚洲欧美日韩一区在线| 午夜精品久久一牛影视| 亚洲欧美日产图| 欧美一区二区三区在| 欧美在线欧美在线| 久久人人爽人人爽| 欧美成人精品h版在线观看| 免费久久99精品国产| 欧美福利一区二区| 欧美黄网免费在线观看| 欧美日韩情趣电影| 国产精品私拍pans大尺度在线| 国产欧美日韩不卡| 激情五月婷婷综合| 亚洲欧洲日本在线| 亚洲神马久久| 欧美在线精品免播放器视频| 久久久噜噜噜久噜久久| 欧美凹凸一区二区三区视频| 欧美激情国产高清| 欧美视频观看一区| 国产日韩欧美在线视频观看| 精品999在线播放| 亚洲最新色图| 久久国产乱子精品免费女| 久久亚洲春色中文字幕久久久 | 欧美日韩系列| 国产一区二区三区精品欧美日韩一区二区三区 | 一区二区国产日产| 久久精品视频在线播放| 欧美精品乱码久久久久久按摩| 欧美偷拍一区二区| 精品动漫3d一区二区三区免费版 | 久久综合网络一区二区| 欧美日韩第一区| 国产日韩在线看片| 欧美日本一区二区三区| 狠狠爱成人网| 国产精品99久久久久久宅男| 久久久91精品国产一区二区精品| 欧美成人一区二免费视频软件| 国产精品v日韩精品v欧美精品网站| 国产午夜一区二区三区| 一区二区三区免费网站| 久久夜色精品国产亚洲aⅴ| 欧美视频不卡| 亚洲激情在线激情| 久久狠狠久久综合桃花| 国产精品久久一卡二卡| 亚洲激情视频网站| 久久精品天堂| 国产欧美日韩精品一区| 亚洲视频一起| 欧美日韩国内自拍| 亚洲黄色性网站| 久久久人成影片一区二区三区观看| 国产精品www| 一区二区免费看| 欧美激情第六页| 18成人免费观看视频| 久久国产直播| 国产在线乱码一区二区三区| 亚洲一区二区三区777| 欧美日韩精品三区| 99国产精品99久久久久久粉嫩| 免费欧美电影| 亚洲第一色在线| 免费在线亚洲欧美| 在线免费观看日韩欧美| 久久一区二区三区四区五区| 国产亚洲欧美另类一区二区三区| 亚洲一区二区三区在线观看视频| 欧美日韩国产一级| 日韩视频二区| 国产精品扒开腿爽爽爽视频| 在线中文字幕不卡| 欧美视频第二页| 亚洲视频一起| 国产精品久久久久久福利一牛影视| 日韩亚洲欧美一区| 裸体一区二区| 亚洲国产精品va在线看黑人动漫| 久久久之久亚州精品露出| 国产精品资源| 亚洲男人第一av网站| 欧美视频久久| 亚洲欧美日韩直播| 好看的日韩视频| 欧美国产乱视频| 亚洲手机在线| 国模吧视频一区| 欧美精品粉嫩高潮一区二区| 亚洲视频在线二区| 国内成+人亚洲| 欧美激情综合亚洲一二区| 亚洲制服av| 亚洲国产欧美日韩| 国产精品久久久久久久久久三级| 欧美一区二区三区在线观看视频 | 欧美日韩p片| 欧美亚洲在线视频| 亚洲电影一级黄| 欧美午夜大胆人体| 久久婷婷激情| 亚洲一区二区成人在线观看| 在线不卡中文字幕播放| 欧美视频中文字幕| 久久综合网hezyo| 亚洲欧美日韩国产中文在线| 亚洲国产成人久久综合一区| 国产精品久久综合| 免费短视频成人日韩| 午夜精品在线| 99热精品在线观看| 极品裸体白嫩激情啪啪国产精品| 欧美视频在线看| 欧美成人午夜激情在线| 欧美一区免费| 亚洲一区二区三区在线观看视频 | 欧美诱惑福利视频| 在线观看欧美亚洲| 国产精品va在线播放| 久久99在线观看| 亚洲女同精品视频| 在线视频中文亚洲| 亚洲激情自拍| 亚洲电影免费观看高清| 国产一区二区三区在线观看免费视频 | 欧美激情精品| 久久久免费精品| 午夜免费在线观看精品视频| 一本久久综合| 中文精品视频一区二区在线观看| 亚洲激情第一页| 激情五月婷婷综合| 国内视频一区| 黄色国产精品| 永久久久久久| 亚洲国产岛国毛片在线| 一色屋精品亚洲香蕉网站| 国产亚洲欧美一区在线观看| 国产欧美亚洲日本| 国产一区二区福利| 国产伊人精品| 亚洲第一主播视频| 精品av久久久久电影| 亚洲精品国久久99热| 亚洲一区二区三区中文字幕在线 | 国产欧美一区二区三区另类精品 | 久久久久综合一区二区三区| 欧美激情a∨在线视频播放| 国产精品成人一区| 在线精品视频在线观看高清 | 欧美午夜精品久久久久久人妖 |