成a人片国产精品_色悠悠久久综合_国产精品美女久久久久久2018_日韩精品一区二区三区中文精品_欧美亚洲国产一区在线观看网站_中文字幕一区在线_粉嫩一区二区三区在线看_国产亚洲欧洲997久久综合_不卡一区在线观看_亚洲欧美在线aaa_久久99精品国产_欧美卡1卡2卡_国产精品你懂的_日韩精品91亚洲二区在线观看_国内一区二区视频_91丨国产丨九色丨pron

 ICT239 代做、代寫 java/c/c++程序

時間:2024-03-11  來源:  作者: 我要糾錯



Web Application Development _________________________________________
Tutor-Marked Assignment
January 2024 Presentation
_________________________________________

TUTOR-MARKED ASSIGNMENT (TMA)
This assignment is worth 24% of the final mark for ICT239 - Web Application Development The cut-off date for this assignment is Tuesday, 12 March 2024, 2355hrs.
Note to Students:
You MUST use the provided solution template accompanying this TMA.
Answer all questions. (Total 100 marks)
Section A
Question 1 concerns the Staycation case study.
Question 1 (35 marks)
(a) Follow the steps stated as follows. While you are performing the steps, do a recording of you running through the steps to launch Staycation demo on Vocareum.
1. Login to Vocareum via Canvas, start VS Code and open the folder to ICT239 Past References/staycation/app
2. Start a new terminal and setup the virtual environment and install packages
• python3 –m venv venv
• . venv/bin/activate
• pip install –r requirements
3. Start the app
4. Start the browser to connect to the app
5. Register an admin user, Admin, admin@abc.com, password:12345
6. Login using the registered admin user account: admin@abc.com
7. Click on 'Upload' at the sidebar to get the Upload page.
8. Select data type Package and upload staycation.csv. Next, select data type
Users and upload users.csv. Finally, select data type Booking and upload the file booking.csv. The files can be downloaded from ICT239 Past References/staycation/app/assets/js folder and to initialize the database for charting.
9. Click on 'Dashboard' to display the chart.
10. Use Compass on the desktop workspace to demonstrate in your video that
the database contains the data of the user accounts, packages and bookings correctly.
(4 marks)
     SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 2 of 19

Your answer to parts (b) – (d) must show clear understanding of the various components in the Staycation application. In order to do well in this section, you must provide a thorough answer as well as highlight code by copying ONLY necessary code to be used in your explanation.
You should highlight small chunks of code and explain how each chunk contributes to your answer.
There is penalty if relevant code does not accompany an explanation for each sub-part or if irrelevant code is included in your explanation.
(b) This question part refers to the code in the frontend component.
(i) Explain how bootstrap positions the sidebar, the top panel and the centre panel of a web page in the Staycation application.
(ii) Explain how the web page can respond to various screen sizes. In particular, explain using the web page you get when you click on the link Packages on the side bar.
(iii) Explain 5 styling effects applied to the sidebar.
(iv) Explainjinjainheritanceasappliedinthestaycationapplicationforthepage displayed for part (b) (ii).
(15 marks)
(c) In step 3 of part (a), the application starts, and in step 4 of part (a), the first web page is displayed.
(i) Identify the html page displayed.
(ii) Explain the HTTP request that causes the first page to be displayed. Specifically, explain how, where the HTTP request is made, and the type of HTTP request made.
(iii) Explain the interaction between the frontend component and backend component that produces a HTTP response to cause the web page to be displayed. Show the relevant code and use the code to explain the interaction. For this sub-part, you should explain how flask handles URL routing in this situation and the HTTP response.
(8 mark)
(d) In step 8 of part (a), the user can upload files to the backend.
(i) Explain why the view function upload caters to both GET and POST requests. Is it preferable to have two different view functions instead? Give reasons for your answer.
(ii) Explain how the backend accesses the additional data that accompanies the GET and POST HTTP requests, if any, for the upload function.
(8 mark)
 SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 3 of 19

