免费一级欧美片在线观看网站_国产一区再线_欧美日本一区二区高清播放视频_国产99久久精品一区二区300

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

.請(qǐng)加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

    免费一级欧美片在线观看网站_国产一区再线_欧美日本一区二区高清播放视频_国产99久久精品一区二区300
    51精品国自产在线| 亚洲欧美日韩综合aⅴ视频| 国产精品影视网| 国产日韩欧美不卡在线| 懂色av一区二区夜夜嗨| 国产精品午夜免费| 99在线精品视频| 亚洲黄色av一区| 欧美日韩在线电影| 日本特黄久久久高潮| 日韩午夜激情视频| 国产精品一卡二卡| 专区另类欧美日韩| 欧美在线小视频| 日韩电影在线看| www久久精品| 成人av网站在线观看免费| 亚洲精品国产精华液| 欧美日韩黄色一区二区| 美国av一区二区| 亚洲国产精品成人综合| 一本色道**综合亚洲精品蜜桃冫| 亚洲永久精品国产| 日韩欧美国产综合| 成人性视频网站| 一区二区三区四区在线| 91精品国产综合久久久久| 国产精品自在在线| 亚洲激情图片qvod| 日韩欧美国产麻豆| 成人免费毛片app| 亚洲福利一区二区| 精品成人在线观看| 91免费看视频| 美腿丝袜在线亚洲一区| 中文字幕免费在线观看视频一区| 一本到高清视频免费精品| 日av在线不卡| 中文字幕一区三区| 欧美精品一级二级三级| 国产精品自拍一区| 亚洲午夜三级在线| 久久在线观看免费| 在线一区二区三区| 狠狠色丁香久久婷婷综合_中| ...xxx性欧美| 欧美xingq一区二区| 91丝袜国产在线播放| 青青草伊人久久| 国产精品动漫网站| 欧美一区二区三区公司| www.99精品| 奇米在线7777在线精品| 综合色中文字幕| 精品国产青草久久久久福利| 91免费看`日韩一区二区| 另类的小说在线视频另类成人小视频在线| 国产精品免费久久| 日韩欧美一区中文| 在线中文字幕不卡| 国产91综合一区在线观看| 亚洲第一av色| 国产精品第四页| 精品国产免费一区二区三区四区| 91国内精品野花午夜精品| 国产精品一区二区三区乱码| 亚洲国产精品麻豆| 国产精品福利av| 精品国产一区二区在线观看| 欧美在线观看一区| 成人国产精品免费观看视频| 蜜桃视频一区二区三区| 亚洲一区二区在线免费观看视频| 国产色产综合色产在线视频| 91精品国产入口| 色国产综合视频| 成人精品国产免费网站| 九九九精品视频| 天天综合天天做天天综合| 亚洲欧美视频在线观看| 国产亚洲一本大道中文在线| 欧美一区二区三区免费| 欧美性受极品xxxx喷水| 99视频精品全部免费在线| 国产一区 二区| 麻豆国产91在线播放| 午夜精品久久一牛影视| 亚洲欧美色图小说| 中文字幕在线一区免费| 久久久美女艺术照精彩视频福利播放| 欧美日韩dvd在线观看| 欧洲精品视频在线观看| 91丨九色丨国产丨porny| 国产精品99久久不卡二区| 精品一区二区三区免费毛片爱| 亚洲bt欧美bt精品777| 尤物av一区二区| 亚洲欧洲日韩在线| 国产精品天美传媒| 欧美国产综合色视频| 久久久久久久久蜜桃| 精品奇米国产一区二区三区| 91麻豆精品国产91久久久更新时间 | 这里只有精品视频在线观看| 日本道色综合久久| 91理论电影在线观看| www.日韩精品| fc2成人免费人成在线观看播放| 国产精品77777| 国产精品一区专区| 国产乱子伦视频一区二区三区| 久久精品99国产精品日本| 日本美女一区二区| 免费成人在线影院| 另类成人小视频在线| 日韩专区在线视频| 视频一区欧美精品| 秋霞成人午夜伦在线观看| 免费成人在线播放| 久久99精品国产.久久久久久| 久久机这里只有精品| 久久爱www久久做| 国产一区二区在线观看免费| 国产精品一区二区在线观看不卡| 国产一区不卡视频| 成人深夜视频在线观看| 99久久精品一区二区| 一本久道久久综合中文字幕 | 4438x成人网最大色成网站| 91精品一区二区三区久久久久久 | 亚洲色图欧美在线| 一区二区三区四区蜜桃| 亚洲第一精品在线| 日韩二区在线观看| 精品一区二区三区在线播放| 国产精品一区二区无线| 不卡的电视剧免费网站有什么| 91天堂素人约啪| 精品视频1区2区| 欧美一二三在线| 久久夜色精品国产噜噜av| 国产精品午夜春色av| 一区二区三区在线免费观看| 亚洲国产欧美日韩另类综合| 全国精品久久少妇| 国产精品99久久久久久似苏梦涵| 成人久久视频在线观看| 欧美这里有精品| 欧美成人一区二区| 中文av一区二区| 亚洲一区二区3| 蜜臀av性久久久久蜜臀av麻豆| 国产精选一区二区三区| 色综合欧美在线视频区| 欧美精品乱码久久久久久 | 精品日韩av一区二区| 国产精品免费视频网站| 一区二区三区免费在线观看| 免费成人美女在线观看.| 国产精品一二三| 91官网在线免费观看| 日韩欧美专区在线| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产成人啪免费观看软件 | 色哟哟国产精品| 日韩一区二区精品| 国产精品日产欧美久久久久| 亚洲成人资源在线| 国产一区二区三区四区五区美女| 99久久99久久免费精品蜜臀| 欧美美女一区二区三区| 国产欧美一区二区精品性色| 一区二区三区毛片| 国产一区二区看久久| av中文一区二区三区| 91精品国产综合久久久久久久 | 国产精品免费av| 视频在线观看一区| 成人网页在线观看| 欧美一级二级三级乱码| 中文字幕日本乱码精品影院| 琪琪久久久久日韩精品| 色综合天天天天做夜夜夜夜做| 欧美一区二区三区免费视频 | 国产精品原创巨作av| 欧美日韩中文字幕一区二区| 国产午夜精品久久久久久免费视 | 在线观看日韩高清av| 久久人人爽人人爽| 亚洲成人午夜电影| 成人a级免费电影| 日韩亚洲欧美中文三级| 亚洲精品你懂的| 国产精品888| 欧美一区二区三区免费观看视频 | 亚洲国产精品天堂| 不卡高清视频专区| 精品国产制服丝袜高跟| 性感美女久久精品| 99精品热视频|