精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕

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

    精品深夜AV无码一区二区_伊人久久无码中文字幕_午夜无码伦费影视在线观看_伊人久久无码精品中文字幕
    <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
    <ul id="e4iaa"></ul>
    <blockquote id="e4iaa"><tfoot id="e4iaa"></tfoot></blockquote>
    • <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp>
      <ul id="e4iaa"></ul>
      <samp id="e4iaa"><tbody id="e4iaa"></tbody></samp><ul id="e4iaa"></ul>
      <ul id="e4iaa"></ul>
      <th id="e4iaa"><menu id="e4iaa"></menu></th>
      欧美老年两性高潮| 91在线精品一区二区| 亚洲男同1069视频| 国产亚洲欧美日韩在线一区| 日韩精品资源二区在线| 日韩亚洲欧美综合| 亚洲精品在线免费观看视频| 日韩一区二区三区视频在线观看 | 精品无人码麻豆乱码1区2区 | 欧美videofree性高清杂交| 777色狠狠一区二区三区| 欧美日韩精品是欧美日韩精品| 欧美色爱综合网| 欧美一区午夜精品| 精品久久人人做人人爱| 久久久午夜电影| 中文字幕一区免费在线观看| 亚洲女同一区二区| 亚洲第一福利一区| 精品一区二区三区在线视频| 国产91精品在线观看| 91在线免费看| 6080午夜不卡| 国产欧美一区二区三区在线看蜜臀 | 日本视频在线一区| 精品一区二区成人精品| 成人精品视频一区二区三区 | 欧美色图一区二区三区| 在线不卡中文字幕| 久久婷婷久久一区二区三区| 亚洲欧洲成人av每日更新| 亚洲va欧美va人人爽午夜| 久久99热国产| 99久久精品国产麻豆演员表| 欧美高清视频www夜色资源网| 精品国产乱码久久| 亚洲女人****多毛耸耸8| 日韩和欧美一区二区| 国产v综合v亚洲欧| 欧美男女性生活在线直播观看| 久久精品人人做人人综合| 亚洲免费毛片网站| 国内精品久久久久影院薰衣草| 91视频com| 久久亚洲免费视频| 日韩精品成人一区二区在线| 99re成人在线| 久久精品夜色噜噜亚洲a∨| 亚洲国产欧美日韩另类综合| 风流少妇一区二区| 宅男在线国产精品| 一区二区理论电影在线观看| 国产精品一区二区三区网站| 欧美精品久久天天躁| 亚洲视频资源在线| 极品美女销魂一区二区三区| 欧美日韩二区三区| 一区二区三区四区不卡在线| 成人免费看片app下载| 欧美va天堂va视频va在线| 亚洲福利一区二区三区| 色综合天天综合网国产成人综合天| 日韩免费在线观看| 日韩一区精品字幕| 欧美肥妇bbw| 亚洲高清在线精品| 欧美综合一区二区| **欧美大码日韩| 成人国产精品免费网站| 久久久久88色偷偷免费| 国产毛片精品视频| 久久精品欧美一区二区三区不卡| 美女视频网站久久| 欧美一区二区三区免费观看视频| 亚洲第一二三四区| 欧美日韩一区二区在线视频| 亚洲女人****多毛耸耸8| 91浏览器在线视频| 亚洲区小说区图片区qvod| 色综合久久88色综合天天免费| 国产精品国产成人国产三级| 94-欧美-setu| 一区二区三区在线观看欧美 | 国产精品资源网站| 国产人妖乱国产精品人妖| 国产精品66部| 中文字幕在线免费不卡| 一本久道久久综合中文字幕| 一区二区在线看| 欧美三级中文字幕| 看电视剧不卡顿的网站| 久久综合九色综合久久久精品综合| 国产综合色精品一区二区三区| 国产欧美日韩中文久久| 成人av网站免费| 亚洲在线中文字幕| 91精品欧美一区二区三区综合在| 麻豆成人av在线| 国产精品国产三级国产aⅴ中文 | 国产自产高清不卡| 亚洲欧洲www| 欧美丰满一区二区免费视频| 国内精品久久久久影院一蜜桃| 国产精品久久久久久久久果冻传媒 | 国产精品不卡一区二区三区| 日本韩国欧美一区| 日本不卡一区二区| 国产精品盗摄一区二区三区| 欧美妇女性影城| 成人av在线资源网| 日本欧美一区二区三区| 国产精品久久夜| 欧美一卡二卡三卡| 不卡av电影在线播放| 日韩精品午夜视频| 成人免费在线视频观看| 欧美丰满一区二区免费视频| 成人深夜视频在线观看| 免费欧美在线视频| 一区二区三区免费在线观看| 久久久久久日产精品| 777久久久精品| 91亚洲精品久久久蜜桃网站| 久草在线在线精品观看| 亚洲综合久久久| 国产精品情趣视频| 精品少妇一区二区三区在线播放| 在线一区二区三区四区五区 | 日韩精品久久久久久| 国产精品初高中害羞小美女文| 日韩亚洲欧美高清| 欧美天堂一区二区三区| 成人av网站免费| 国产精品资源站在线| 久久激情五月激情| 婷婷综合久久一区二区三区| 一区二区三区国产精华| 一区二区中文字幕在线| 久久久久久久综合狠狠综合| 欧美一区二区三区四区在线观看| 日本二三区不卡| 成人av电影在线播放| 粉嫩aⅴ一区二区三区四区| 激情成人综合网| 日本欧美大码aⅴ在线播放| 亚洲国产欧美日韩另类综合| 又紧又大又爽精品一区二区| 国产精品久久久久久久蜜臀| 中日韩免费视频中文字幕| 久久久九九九九| 久久精品欧美一区二区三区麻豆| 欧美精品一区二区三区蜜桃视频| 91精品国产福利在线观看| 欧美日韩国产影片| 在线播放国产精品二区一二区四区 | 中文字幕av一区二区三区| 精品国产1区2区3区| 欧美白人最猛性xxxxx69交| 欧美va亚洲va| 久久久久99精品国产片| 国产亚洲欧美色| 中文字幕欧美激情| 亚洲视频一二三| 亚洲国产一区二区三区| 日本一道高清亚洲日美韩| 老司机精品视频导航| 国产麻豆欧美日韩一区| 成人高清伦理免费影院在线观看| 99re这里只有精品6| 欧美性xxxxxxxx| 欧美高清性hdvideosex| 精品成人免费观看| 国产精品久久久一区麻豆最新章节| 国产精品乱码人人做人人爱| 中文字幕在线不卡一区| 亚洲高清三级视频| 美国欧美日韩国产在线播放| 国产精品一品视频| 色先锋aa成人| 精品久久久久久最新网址| 国产精品理论片在线观看| 亚洲va天堂va国产va久| 美女任你摸久久| www.亚洲在线| 欧美一区中文字幕| 中文字幕一区二区三区四区不卡 | 日本精品视频一区二区| 欧美电视剧在线看免费| 亚洲欧美在线视频观看| 男女性色大片免费观看一区二区| 成人综合在线观看| 欧美色偷偷大香| 中文字幕欧美日本乱码一线二线| 亚洲成av人影院| 成人精品国产免费网站| 欧美一二区视频| 亚洲一区二区三区视频在线 | 色香蕉成人二区免费| 精品电影一区二区三区| 亚洲精品一二三|