Section B
Questions 2 – 4 concern the development of a Web application for meal orders. The application scenario is based on ICT162 July 2023 semester TMA with some modifications.
Eat-Right-Programme (ERP) is a pilot programme of Healthier SG. The key objective of ERP is to encourage Singaporeans to take charge of their diets, leading to healthier lifestyles and see better health outcomes. Singaporeans above 12 years old can enrol in ERP.
To debunk the myth that Healthy food is expensive, bland, and boring. ERP will offer Delis that are deliciously prepared by food providers/agencies, using recipes with strict requirements on calories and fat content.
In ERP, participants can “Order” their meals by selecting Delis to form a DeliSet first. DeliSets are saved and can be repeatedly ordered.
This section will focus on
• displaying information about the ERP program, and the available cold and hot delis
(questions 2a).
Refer to the appendix for code for classes that you can use to implement question2 (a). Subsequently, you are to modify the classes in the appendix for question 2(b) so that data is stored in Mongodb instead of class variables.
• creating an admin user account if the account is not yet created, registering non-admin users or participants, logging users in and out (question 2c).
• allowing participants to create deli sets, place order and view their orders (question 3).
• Allowing the admin user to upload participants, delis and orders (question 4).
You are required to provide explanations for ALL your implementations to show your understanding of the following items where applicable,
✓ the model, view and controller components in your implementation and the purpose of the components specifically for the question you are answering
✓ the application of HTML and CSS
✓ the application of Bootstrap
✓ the interactions amongst the frontend and backend components that you added.
✓ the application of jinja variables, template filters, statements, inheritance, macros etc
✓ any other explanation required for a specific part of a question
 SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 4 of 19

Question 2 (26 marks)
Learning objectives:
• Develop a HTML/CSS and Python web framework program
• Apply programming methods to present information in HTML
• Employ web programming framework for developing website
You are to submit both implementations for part (a) and (b) as two separate applications.
(a) About and Delis
Create a Flask application with a hyperlink About which leads to the home page shown in Figure Q2(a) (i).
Figure Q2(a) (i): The home page or the About page
The Deli page shows the Cold Delis followed by the Hot Delis as shown in Figure Q2(a) (ii) and (iii).
Figure Q2(a) (ii) The Delis page shows cold delis followed by hot delis
     SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 5 of 19

 Figure Q2(a) (iii) The Delis page shows hot delis following the cold delis
You must apply responsive web design in your implementation of the pages so that the pages can adapt to various screen sizes. Figure 2(a) (iv) shows the About page on a small screen with side bar and top panel collapsed. When the side bar and top panel are expanded, they are similarly displayed as in Figure 2(a) (viii).
Figure Q2(a) (iv) The About page on small screen size
Figure 2 (a) (v) – (viii) show the Deli page on various screen sizes. Figure 2 (a) (viii) shows the Deli page on a small screen with side bar and top panel expanded. The same hamburger icon as in the About page will show instead when side bar and top panel are collapsed.
    SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 6 of 19

    Figure Q2(a) (v)
     Figure Q2(a) (vi)
     Figure Q2(a) (vii)
    Figure Q2(a) (viii) Side bar and top panel expanded
   Figure Q2(a) (iv) The Deli page on various screen sizes
Figure Q2a(ix) shows how a link on the sidebar should look like when you hover over it.
Figure Q2(a) (ix) The sidebar when you hover over a link
    SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 7 of 19

You must apply jinja and jinja inheritance in your implementation and to use the data in the class variables. Do NOT hardcode the data in the class variables in any html page.
(10 marks)
(b) Make a copy of your implementation for part (a) so that you can modify the copy for part (b). Submit part (a) in a separate folder. Part (b) will be used for subsequent development for parts (b) and (c) of this question as well as for questions 3 and 4.
For part (b), you no longer use class variables to store data for the delis. Instead, use MongoDB database to store data about delis. Figure Q2(b) shows the complete class diagram for the application. The relevant classes for part (b) are Deli, ColdDeli and HotDeli.
Implement these three classes such that when a required collection in the database is empty, data is read from the global variable, all_delis and stored into MongoDB. You may design and implement any method you consider necessary for the classes to achieve the same effects as described in part (a).
Highlight and provide reasons for the changes you make to part (a) to implement part (b) using MongoDB database. Include in your answer the changes you made to the frontend and/or backend components of your flask application, including code to set up the database.
 Figure Q2(b) Complete class diagram
(c) Register, Login and Logout
(7 marks)
 Refer to Figure 2(c) (i) and (ii) for the user interfaces for Register and Login respectively. For this question part, you will need to define the User class in Figure Q2(b).
 SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 8 of 19

