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

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

時(shí)間:2024-05-02  來源:  作者: 我要糾錯(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

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


















 

標(biāo)簽:

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

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級(jí)風(fēng)景名勝區(qū)
    昆明西山國家級(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

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

              9000px;">

                        亚洲成a天堂v人片| 亚洲成人av在线电影| 91精品国产91久久综合桃花| 成人午夜伦理影院| 国产99一区视频免费| 狠狠色丁香久久婷婷综合丁香| 日韩福利电影在线| 日韩**一区毛片| 久久99国内精品| 日本免费新一区视频| 日韩不卡免费视频| 青青草伊人久久| 美国欧美日韩国产在线播放| 麻豆精品在线播放| 韩国视频一区二区| 国产精品一区一区| 99久久99久久精品免费观看| 不卡av在线网| 欧美性xxxxxx少妇| 欧美电影在线免费观看| 欧美一级高清片在线观看| 久久久国产精品麻豆| 欧美电影免费观看高清完整版在线| 日韩一区国产二区欧美三区| 精品国产乱码久久久久久久| 久久久不卡网国产精品一区| 中文字幕一区二区三区四区不卡| 亚洲一区二区三区视频在线| 蜜桃av一区二区三区电影| 久久精品国产99国产精品| 国产成人av一区二区三区在线| 成人黄色大片在线观看| 欧美图区在线视频| 欧美成人猛片aaaaaaa| 国产精品毛片久久久久久久| 亚洲午夜精品一区二区三区他趣| 老司机一区二区| 成人av资源下载| 911精品产国品一二三产区| 国产三级欧美三级日产三级99| 日韩理论片一区二区| 日韩精品福利网| eeuss鲁片一区二区三区在线观看| 日本丰满少妇一区二区三区| 久久综合99re88久久爱| 一区二区三区在线观看国产| 精品一区二区三区影院在线午夜| 99久久精品国产毛片| 日韩精品最新网址| 一区二区三区不卡视频| 精品伊人久久久久7777人| 在线观看一区日韩| 久久九九久久九九| 日韩不卡一区二区| 色狠狠综合天天综合综合| 久久久精品欧美丰满| 亚洲午夜在线观看视频在线| 成人免费看黄yyy456| 日韩美女视频在线| 亚洲午夜在线电影| 97精品国产97久久久久久久久久久久| 精品国产一区二区三区av性色| 一区二区三区四区视频精品免费| 成人精品国产免费网站| 欧美mv日韩mv国产| 五月婷婷久久综合| 91久久人澡人人添人人爽欧美| 欧美—级在线免费片| 蜜臀久久99精品久久久久久9| 欧美综合久久久| 亚洲乱码精品一二三四区日韩在线| 国产呦萝稀缺另类资源| 精品国产三级a在线观看| 石原莉奈在线亚洲二区| 欧美日韩免费视频| 亚洲制服丝袜av| 色哟哟在线观看一区二区三区| 国产精品网曝门| 国产白丝网站精品污在线入口| 中文字幕亚洲一区二区va在线| 久久成人免费日本黄色| 91精品国产欧美日韩| 亚洲一级在线观看| 欧美日韩综合在线免费观看| 亚洲一区在线免费观看| 在线精品视频免费观看| 玉足女爽爽91| 欧美日韩aaaaa| 蜜臀av性久久久久蜜臀aⅴ流畅| 欧美一区二区三区不卡| 日本最新不卡在线| 欧美成人精品福利| 国产suv精品一区二区6| 欧美激情一区二区三区不卡 | 日本一区二区免费在线| 国产福利一区二区三区视频在线| 国产色婷婷亚洲99精品小说| 成人白浆超碰人人人人| 亚洲裸体在线观看| 91精品国产品国语在线不卡| 九色|91porny| 国产精品家庭影院| 日本高清不卡一区| 毛片av中文字幕一区二区| 久久亚洲欧美国产精品乐播| www.欧美亚洲| 日韩专区一卡二卡| 久久精品夜色噜噜亚洲a∨| 色欧美88888久久久久久影院| 亚洲v日本v欧美v久久精品| 欧美成人猛片aaaaaaa| 成人av在线电影| 天堂资源在线中文精品| 26uuu国产电影一区二区| 91香蕉视频污| 美女高潮久久久| 夜夜精品视频一区二区 | 国产一区在线观看视频| 亚洲桃色在线一区| 日韩欧美一二区| 91小宝寻花一区二区三区| 麻豆传媒一区二区三区| 中文字幕欧美国产| 精品女同一区二区| 日本乱人伦aⅴ精品| 国产一区二区三区黄视频 | 色88888久久久久久影院野外| 久久91精品久久久久久秒播| 亚洲美女在线国产| 精品国产一区二区三区av性色 | 亚洲国产精品久久久久婷婷884| 久久蜜桃香蕉精品一区二区三区| 91福利小视频| 国产激情91久久精品导航| 日韩成人免费看| 亚洲欧洲综合另类在线| 欧美极品aⅴ影院| 精品久久一区二区| 日韩一级二级三级| 日本大香伊一区二区三区| 99久久婷婷国产精品综合| 激情成人午夜视频| 蜜臀av一区二区在线免费观看| 亚洲va韩国va欧美va| 一区二区三区精品久久久| 中文字幕亚洲区| 中文字幕在线视频一区| 久久精品日产第一区二区三区高清版| 日韩一区二区中文字幕| 欧美日本一道本| 欧美精品v国产精品v日韩精品| 在线国产亚洲欧美| 欧洲一区二区三区在线| 91九色最新地址| 精品视频一区二区不卡| 欧美日韩的一区二区| 欧美夫妻性生活| 欧美日韩高清在线播放| 欧美日韩视频在线第一区| 欧美色图在线观看| 日韩一区二区三区四区 | 成人午夜精品在线| 成人av在线影院| 一本色道综合亚洲| 欧美色中文字幕| 日韩久久久久久| 国产亚洲1区2区3区| 欧美国产一区在线| 亚洲视频在线一区| 亚洲一级电影视频| 日韩一区精品视频| 国产一区二区三区高清播放| 成人一区二区三区在线观看| 一本久久a久久免费精品不卡| 欧洲av在线精品| 欧美成人女星排名| 中文字幕av一区二区三区| 亚洲欧美经典视频| 天堂蜜桃一区二区三区| 国产精品一区二区黑丝| 99久久精品免费| 欧美日韩免费电影| 久久蜜桃av一区二区天堂| 国产精品网站在线| 午夜久久久久久电影| 国内精品伊人久久久久影院对白| 粉嫩高潮美女一区二区三区| 色婷婷狠狠综合| 久久一区二区视频| 亚洲欧美一区二区三区久本道91| 天天爽夜夜爽夜夜爽精品视频| 韩日av一区二区| 91久久精品一区二区| 日韩欧美成人一区| 亚洲欧美在线观看| 日本91福利区| 99久久精品99国产精品 | 久久精品亚洲麻豆av一区二区 | 成人激情文学综合网| 欧美日韩国产一级片|