狠狠综合久久久久综合网址-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一区二区三区| 亚洲激情免费视频| 一本色道无码道dvd在线观看| 91插插插插插插插插| 国产一伦一伦一伦| 国产成人一区二区三区别| www国产精品内射老熟女| 久久婷婷综合色| 50度灰在线观看| 91av资源网| 一本二本三本亚洲码| 福利视频一区二区三区四区| 91蝌蚪视频在线观看| 992tv成人免费观看| 日本精品www| 三上悠亚免费在线观看| 男人操女人免费| 91九色国产ts另类人妖| 欧美激情精品久久久久久小说| 亚洲制服中文字幕| 少妇无码av无码专区在线观看| 亚洲一级片免费| 国产精品网站免费| 久久99国产精品一区| 毛片av免费在线观看| 成人在线视频一区二区三区| 日本999视频| 人体内射精一区二区三区| 天堂视频免费看| 国产又黄又猛视频| 日韩国产一级片| 四虎4hu永久免费入口| 中文字幕日本最新乱码视频| 韩国无码av片在线观看网站| 婷婷激情5月天| 久久久久久蜜桃一区二区| 成人免费在线小视频| 精品少妇人欧美激情在线观看| 亚洲午夜精品一区| 欧美特级aaa| 亚洲国产高清av| 丰满少妇在线观看| 爱情岛论坛vip永久入口| 国产l精品国产亚洲区久久| 免费国产黄色网址| 国产一线二线三线女| 2019日韩中文字幕mv| 300部国产真实乱| 800av在线免费观看| 国产一二三四五| 强开小嫩苞一区二区三区网站 | 日韩一二区视频| 国产免费xxx| 国产av熟女一区二区三区| 337p亚洲精品色噜噜狠狠p| 超碰10000| 青青草国产免费| 国产成人精品视频免费看| 日本一本二本在线观看| 欧美性久久久久| 国产又黄又猛又粗| 在线观看日本www| 糖心vlog在线免费观看| 91视频 - 88av| 国产一区亚洲二区三区| 国产美女18xxxx免费视频| 日韩成人av免费| 青草网在线观看| 国产男女激情视频| 亚洲一区二区中文字幕在线观看| 91制片厂免费观看| 日本少妇高潮喷水视频| www.夜夜爽| 国产精品久久久久7777| 久久久久免费精品| 超碰成人在线免费观看| 国产高清av在线播放| 密臀av一区二区三区| 影音先锋男人的网站| 18禁免费无码无遮挡不卡网站| 一道本视频在线观看| 欧美一级爱爱视频| 亚洲免费一级视频| 男人添女荫道口女人有什么感觉| 999精品视频在线| 嫩草影院中文字幕| 天天看片天天操| 99爱视频在线| 99久热在线精品视频| 五月婷婷狠狠操| 欧美二区在线视频| 亚洲黄色网址在线观看| 最近中文字幕一区二区| 一女被多男玩喷潮视频| 国产对白在线播放| 视频在线观看免费高清| 黄色免费视频大全| 8x8ⅹ国产精品一区二区二区| 免费看黄色一级大片| 久激情内射婷内射蜜桃| 日本精品免费视频| 激情文学亚洲色图| 亚洲最大综合网| 免费无码国产v片在线观看| 亚洲色欲久久久综合网东京热| 国内自拍第二页| 日韩在线一区视频| 五月天激情视频在线观看| 少妇人妻互换不带套| 黄色免费观看视频网站| 成人免费视频91| www.在线观看av| 国产黄色片免费在线观看| 青青青在线观看视频| 大桥未久一区二区| 特色特色大片在线| 久久综合亚洲精品| 国产精品69久久久| 伊人成色综合网| 国产在线观看福利| 久久九九国产视频| 亚洲欧美久久久久| 日韩va在线观看| 国产一区一区三区| 国产一区二区三区小说| 欧美 日韩 国产 高清| 亚洲人成色77777| 欧美男女交配视频| 看全色黄大色大片| 免费 成 人 黄 色| 91小视频网站| 免费成人进口网站| 精品久久一二三| 日本国产一级片| 8x8x华人在线| 国产毛片视频网站| 天天干天天草天天| 黄网站色视频免费观看| 日韩av三级在线| 天天干天天av| 国产毛片视频网站| 天天综合天天添夜夜添狠狠添| 中文字幕日韩精品无码内射| 大肉大捧一进一出好爽视频| 污污网站在线观看视频| 国产日韩视频在线播放| 国产亚洲综合视频| 五月天av影院| 黄色免费网址大全| 国产av熟女一区二区三区| 国产三级日本三级在线播放 | 青青草原成人网| 免费成年人高清视频| 免费看日本毛片| 免费在线观看污污视频| 日韩a在线播放| 国产尤物av一区二区三区| 日本黄大片一区二区三区| 波多野结衣综合网| 日韩video| 欧美一级小视频| 久久精品视频91| 日本三级免费网站| 91网站在线观看免费| 欧洲美女亚洲激情| 成年人视频在线免费| www.99热这里只有精品| 精品一区二区三区毛片| 亚洲免费黄色录像| 日本超碰在线观看| 在线观看国产中文字幕| 国产男女激情视频| 黑森林福利视频导航| 欧美日韩黄色一级片| 日本欧美视频在线观看| 免费的一级黄色片| 国产一二三区在线播放| 麻豆传媒网站在线观看| 天天综合五月天| 日韩免费在线观看av| 三上悠亚免费在线观看|