Create the admin user (email: admin@abc.com, password 12345 and name Admin) if the user collection is empty. You can create the admin user either via Compass or through some application code. There is no need to include other details for admin user such as ID dob, handicapped and deli sets.
Similar to the Staycation case study, a participant (non-admin user) needs to be authenticated before he can use certain functions of the application. Therefore, he must register for an account. Upon successful registration, he will be directed to a login page with a flashed message displayed using Bootstrap alert as shown in Figure 2(c) (iii).
Handle unsuccessful registration and login in the same manner as the Staycation case study. Any user who successfully logs in will be directed to the Deli page.
To exit from the application, the user selects log out. After a user has logged out, the application should display the About page. The log out functionality is available on the top panel only after a successful login as shown in Figure Q2c (iv).
You may copy the relevant code in the Staycation case study for the register, login and logout functions to your application and make changes to achieve the new effects. Explain your modification.
Register a participant (email peter@gmail.com, password 12345, name Peter Oh, ID S1234567C, dob 1 Jun 1950, handicapped) and test that your functions are working correctly.
(9 marks)
      Figure Q2(c) (i)
    Figure Q2(c) (ii)
     Figure Q2(c) (iii)
     Figure Q2(c) (iv)
   SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 9 of 19

Question 3 (24 marks)
Learning objectives:
• Apply programming methods to present information in HTML
• Employ web programming framework for developing website
This question focuses on the non-admin set functions: create delisets, order deliset and view orders. For this question, you must define the DeliSet and Order classes in Figure Q2(b). Ensure that the User class has been defined according to the class diagram in Figure Q2(b).
(a) Create DeliSet
The participant provides a name for the new deli set to be created. He can select the delis he wishes to add, and then click on the button to add the delis to the set. Figure Q3(a)(i) shows the top of the page for Create DeliSet and Figure Q3(a)(ii) shows the bottom of the page.
Figure Q3(a) (i) Top of Create DeliSet page with provided input
Figure Q3(a) (ii) Bottom of Create DeliSet page with provided input
     SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 10 of 19

The price of the deli set is the sum of each selected deli. The total fats and total calories are similarly computed. The consume in hours for a deli set is the minimum of the expiryHours attribute of delis in the deli set. The name of a deli set must have a different name from the names of a participant’s existing deli sets. Provide the necessary instruction as shown in Figure Q3(a) (iii).
 Figure Q3(a) (iii) Create DeliSet page with instruction
Flash appropriate messages such as
 • Please use a different deli set name
  Deli set name checks are case-insensitive. Therefore, My FAV lunch is considered same as My Fav Lunch.
• Please select at least one deli
  A deli set must have at least one selected Deli which is added to a newly created deli set. Subsequent selected delis should be added one at a time to the newly-created deli set.
• Deli set inputName created with the selected delis: deliCode1, ..., delicoden
  The message is flashed if the deliset is successfully created and added to the dictionary of deli sets for the participant. Use the deli set name as key and Deliset object as value.
Flash the appropriate message when the button is clicked, and return to the same page. An example is shown in Figure Q3(a) (iv).
 Figure Q3(a) (iv) Create DeliSet page with flashed message
(14 marks)
  SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 11 of 19

(b)
(i) Order DeliSet
When a participant has not created a deli set, he cannot place any order. Therefore, clicking on the hyperlink Order DeliSet shows a page as shown in Figure Q3(b) (i).
Figure Q3(b) (i) Order DeliSet page when participant has no deli set
If the participant has created deli sets, they are listed in alphabetical order, case insensitive. The participant provides a delivery datetime for a selected deli set and click on the corresponding button to place order.
Check that the same deli set must not have been ordered yet to be delivered at the same time. Flash an appropriate message when the button is clicked, and return to the same page. The two appropriate messages are as follows:
An example is shown in Figure Q3(b) (ii).
  • Order deliset delisetName placed for deliveryDateTime
  • Order failed. Deliset delisetName has already been placed for deliveryDateTime
  Figure Q3(b) (ii) Order DeliSet page with flashed message
(ii) View Orders
When a participant has not placed any order, clicking on the hyperlink Order DeliSet shows a page as shown in Figure Q3(b) (iii).
  SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 12 of 19

 Figure Q3(b) (iii) View Order page when participant has no order
