亚洲十八**毛片_亚洲综合影院_五月天精品一区二区三区_久久久噜噜噜久久中文字幕色伊伊 _欧美岛国在线观看_久久国产精品毛片_欧美va在线观看_成人黄网大全在线观看_日韩精品一区二区三区中文_亚洲一二三四区不卡

COMP 315代做、代寫(xiě)Java/c++編程語(yǔ)言

時(shí)間:2024-05-02  來(lái)源:  作者: 我要糾錯(cuò)



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

.請(qǐng)加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp


















 

標(biāo)簽:

掃一掃在手機(jī)打開(kāi)當(dāng)前頁(yè)
  • 上一篇:代寫(xiě)COM6511、代做Python設(shè)計(jì)程序
  • 下一篇:代寫(xiě)program、代做c/c++,Python語(yǔ)言編程
  • 無(wú)相關(guān)信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲(chóng)
    油炸竹蟲(chóng)
    酸筍煮魚(yú)(雞)
    酸筍煮魚(yú)(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚(yú)
    香茅草烤魚(yú)
    檸檬烤魚(yú)
    檸檬烤魚(yú)
    昆明西山國(guó)家級(jí)風(fēng)景名勝區(qū)
    昆明西山國(guó)家級(jí)風(fēng)景名勝區(qū)
    昆明旅游索道攻略
    昆明旅游索道攻略
  • 短信驗(yàn)證碼平臺(tái) 理財(cái) WPS下載

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 kmw.cc Inc. All Rights Reserved. 昆明網(wǎng) 版權(quán)所有
    ICP備06013414號(hào)-3 公安備 42010502001045

    欧美日韩www| 国产99久久久久久免费看农村| 日韩在线观看| 麻豆91精品视频| 国产一区二区三区久久| 欧美疯狂party性派对| 成人av影院在线观看| 欧美18一12sex性处hd| 五月婷婷久久综合| 在线一区二区三区四区五区| 国产高清视频一区| 99香蕉久久| 欧美电影免费观看高清完整| 日韩一区二区在线| 嫩草影视亚洲| 97视频一区| 国产亚洲成av人片在线观黄桃| av亚洲在线| 亚洲综合色丁香婷婷六月图片| 一区二区三区在线观看动漫| 一区二区三区四区中文字幕| 精品国产一二三区| 操人在线观看| 夜久久久久久| 中文字幕一区二区三| 香蕉影视欧美成人| 国产精品国产自产拍高清av| 在线免费高清一区二区三区| 综合久久综合| 三级欧美在线一区| 丝袜在线视频| 宅男深夜视频| 91成人免费网站| 国产精品福利一区二区三区| 这里只有精品电影| 国产黄色小视频在线| 久久精品国产亚洲a∨麻豆| xxxx成人| 成人亚洲一区| av在线中出| 日本在线视频站| 91国内精品白嫩初高生| 国产精品亚洲二区| 免费不卡在线观看| 一区二区三区高清在线视频 | 青春草在线视频| 亚洲高清影视| 成人黄色在线视频| 久久精子c满五个校花| 欧美激情中文字幕一区二区| 亚洲欧美国产高清| 欧美日韩亚洲综合一区| 色中色在线视频| 99久久综合国产精品二区| 亚洲小说区图片区情欲小说| 久草一本av| 亚洲色图16p| 水蜜桃精品av一区二区| 蜜桃在线一区二区三区| 国产亲近乱来精品视频| 欧美视频裸体精品| 天天天天天天天操| 日韩一区在线播放| 精品一二三区视频| 国产精品羞羞答答在线观看| 一区二区三区四区在线播放| 免费看av不卡| 亚洲成人免费视| 成人羞羞网站| 国产精美视频| 日韩午夜电影| 91精品久久久久久蜜臀| 国产最新在线| 欧美**vk| 国产网红主播福利一区二区| 4438x成人网最大色成网站| 男人的天堂在线免费视频| 欧美日韩大片免费观看| 亚洲h色精品| 国产激情一区二区三区| 色偷偷久久人人79超碰人人澡 | 欧美一区二区在线看| 国内三级在线观看| 午夜精品久久| 亚洲国产成人在线| 青青草91视频| 免费全黄无遮挡裸体毛片| 日本成人福利| 中文字幕一区二区三区av| 91精品尤物| 欧美日韩一区二区三区高清| 日韩欧美高清| 欧美xxxxxxxxx59| 日韩电影在线一区| 91麻豆精品国产自产在线观看一区 | 国产精品夜夜嗨| 国产情人综合久久777777| 九色在线观看| 激情五月播播久久久精品| 成人在线视频亚洲| 国产乱人伦精品一区| 成人sese在线| 蜜桃视频在线观看免费视频网站www| 欧美.日韩.国产.一区.二区| 福利一区在线观看| 亚洲按摩av| 欧美三级蜜桃2在线观看| 久久精品国产一区二区三区免费看| 9999在线视频| 欧美xxx久久| 亚洲网站在线| 欧洲免费av| 9999国产精品| 欧美午夜宅男影院在线观看| 一本一道波多野毛片中文在线| 欧美天堂社区| 成人免费视频网站在线观看| 亚洲成av人片一区二区梦乃| 亚洲裸体视频| 国产精伦一区二区三区| 亚洲成年人影院| 免费看久久久| 欧美精品三级在线观看| 精品亚洲国内自在自线福利| 成人在线高清| av电影在线网| 2020天天操| 欧美激情一区不卡| 国产精品久久久免费 | 亚洲精品乱码日韩| 欧美日韩国产精品| 亚洲精品**中文毛片| 欧美精品三级在线观看| 欧美a级片网站| 国产丝袜在线| 亚洲国产一区二区三区| 成人一级福利| 91啦中文在线观看| 成人高清免费在线播放| 91网址在线看| 亚洲天堂免费| 超碰在线中文字幕| xnxx国产精品| 精品国产三区在线| xxx亚洲日本| 久久综合色天天久久综合图片| 中文字幕在线资源| 91精品91| 特级毛片在线| 欧洲精品一区二区| 久久综合精品国产一区二区三区| 玖玖精品视频| 一本色道久久综合| 狠狠入ady亚洲精品经典电影| 精品国产一区二区三区| 在线免费成人| 精品国产黄a∨片高清在线| 日韩av资源| 天天影视色香欲综合网老头| 日本亚洲欧美天堂免费| 成人搞黄视频| 欧美视频一区在线| av一区二区三区在线| 免费看久久久| 日韩欧美电影在线观看| 色菇凉天天综合网| 国产精品丝袜xxxxxxx| 一不卡在线视频| 自拍偷拍国产精品| 999国产精品999久久久久久| 电影一区二区三| 日本无删减在线| 午夜影院在线| 久久久久久**毛片大全| 香蕉久久夜色精品| 欧美日韩国产在线观看网站| 国产高清亚洲| 91老司机福利在线| 亚洲色图欧洲色图婷婷| 亚洲国产一区二区三区在线播放| 大陆精大陆国产国语精品| 888av在线视频| 中出福利视频| 色婷婷综合久色| 国产精品亲子伦对白| 国产sm精品调教视频网站| 成人在线视频国产| 黄色av网址在线免费观看| 国产精品激情偷乱一区二区∴| 亚洲网站视频| 日韩精品一区二区三区免费观影 | 精品国产三级a在线观看| 中文字幕中文在线不卡住| 亚洲国产激情av| 一区二区三区日韩欧美精品| 午夜久久免费观看| 国产精品一区hongkong| 久久综合九色综合久| 生活片a∨在线观看| 午夜视频成人|