爱情鸟第一论坛com高清免费_91免费精品国自产拍在线可以看_亚洲一区精品中文字幕_男人操心女人的视频

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

    爱情鸟第一论坛com高清免费_91免费精品国自产拍在线可以看_亚洲一区精品中文字幕_男人操心女人的视频
    <strike id="bfrlb"></strike><form id="bfrlb"><form id="bfrlb"><nobr id="bfrlb"></nobr></form></form>

        <sub id="bfrlb"><listing id="bfrlb"><menuitem id="bfrlb"></menuitem></listing></sub>

          <form id="bfrlb"></form>

            <form id="bfrlb"></form>

              <address id="bfrlb"></address>

              <address id="bfrlb"></address>
              欧美高清视频在线| 亚洲三级视频在线观看| 欧美成人一区二区三区片免费| 久久精品国产v日韩v亚洲| 亚洲高清一区二| 欧美与黑人午夜性猛交久久久| 欧美亚洲一区二区在线| av成人黄色| 欧美亚州在线观看| 国产亚洲精品bt天堂精选| 欧美二区视频| 午夜精品久久久久久| 亚洲性图久久| 久久av一区| 精品福利免费观看| 国内成人精品2018免费看| 国产伪娘ts一区| 国产一区二区三区免费在线观看| 久久久噜噜噜久久人人看| 亚洲区第一页| 久久久国产精彩视频美女艺术照福利| 亚洲欧美变态国产另类| 老司机午夜精品视频在线观看| 国产精品乱码人人做人人爱| 国产女主播一区二区| 黄色成人在线网址| 亚洲激情一区二区三区| 激情欧美日韩一区| 久久精品99久久香蕉国产色戒| 国产精品二区影院| 国产日韩欧美不卡| 国产一区二区精品在线观看| 在线看一区二区| 欧美成人一区二免费视频软件| 欧美性事免费在线观看| 先锋影音国产一区| 国产日韩欧美在线| 国产精品一区在线观看| 亚洲欧美怡红院| 亚洲国产欧美日韩精品| 1000精品久久久久久久久| 欧美激情精品久久久久久变态| 国产精品午夜国产小视频| 在线午夜精品自拍| 国产精品久久久一区二区| 欧美91福利在线观看| 亚洲国产天堂网精品网站| 欧美视频一区二区在线观看| 激情综合网激情| 国产亚洲精品bv在线观看| 亚洲区中文字幕| 久久riav二区三区| 国产精品亚洲一区二区三区在线| 国产午夜久久| 欧美mv日韩mv亚洲| 亚洲国产成人av在线| 午夜一级在线看亚洲| 欧美日韩91| 91久久精品国产91久久性色| 国产精品乱人伦一区二区| 国产嫩草影院久久久久| 国产精品v欧美精品∨日韩| 欧美日韩一区二区三区在线观看免| 国产精品毛片va一区二区三区| 欧美在线观看www| 国产自产v一区二区三区c| 亚洲韩日在线| 久热国产精品视频| 亚洲视频福利| 亚洲国产精品久久久久久女王| 91久久精品国产91久久性色tv| 国产精品国产一区二区| 欧美在线91| 亚洲无亚洲人成网站77777| 欧美在线地址| 性8sex亚洲区入口| 亚洲一区二区三区高清| 亚洲宅男天堂在线观看无病毒| 国产精品国产三级国产aⅴ无密码| 亚洲精品国产无天堂网2021| 亚洲精品少妇30p| 欧美午夜精品久久久久久久| 欧美日韩爆操| 亚洲精品美女在线观看播放| 乱中年女人伦av一区二区| 国产精品久久久久婷婷| 欧美成人性网| 麻豆精品精华液| 国产精品久久久久永久免费观看| 欧美激情一区二区三区在线视频观看| 国产综合网站| 国内外成人在线视频| 亚洲二区免费| 久久久久久9999| 久久在线91| 欧美性大战久久久久| 欧美日韩在线电影| 夜夜嗨av色综合久久久综合网| 欧美精品一区二区三区蜜桃| 久久久精品999| 久久精品女人的天堂av| 免费在线观看成人av| 在线视频欧美日韩精品| 亚洲国产91色在线| 亚洲全黄一级网站| 亚洲精品国产精品国自产观看| 在线亚洲+欧美+日本专区| 一区在线电影| 欧美日韩视频在线观看一区二区三区| 欧美日韩国产麻豆| 亚洲精品美女久久久久| 狠狠色伊人亚洲综合成人| 一道本一区二区| 国产麻豆精品久久一二三| 久久久91精品国产一区二区精品| 欧美久久久久久久久| 国产精品久久| 欧美精品成人91久久久久久久| 国产精品国产三级国产普通话三级| 国产综合色精品一区二区三区| 欧美精品激情| 欧美手机在线视频| 欧美高清在线一区二区| 欧美日韩专区| 老鸭窝91久久精品色噜噜导演| 国产亚洲毛片| 欧美视频一区二区在线观看| 麻豆久久精品| 午夜久久99| 国产精品色婷婷久久58| 一色屋精品亚洲香蕉网站| 亚洲日本欧美| 欧美大片在线影院| 国产欧美一区二区精品婷婷| 亚洲精品视频一区| 欧美主播一区二区三区美女 久久精品人| 久久精品天堂| 国产精品久久久久国产精品日日| 国产美女精品一区二区三区| 国产精品美女久久久| 亚洲一区制服诱惑| 欧美日韩精品在线观看| 亚洲一区网站| 亚洲激情在线激情| 国产精品国产三级国产aⅴ入口| 国产精品成人久久久久| 国产精品区一区| 国产视频一区二区在线观看| 欧美黄色aa电影| 国内精品久久国产| 在线不卡免费欧美| 亚洲精品免费在线观看| 国产伦精品免费视频| 99视频一区二区三区| 国产精品xxxxx| 99在线观看免费视频精品观看| 欧美系列精品| 久久日韩粉嫩一区二区三区| 一区二区视频免费完整版观看| 另类av导航| 亚洲男人的天堂在线| 国产自产女人91一区在线观看| 久久精品一区二区三区四区| 欧美日韩视频| 娇妻被交换粗又大又硬视频欧美| 亚洲国产99精品国自产| 国产精品久久久久av| 在线日韩中文| 欧美日韩另类视频| 久久久中精品2020中文| 久久精品国产99国产精品| 欧美激情第9页| 午夜精品福利在线| 免费黄网站欧美| 麻豆久久久9性大片| 国产日韩三区| 久久精品国产第一区二区三区最新章节| 亚洲国产高清一区| 欧美日韩黄色大片| 欧美大片在线观看一区二区| 欧美精品麻豆| 国产精品一区二区三区久久久| 国产三区精品| 国产精品免费网站| 一区二区三区视频在线看| 欧美激情久久久久| 久久久亚洲国产美女国产盗摄| 久久久久久久久久久久久9999| 久久蜜桃香蕉精品一区二区三区| 午夜精品久久久久99热蜜桃导演| 午夜久久一区| 亚洲高清久久久| 欧美韩日一区| 亚洲大片免费看| 国内精品美女av在线播放| 性欧美大战久久久久久久久| 香蕉乱码成人久久天堂爱免费| 国产精品视频免费观看| 国产精品福利网站| 欧美日韩一区成人|