If the participant has placed some orders, they are listed in chronological order, starting from the later datetime, shown in Figure Q3b(iv). Delivery charge is waived for participants who are at least 75 years of age on the year the order is made or are handicapped at the time of order.
Figure Q3(b) (iv) View Order page when participant has orders
(10 marks)
    SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 13 of 19

Question 4 (15 marks)
Learning objectives:
• Employ web programming framework for developing website
Figure Q4 (i) shows the Upload page. The Upload function is available to only the admin user. To access the function, the admin user must log in. The Deli page will show up, and then, he must click on the Upload link on the sidebar. Note that the admin user need not register himself.
Figure Q4 (i) Upload Page
Once a data type and a file are chosen, the admin user clicks on Upload to activate the upload of data to the backend to be stored in Mongodb.
Data type
     Fields, example and messages
    Participant
 ID,name,dob,handicapped,email
S4428006Z,Tan Yan Meng,19480708,False,tanym@gmail.com
Flash message when a participant’s email is already in database:
• Participant with email someEmail already exists
     Deli
 #cold deli
deliCode,name,price,fat,carbohydrates,protein,storageTemperature,url
C001,Smoked Duck Salad,3.0,12.5,23,15,16,https://picniclifestyle.com/wp-
content/uploads/2020/10/Grilled-pear-salad-6.jpg
#hot deli
deliCode,name,price,fat,carbohydrates,protein,cookingStyle,url
 H001,Croissant,2.0,15,26.7,4.6,Baking,https://3.bp.blogspot.com/-
HMLcbz567qg/TlgWSbpD1uI/AAAAAAAACgM/1xnYGFTZemE/s1600/croissant.JPG
Flash message when a delicode is already in database:
• Deli someDeliCode already exists!
     Order
 #Order
email,deliveryDateTime,name,deliList
wongyh@gmail.com,2024-01-04 09:00,My Breakfast,H001,C001,H008
peter@gmail.com,2024-01-04 09:00,My fav lunch
Flash messages:
• Participant with email someEmail has not registered!
  when participant in data line with email not registered in the application.
      SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 14 of 19

   • Order for same deliset someDeliSetName, delivery datetime someDeliveryDateTime by participant with email someEmail already exists
  when the data line is for an existing order, that is, for the same participant, the same deli set and the same delivery time.
• deliset someDeliSetName does not exist and cannot be created without delicode
 when a deli set does not exist yet and there is no deli code in the data line.
Note that if the data line contains deli code, then a deli set can be created for a participant, and an order is then placed.
However, if a deli set already exists for a participant, it is not necessary for a data line to list the deli codes in the deli set. If there are deli codes are in the data line for an existing deli set, the deli codes are ignored. That is, there is no need to update the existing deli set with the deli codes in the data line.
    Flash the number of records created at the end of each file upload. Refer to Figure Q4 (ii) for an example.
 Figure Q4 (ii) Upload Page after an upload
Extend the flask application to allow admin user to upload data as described.
 (15 marks)
 SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 15 of 19

