久久久久久精品无码人妻_青春草无码精品视频在线观_无码精品国产VA在线观看_国产色无码专区在线观看

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

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

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

    久久久久久精品无码人妻_青春草无码精品视频在线观_无码精品国产VA在线观看_国产色无码专区在线观看

    国产xxxx振车| 国产在线青青草| youjizz.com在线观看| 日本在线观看免费视频| 99久久免费观看| 51自拍视频在线观看| 日本人视频jizz页码69| 成人小视频在线看| 国产成人在线免费看| 人妻av无码专区| 九九久久九九久久| 亚洲免费视频播放| 日本中文字幕在线不卡| 中文字幕第22页| 男女视频在线观看网站| 中文字幕第38页| www.亚洲高清| 在线看免费毛片| 九九九九九九九九| 无尽裸体动漫2d在线观看| 天天干天天爽天天射| 国产熟人av一二三区| 中文字幕欧美人妻精品一区| 91精品91久久久中77777老牛| 极品粉嫩国产18尤物| 国产毛片视频网站| 黄色免费福利视频| 国产亚洲天堂网| 三级a在线观看| 国内av一区二区| 四虎影院一区二区| 99亚洲精品视频| 日韩视频在线免费播放| 成年人三级视频| 91视频 - 88av| av在线播放亚洲| av动漫在线看| 国产成人精品无码播放| 日韩精品视频一二三| 婷婷视频在线播放| 国产亚洲黄色片| 女人和拘做爰正片视频| 成人在线看视频| 亚洲一级免费观看| 欧美日韩视频免费在线观看| 日韩精品在线观看av| 超碰网在线观看| 污污视频在线免费| 日韩精品一区二区免费| 久久婷婷国产精品| 国内av一区二区| 99爱视频在线| 69堂免费视频| 中文字幕在线导航| 伊人色在线观看| 日本一本在线视频| 天堂8在线天堂资源bt| 久久久噜噜噜www成人网| 一级黄色录像在线观看| 欧美激情亚洲天堂| 激情五月亚洲色图| 欧美精品一区二区性色a+v| 国内精品视频一区二区三区| 国产精品一区二区羞羞答答| 国产成人精品免费看在线播放| www国产精品内射老熟女| 潘金莲激情呻吟欲求不满视频| 男人天堂新网址| 天天操天天爱天天爽| 黄色一级片国产| 奇米影音第四色| 国产一二三在线视频| 亚洲国产日韩欧美在线观看| www.av91| 色网站在线视频| 免费无码av片在线观看| 亚洲小视频在线播放| 一道本视频在线观看| 精品少妇人欧美激情在线观看| 日韩一区二区三区不卡视频| 91视频 - 88av| 91制片厂毛片| 日本国产在线播放| 99精品视频网站| 在线观看免费黄网站| 黄色大片中文字幕| www.久久com| 999精品视频在线| 国产素人在线观看| 男人天堂成人网| 日本新janpanese乱熟| 欧美亚洲黄色片| 99精品视频网站| 五月天激情视频在线观看| www.日本少妇| 国产一二三四区在线观看| 天堂在线资源视频| 久久国产乱子伦免费精品| 欧妇女乱妇女乱视频| 亚洲国产精品影视| 天堂一区在线观看| 国产又黄又猛视频| 日本中文字幕网址| www.在线观看av| 国产免费内射又粗又爽密桃视频| 色91精品久久久久久久久| 91激情视频在线| av天堂永久资源网| 国产午夜伦鲁鲁| 女人天堂av手机在线| 人体内射精一区二区三区| 乱子伦一区二区| 天天操精品视频| 想看黄色一级片| 亚洲综合日韩欧美| 九九热免费精品视频| 欧美少妇性生活视频| 国产原创中文在线观看| 高清无码一区二区在线观看吞精| 永久av免费在线观看| 五月天丁香花婷婷| 99久久99精品| 国产毛片久久久久久| 在线观看国产一级片| 大香煮伊手机一区| 成人中文字幕av| 在线免费视频a| 波多结衣在线观看| 三级a在线观看| 国产三级国产精品国产专区50| 欧美日韩亚洲自拍| 中文字幕网av| 亚洲自拍第三页| 三级av免费看| 欧美做受777cos| 日韩精品一区二区免费| 日本一本中文字幕| 一女被多男玩喷潮视频| 黄色片视频在线免费观看| 成人午夜视频免费在线观看| 欧美少妇性生活视频| 国产九九在线观看| 精品亚洲视频在线| 国产激情在线看| 91丨porny丨探花| 久久综合久久色| 五月天激情播播| 男同互操gay射视频在线看| 伊人再见免费在线观看高清版| av网站大全免费| 欧美一级黄色片视频| 中文字幕第17页| 日本精品福利视频| 国产男女在线观看| 久久黄色片网站| 成人在线观看毛片| 国产肥臀一区二区福利视频| 精品免费国产一区二区| 女人高潮一级片| 无码人妻少妇伦在线电影| 国产第一页视频| av片中文字幕| 日韩精品aaa| 久久视频这里有精品| 国产精品免费成人| 91蝌蚪视频在线| 日本手机在线视频| 亚洲性生活网站| 丰满女人性猛交| 青青视频在线播放| 久久精品亚洲天堂| 东北少妇不带套对白| 欧美特级aaa| 欧美无砖专区免费| wwwwxxxx日韩| 日韩久久久久久久久久久久| 亚洲精品一二三四五区| 中文字幕精品在线播放| 精品久久久久久无码国产| 国产欧美自拍视频| 成年人免费大片| 久久久久久久香蕉| 日韩免费高清在线| 日韩精品免费一区| 久久精品影视大全| 欧美一区二区视频在线播放| 搡女人真爽免费午夜网站| 国产传媒久久久| 日本美女视频一区| 成人一级片网站| 成人手机在线播放| 中文字幕免费高清在线| 天天夜碰日日摸日日澡性色av| 992kp免费看片| 午夜免费精品视频| 国产原创中文在线观看| 9999在线观看| 免费看污黄网站| 日本不卡在线观看视频| youjizz.com在线观看|