狠狠综合久久久久综合网址-a毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线

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毛片网站-欧美啊v在线观看-中文字幕久久熟女人妻av免费-无码av一区二区三区不卡-亚洲综合av色婷婷五月蜜臀-夜夜操天天摸-a级在线免费观看-三上悠亚91-国产丰满乱子伦无码专区-视频一区中文字幕-黑人大战欲求不满人妻-精品亚洲国产成人蜜臀av-男人你懂得-97超碰人人爽-五月丁香六月综合缴情在线
  • <dl id="akume"></dl>
  • <noscript id="akume"><object id="akume"></object></noscript>
  • <nav id="akume"><dl id="akume"></dl></nav>
  • <rt id="akume"></rt>
    <dl id="akume"><acronym id="akume"></acronym></dl><dl id="akume"><xmp id="akume"></xmp></dl>
    成人在线免费观看视频网站| av观看免费在线| 黑森林福利视频导航| 久久久国内精品| 小泽玛利亚av在线| 日本不卡一区二区三区四区| 999这里有精品| 最新中文字幕2018| 国产精品天天av精麻传媒| 久久精品一区二| 日韩中文字幕组| 日本xxxx黄色| 亚洲午夜精品一区| 992kp免费看片| 日本一区二区三区四区五区六区| 成年人免费观看的视频| 五月天婷婷影视| 天天干天天草天天| 一区二区三区日韩视频| 欧美日韩亚洲国产成人| 青青视频免费在线| 国产中文字幕二区| 国产精品免费成人| 另类小说色综合| 在线一区二区不卡| 欧美性受黑人性爽| 成人在线观看你懂的| av之家在线观看| 亚洲黄色av网址| 伊人再见免费在线观看高清版| www污在线观看| 久久久久久久久久久久久国产精品| 一道本视频在线观看| 精品久久久无码人妻字幂| 久操网在线观看| 九九热免费在线观看| 真人做人试看60分钟免费| 久久久亚洲精品无码| 99九九99九九九99九他书对| 欧美乱做爰xxxⅹ久久久| 男女午夜激情视频| av电影一区二区三区| 亚洲欧洲日产国码无码久久99 | www.99热这里只有精品| 无码无遮挡又大又爽又黄的视频| 国产黑丝在线视频| 男女曰b免费视频| 精品国产三级a∨在线| 久草在在线视频| 国产 欧美 日韩 一区| xxxx在线免费观看| 欧美污视频网站| 女人被男人躁得好爽免费视频 | 亚欧在线免费观看| 免费拍拍拍网站| 蜜桃网站在线观看| 午夜大片在线观看| 四季av一区二区| 日韩avxxx| 日韩欧美亚洲天堂| 激情五月宗合网| 和岳每晚弄的高潮嗷嗷叫视频| 亚洲高清视频免费| 亚洲一级片av| 在线视频日韩欧美| 五月天av影院| 日韩最新中文字幕| 日本丰满大乳奶| 亚洲天堂第一区| www.欧美黄色| 欧美人成在线观看| 日本免费不卡一区二区| avav在线播放| 91传媒久久久| 色播五月激情五月| caoporm在线视频| 成人在线免费观看网址| 国产一区一区三区| 精品少妇人妻av免费久久洗澡| 日韩精品在线视频免费观看| 日韩成人手机在线| 麻豆传媒网站在线观看| 日本一本中文字幕| 日本人妻伦在线中文字幕| 18视频在线观看娇喘| 国产欧美自拍视频| 日本在线视频www色| 一区二区三区一级片| 欧美图片激情小说| 国产精品久久久久久久久电影网| 91福利免费观看| 999久久久精品视频| 亚洲视频一二三四| 中文字幕一区二区在线观看视频 | 污污视频网站在线| 欧美精品自拍视频| www.这里只有精品| 欧美大片久久久| 污污视频在线免费| 大胆欧美熟妇xx| 91丨porny丨探花| 日本韩国欧美在线观看| 九色91popny| 91 视频免费观看| 真人做人试看60分钟免费| www.av蜜桃| 亚洲免费999| 妞干网这里只有精品| 日韩精品综合在线| 大片在线观看网站免费收看| 日韩av播放器| 不卡中文字幕在线观看| av中文字幕av| 91av在线免费播放| 视色视频在线观看| 国产av熟女一区二区三区| 91免费视频黄| 成人性生生活性生交12| 亚洲激情免费视频| av免费中文字幕| 秋霞在线一区二区| av片中文字幕| 偷拍盗摄高潮叫床对白清晰| 日本一区午夜艳熟免费| 操人视频免费看| 久久美女福利视频| 400部精品国偷自产在线观看| 久久国产成人精品国产成人亚洲| 免费黄频在线观看| 久久综合色视频| 天天摸天天舔天天操| 日韩一级片播放| 成人中文字幕在线播放| 日本久久高清视频| 91高清国产视频| 午夜免费高清视频| 成人av在线播放观看| 亚洲av综合色区| 天天摸天天舔天天操| 黄色免费网址大全| 日日碰狠狠添天天爽超碰97| 手机在线视频你懂的| 午夜宅男在线视频| 成人在线观看a| 丝袜老师办公室里做好紧好爽 | 国内少妇毛片视频| 亚洲欧美天堂在线| 自拍偷拍一区二区三区四区| 999精品网站| 人妻少妇被粗大爽9797pw| a√天堂在线观看| 欧美日本视频在线观看| 日本香蕉视频在线观看| 欧美交换配乱吟粗大25p| 日本一二三区视频在线| 日韩精品第1页| 秋霞无码一区二区| 国产中文字幕在线免费观看| 国产精品一区二区免费在线观看| 国产 欧美 日本| 国产一区二区视频播放| 毛片在线播放视频| 亚洲五月天综合| 中文字幕亚洲影院| 色中文字幕在线观看| 国产小视频免费| 九九爱精品视频| 欧美性受xxxx黑人猛交88| 欧美大片在线播放| 日本久久精品一区二区| 日韩av加勒比| 992tv快乐视频| 毛片一区二区三区四区| 免费观看精品视频| 热久久最新网址| 国产视频九色蝌蚪| 三级性生活视频| 无码人妻精品一区二区蜜桃网站| 亚洲熟妇无码一区二区三区导航| 国产又大又长又粗又黄| 黄色一级免费大片| 美女黄色片网站| 少妇高清精品毛片在线视频| www.51色.com| 黄色一级片在线看| 欧美日韩中文在线视频| 日韩免费在线观看av| 国产97色在线 | 日韩| 久久久久久久久影视| 亚洲精品视频导航| 黄色一级片国产| 15—17女人毛片| 日本福利视频在线| 成人免费看片视频在线观看| 欧美日韩第二页| 欧洲精品在线播放| www.日本三级| 丰满女人性猛交| 亚洲精品mv在线观看| 日本成人中文字幕在线|