Appendix
 all_delis = [{'code': 'C001', 'name': 'Smoked Duck Salad', 'price': 3.0, 'fat': 12.5, 'carbohydydrate': 23.0,
'protein': 15.0, 'styleOrTemp': '16',
'url': 'https://picniclifestyle.com/wp-content/uploads/2020/10/Grilled-pear- salad-6.jpg'},
{'code': 'C002', 'name': 'Strawberry Pudding', 'price': 2.0, 'fat': 0.3, 'carbohydydrate': 10.0,
 'protein': 0.7, 'styleOrTemp': '3',
'url': 'https://veenaazmanov.com/wp-content/uploads/2014/05/Homemade-Strawberry- Pudding-15.jpg'},
{'code': 'C003', 'name': 'Chocolate Cake', 'price': 1.5, 'fat': 14.3, 'carbohydydrate': 50.7,
  'protein': 5.0, 'styleOrTemp': '12',
'url': 'https://www.joannasteven.com/wp-content/uploads/2015/08/GFchocolatecake- 1024x1024.jpg'},
{'code': 'C004', 'name': 'Smoked Salmon', 'price': 2.4, 'fat': 3.7, 'carbohydydrate': 0.0,
 'protein': 16.0, 'styleOrTemp': '3',
'url': 'https://goodtastefoods.co.uk/wp-content/uploads/2019/11/smoked- salmon_143296537-1.jpg'},
{'code': 'C005', 'name': 'Chilled Papaya Smoothie', 'price': 2.2, 'fat': 2.1, 'carbohydydrate': 21.3,
 'protein': 7.0, 'styleOrTemp': '8',
'url': 'https://insanelygoodrecipes.com/wp-content/uploads/2022/09/Healthy- Papaya-Smoothie-with-Oat-Flakes-and-Cinnamon-683x1024.jpg'},
{'code': 'C006', 'name': 'Berry Yoghurt Surprise', 'price': 2.2, 'fat': 1.0, 'carbohydydrate': 9.2,
  'protein': 3.0, 'styleOrTemp': '3',
'url': 'https://www.pcrm.org/sites/default/files/berries-nondairy-yogurt.jpg'}, {'code': 'C007', 'name': 'Beetroot Raita', 'price': 2.0, 'fat': 1.0, 'carbohydydrate': 12.4,
 'protein': 3.5, 'styleOrTemp': '8',
'url': 'https://werecipes.com/app/uploads/2015/04/dahi-raita-beetroot-raita- recipe.jpg'},
{'code': 'H001', 'name': 'Croissant', 'price': 2.0, 'fat': 15.0, 'carbohydydrate': 26.7,
'protein': 4.6, 'styleOrTemp': 'Baking',
'url': 'https://3.bp.blogspot.com/- HMLcbz567qg/TlgWSbpD1uI/AAAAAAAACgM/1xnYGFTZemE/s1600/croissant.JPG'},
{'code': 'H002', 'name': 'Chicken Pie', 'price': 2.8, 'fat': 21.3,
 'carbohydydrate': 32.0,
'protein': 10.0, 'styleOrTemp': 'Baking',
'url': 'https://img.taste.com.au/94eodL4O/taste/2016/11/creamy-chicken-and-
leek-pies-80359-1.jpeg'},
{'code': 'H003', 'name': 'Roast Beef', 'price': 3.5, 'fat': 21.8, 'carbohydydrate': 0.0,
'protein': 19.6, 'styleOrTemp': 'Roasting',
'url': 'https://i2.wp.com/www.domesticate-me.com/wp-content/uploads/2013/12/slow- roasted-beef-tenderloin-with-rosemary-13.jpg'},
{'code': 'H004', 'name': 'Asparagus & Poached Egg', 'price': 3.0, 'fat': 4.9,
'carbohydydrate': 3.1, 'protein': 7.9, 'styleOrTemp': 'Boiled',
'url': 'https://www.healthbenefitstimes.com/recipe/wp- content/uploads/2018/07/Roasted-Asparagus-with-Poached-Eggs-and-Hollandaise- Recipe.gif'},
{'code': 'H005', 'name': 'Apple Sesame Tart', 'price': 1.8, 'fat': 7.5, 'carbohydydrate': 49.1,
'protein': 4.9, 'styleOrTemp': 'Baking',
 SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 16 of 19

 'url': 'https://i.pinimg.com/736x/fc/22/c0/fc22c0106471cd2939ca371bfc80c38e.jpg'}, {'code': 'H006', 'name': 'Beef & Brown Rice Spicy Soup', 'price': 3.2, 'fat': 6.35,
'carbohydydrate': 17.7, 'protein': 18.0, 'styleOrTemp': 'Boiled',
'url': 'https://i.pinimg.com/originals/f6/78/41/f678414dccf92a0af0a8f09e3572caa1.jpg'}, {'code': 'H007', 'name': 'Fish & Potato Pie', 'price': 3.0, 'fat': 5.5, 'carbohydydrate': 15.0,
 'protein': 16.5, 'styleOrTemp': 'Baking',
'url': 'https://www.sprinklesandsprouts.com/wp-content/uploads/2019/10/Fish-Pie- 4.jpg'},
{'code': 'H008', 'name': 'Banana Pancakes', 'price': 2.0, 'fat': 7.0, 'carbohydydrate': 20.0,
 'protein': 3.6, 'styleOrTemp': 'Pan-Fried',
'url': 'https://3.bp.blogspot.com/- BTNuMoVzv3Y/Vkq1QEgta_I/AAAAAAAANdY/19_4zLnWfcc/s1600/Buttermilk%2BBanana%2BPancak es%2Brecipe.jpg'},
{'code': 'H009', 'name': 'Boiled Banana with Grated Coconut', 'price': 2.0, 'fat': 2.2,
'carbohydydrate': 30.7, 'protein': 2.0, 'styleOrTemp': 'Boiled',
'url': 'https://thumbs.dreamstime.com/b/boiled-slice-banana-eat-coconut-food- diet-154458927.jpg'},
{'code': 'H010', 'name': 'Buckwheat Pancakes', 'price': 2.4, 'fat': 6.0, 'carbohydydrate': 39.0,
'protein': 7.0, 'styleOrTemp': 'Pan-Fried',
'url': 'https://bakeitpaleo.com/wp-content/uploads/2021/05/paleo-buckwheat- pancake-recipe.jpg'},
{'code': 'H011', 'name': 'Chicken with Brown Rice', 'price': 3.0, 'fat': 5.8, 'carbohydydrate': 48.3,
'protein': 15.0, 'styleOrTemp': 'Steaming',
'url': 'https://dinnerthendessert.com/wp-content/uploads/2019/05/Baked-Chicken- and-Rice.jpg'},
{'code': 'H012', 'name': 'Carrot & Coriander Soup', 'price': 2.0, 'fat': 2.6, 'carbohydydrate': 13.8,
'protein': 1.6, 'styleOrTemp': 'Boiled',
'url': 'https://i1.wp.com/cookingwithbry.com/wp-content/uploads/2019/11/Carot- Coriander-Soup-Recipe-17.jpg'},
{'code': 'H013', 'name': 'Beancurd With Bean Sauce', 'price': 2.5, 'fat': 3.3, 'carbohydydrate': 6.8,
'protein': 10.2, 'styleOrTemp': 'Steaming',
'url': 'https://www.pekinghouse.co.nz/wp-content/uploads/2015/10/DeepFriedBean-
 CurdinChiliBeanSauce-600x600.jpg'}]
from abc import ABC, abstractmethod
class Deli(ABC):
_STANDARD_EXPIRY = 2
delis = {}
def __init__(self, deliCode, name, price, fat, carbohydrates, protein, url):
        self.deliCode = deliCode
        self.name = name
        self.price = price
        self.fat = fat
        self.carbohydrates = carbohydrates
        self.protein = protein
        self.url = url
    @property
    def calories(self):
 SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 17 of 19

 return self.fat * 9 + self.carbohydrates * 4 + self.protein * 4
    @abstractmethod
    def expiryHours(self):
        return type(self)._STANDARD_EXPIRY
def __str__(self):
return f"{self.deliCode:4s} - {self.name:35s} Price:
${self.price:.2f} Fat: {self.fat:>4.1f} Calories: {self.calories:>5.1f}"
    @classmethod
    def getAllDelis(cls):
if not cls.delis:
for dataDict in all_delis:
 if dataDict['code'].startswith('H'):
deli = HotDeli(dataDict['code'], dataDict['name'],
dataDict['price'], dataDict['fat'], dataDict['carbohydydrate'], dataDict['protein'], dataDict['styleOrTemp'], dataDict['url'])
else:
deli = ColdDeli(dataDict['code'], dataDict['name'],
dataDict['price'], dataDict['fat'], dataDict['carbohydydrate'], dataDict['protein'], int(dataDict['styleOrTemp']), dataDict['url'])
                cls.delis[dataDict['code']] = deli
        return cls.delis.values()
    @classmethod
    def getDeliType(cls, deliType):
if not deliType: return []
return [d for d in cls.getAllDelis() if d.deliCode.startswith(deliType[0].upper())]
    @classmethod
    def getDeli(cls, code):
        return cls.getAllDelis().get(code)
class ColdDeli(Deli):
def __init__(self, deliCode, name, price, fat, carbohydrates, protein,
storageTemperature, url):
super().__init__(deliCode, name, price, fat, carbohydrates, protein, url) self.storageTemperature = storageTemperature
     def expiryHours(self):
        if self.storageTemperature <= 10:
return 0.5
elif self.storageTemperature <= 15:
return 1
elif self.storageTemperature <= 20:
            return 1.5
        else:
            return super().expiryHours()
class HotDeli(Deli):
_COOKING_STYLE_EXPIRY = {"Steaming":1, "Frying":3, "Grilling":1.8,
"Roasting":1.5}
    def __init__(self, deliCode, name, price, fat, carbohydrates, protein,
cookingStyle, url):
super().__init__(deliCode, name, price, fat, carbohydrates, protein, url)
 SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 18 of 19

 self.cookingStyle = cookingStyle
def expiryHours(self):
return type(self)._COOKING_STYLE_EXPIRY.get(self.cookingStyle,
type(self)._STANDARD_EXPIRY)
---- END OF ASSIGNMENT ----
 SINGAPORE UNIVERSITY OF SOCIAL SCIENCES (SUSS) TMA – Page 19 of 19
請加QQ:99515681  郵箱:99515681@qq.com   WX:codehelp 

標簽:

掃一掃在手機打開當前頁
  • 上一篇:代做ACS61012、代寫ACS61012 Machine Vision
  • 下一篇:代做IEMS 5730、代寫 c++,Java 程序設計
  • 無相關信息
    昆明生活資訊

    昆明圖文信息
    蝴蝶泉(4A)-大理旅游
    蝴蝶泉(4A)-大理旅游
    油炸竹蟲
    油炸竹蟲
    酸筍煮魚(雞)
    酸筍煮魚(雞)
    竹筒飯
    竹筒飯
    香茅草烤魚
    香茅草烤魚
    檸檬烤魚
    檸檬烤魚
    昆明西山國家級風景名勝區
    昆明西山國家級風景名勝區
    昆明旅游索道攻略
    昆明旅游索道攻略
  • NBA直播 短信驗證碼平臺 幣安官網下載 歐冠直播 WPS下載

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

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

    成a人片国产精品_色悠悠久久综合_国产精品美女久久久久久2018_日韩精品一区二区三区中文精品_欧美亚洲国产一区在线观看网站_中文字幕一区在线_粉嫩一区二区三区在线看_国产亚洲欧洲997久久综合_不卡一区在线观看_亚洲欧美在线aaa_久久99精品国产_欧美卡1卡2卡_国产精品你懂的_日韩精品91亚洲二区在线观看_国内一区二区视频_91丨国产丨九色丨pron
    jlzzjlzz亚洲女人18| 国产不卡高清在线观看视频| 久草这里只有精品视频| 99国产精品久久久久久久久久久 | 91网页版在线| 久久亚洲精华国产精华液| 亚洲二区在线观看| 91网站最新地址| 国产精品正在播放| 欧美三级电影在线看| 亚洲欧美视频一区| 成人黄色在线看| 久久久久高清精品| 久久成人久久爱| 欧美一级黄色大片| 午夜av区久久| 欧美亚州韩日在线看免费版国语版| 国产精品国产精品国产专区不蜜| 国产成人精品三级| 国产日韩欧美不卡| 国产高清无密码一区二区三区| 精品国产乱码久久久久久图片| 麻豆精品一区二区综合av| 91精品久久久久久久99蜜桃| 亚洲成人av电影| 欧美日韩国产一二三| 亚洲第一在线综合网站| 欧美三级电影在线看| 亚洲福利一区二区| 欧美精品高清视频| 日韩成人午夜精品| 91精品国产色综合久久ai换脸 | 国产精品一区二区男女羞羞无遮挡| 日韩欧美一级二级三级久久久| 午夜欧美电影在线观看| 欧美日韩国产影片| 日韩和的一区二区| 日韩一区二区电影| 老司机精品视频导航| 日韩欧美一级在线播放| 精品一区二区免费看| 久久综合资源网| 福利一区二区在线| 中文字幕一区二区三区蜜月| 91亚洲国产成人精品一区二三| 亚洲人吸女人奶水| 欧美三级一区二区| 日韩av中文字幕一区二区三区| 欧美一区二区在线免费观看| 六月丁香婷婷色狠狠久久| 精品乱人伦小说| 福利一区福利二区| 亚洲免费看黄网站| 欧美性高清videossexo| 日日夜夜免费精品| 欧美va亚洲va在线观看蝴蝶网| 黄色精品一二区| 国产精品嫩草久久久久| 91福利社在线观看| 蜜桃一区二区三区在线| 久久综合色8888| 99久久亚洲一区二区三区青草| 一区二区免费在线| 日韩三区在线观看| 国产69精品一区二区亚洲孕妇| 亚洲少妇30p| 91超碰这里只有精品国产| 九一九一国产精品| 中文字幕在线观看一区| 欧美午夜精品一区| 狠狠色综合日日| 最新热久久免费视频| 欧美高清hd18日本| 国产成人精品免费| 亚洲永久免费视频| 日韩精品最新网址| 99国产精品一区| 日产精品久久久久久久性色| 国产人妖乱国产精品人妖| 色狠狠综合天天综合综合| 日本一区中文字幕| 欧美激情在线一区二区| 欧美影院一区二区三区| 国产在线视频不卡二| 一区二区三区精品视频| 精品欧美乱码久久久久久| 91理论电影在线观看| 蜜桃av噜噜一区二区三区小说| 中国av一区二区三区| 欧美精品乱码久久久久久| 成人午夜av在线| 亚洲国产一区在线观看| 久久久精品黄色| 欧美三级韩国三级日本一级| 国产精品乡下勾搭老头1| 亚洲第一在线综合网站| 久久精品亚洲乱码伦伦中文| 欧洲在线/亚洲| 国产一区欧美二区| 亚洲五月六月丁香激情| 久久精品一区蜜桃臀影院| 欧美日韩亚洲综合在线| 丰满岳乱妇一区二区三区| 日本一不卡视频| 亚洲精品久久久蜜桃| 久久久久国产精品麻豆ai换脸| 欧美日韩日本视频| 成人免费观看av| 麻豆精品在线看| 一区二区国产视频| 中文在线一区二区| 精品国精品自拍自在线| 欧美日韩精品三区| 91在线看国产| 国内精品久久久久影院一蜜桃| 亚洲成人免费在线观看| 中文字幕制服丝袜成人av| 欧美变态tickle挠乳网站| 91国偷自产一区二区开放时间| 国产成人精品亚洲日本在线桃色| 日韩av一级电影| 亚洲已满18点击进入久久| 中文天堂在线一区| 精品久久久久久亚洲综合网| 欧美日韩精品一区二区| 91免费在线播放| 高清成人在线观看| 黄色小说综合网站| 青青国产91久久久久久| 亚洲线精品一区二区三区八戒| 一区视频在线播放| 国产日韩av一区二区| 精品国产亚洲一区二区三区在线观看| 欧美视频一区二区三区四区| 91啪在线观看| 不卡av在线网| 国产999精品久久久久久绿帽| 精品无人码麻豆乱码1区2区| 日日夜夜精品视频免费| 一区二区三区电影在线播| 国产精品久久久99| 亚洲精品在线三区| 欧美一二三区在线| 制服丝袜亚洲色图| 欧亚一区二区三区| 色综合 综合色| 99re这里只有精品首页| 成人精品高清在线| 丰满亚洲少妇av| 国产91高潮流白浆在线麻豆| 国产美女一区二区| 国产一区二区导航在线播放| 久久精品久久精品| 蜜桃91丨九色丨蝌蚪91桃色| 日韩电影免费在线观看网站| 午夜精品久久久久久久久| 午夜影院在线观看欧美| 亚洲成av人片在线观看无码| 亚洲va韩国va欧美va| 亚洲高清视频中文字幕| 亚洲国产一区二区a毛片| 亚洲一区视频在线观看视频| 一级做a爱片久久| 亚洲精品乱码久久久久久黑人 | 国产精品久久福利| 国产精品免费av| 国产精品女主播av| 国产精品美女久久久久久2018 | 极品销魂美女一区二区三区| 另类小说色综合网站| 美日韩一区二区三区| 青青青伊人色综合久久| 久久狠狠亚洲综合| 国产麻豆视频精品| 成人免费视频app| 99精品桃花视频在线观看| 一本久道久久综合中文字幕| 一本久久精品一区二区| 欧美视频在线一区| 欧美一级高清片| 久久影院午夜论| 欧美极品美女视频| 亚洲免费大片在线观看| 亚洲3atv精品一区二区三区| 日韩 欧美一区二区三区| 国内外成人在线| 成人美女视频在线观看18| 一本一本久久a久久精品综合麻豆| 欧美亚洲国产一区在线观看网站 | 亚洲综合一区二区| 亚洲国产精品自拍| 免费成人你懂的| 国产成人aaaa| 色一区在线观看| 91精品国产入口在线| 国产日韩欧美精品综合| 一区二区三区资源| 免费在线观看成人| 国产黄色成人av| 一本久久综合亚洲鲁鲁五月天 |