INSTRUCTIONS TO STUDENTS:
- This End-of-Course Assessment paper comprises 9 pages (including the cover page).
- You are to include the following particulars in your submission: Course Code, Title of the ECA, SUSS PI No., Your Name, and Submission Date.
- Late submission will be subjected to the marks deduction scheme. Please refer to the Student Handbook for details.
- Use the provided word document solution template for your solution. There are further instruction on the cover page of the solution document.
ECA Submission Guidelines
Please follow the submission instructions stated below:
This ECA carries 70% of the course marks and is a compulsory component. It is to be done individually and not collaboratively with other students.
Submission You are to submit the ECA assignment in exactly the same manner as your tutor-marked assignments (TMA), i.e. using Canvas. Submission in any other manner like hardcopy or any other means will not be accepted.
Electronic transmission is not immediate. It is possible that the network traffic may be particularly heavy on the cut-off date and connections to the system cannot be guaranteed. Hence, you are advised to submit your assignment the day before the cutoff date in order to make sure that the submission is accepted and in good time. Once you have submitted your ECA assignment, the status is displayed on the computer screen. You will only receive a successful assignment submission message if you had applied for the e-mail notification option.
ECA Marks Deduction Scheme
Please note the following:
- Submission Cut-off Time – Unless otherwise advised, the cut-off time for ECA submission will be at 12:00 noon on the day of the deadline. All submission timings will be based on the time recorded by Canvas.
- Start Time for Deduction – Students are given a grace period of 12hours. Hence calculation of late submissions of ECAs will begin at 00:00 hrs the following day (this applies even if it is a holiday or weekend) after the deadline.
- How the Scheme Works – From 00:00 hrs the following day after the deadline, 10 marks will be deducted for each 24-hour block. Submissions that are subject to more than 50 marks deduction will be assigned zero mark. For examples on how the scheme works, please refer to Section 5.2 Para 1.7.3 of the Student Handbook. Any extra files, missing appendices or corrections received after the cut-off date will also not be considered in the grading of your ECA assignment.
Plagiarism and Collusion
Plagiarism and collusion are forms of cheating and are not acceptable in any form of a student’s work, including this ECA assignment. You can avoid plagiarism by giving appropriate references when you use some other people’s ideas, words or pictures (including diagrams). Refer to the American Psychological Association (APA) Manual if you need reminding about quoting and referencing. You can avoid collusion by ensuring that your submission is based on your own individual effort. The electronic submission of your ECA assignment will be screened through a plagiarism detecting software. For more information about plagiarism and cheating, you should refer to the Student Handbook. SUSS takes a tough stance against plagiarism and collusion. Serious cases will normally result in the student being referred to SUSS’s Student
Disciplinary Group.
(Full marks: 100)
Question 1
Question 1a
Drop the database and re-run the initialization process of the Staycation case study by
- registering the admin user: [email protected] with password 12345,
- logging in as admin, and
- uploading the files: users.csv, package.csv and booking.csv.
Using relevant code in the frontend and backend components, explain how the application restricts the Upload function to the admin user. Highlight the relevant statements in the source code and explain how they help support/enforce the restriction. Include how the application records and assesses data to determine the type of user.
(9 marks)
Question 1b
Draw the model classes and their relationships using class diagram notation introduced in ICT162. You may also refer to the class diagram for TMA question 2, Figure Q2(b) as an example.
Explain how the model classes are related (e.g., generalisation, object composition) and how the various fields are assigned values when each csv file is uploaded.
(9 marks)
Question 1c
Explain the use of ReferenceField in the Staycation application. Assess whether each of the ReferenceField(s) should be replaced by EmbeddedDocumentField(s). Explain your assessment and provide reasons.
(5 marks)
Question 1d
Differentiate between server-side and client side rendering using the Staycation application to illustrate similarities and differences. Start your explanation from HTTP requests to finally what a user will see on the browser.
(12 marks)
Question 2
This question focuses on adding functions for the non-admin users, and requires you to make changes to the model class(es) in addition to implementing the functions. There are two parts in this question:
Question 2a
Please implement according to the following description.
Extend the upload function of the Staycation application to record users’ reviews of their staycations. Three new columns are added in booking2.csv as shown below:
| check_in_date | customer | hotel_name | comment | rating | datetime |
| 25/12/2023 | [email protected] | Shangri-La Singapore | comfy and good. I had a very good time with my family. The service staff are polite and prompt. | 4 | 28/12/2023
22:37 |
| 31/12/2023 | [email protected] | Capella Singapore | Excellent experience! | 5 | 2/1/2024
0:00 |
| 5/1/2024 | [email protected] | W Singapore – Sentosa Cove |
A review consists of comment and a rating (1-5). When there is no review for a booking, the three new columns are empty.
Drop the booking collection in your database and test that your implementation is working by uploading booking2.csv.
(10 marks)
Question 2b
Please apply the following modifications to your website.
Allow the user to directly provide new reviews as well as to edit past reviews.
Question 2b(i)
Create a new feature according to the following description.
Add a new link Provide Review to the sidebar to allow access to the review page. Only staycations booked by the user with check-in date yesterday or earlier will be displayed on the review page. The past booked staycations are shown in ascending chronological order.
The review page for John (email [email protected], password 12345) is shown in Figure Q2(b)(i).
Figure Q2(b) (i) The review page for John
Provide a button to edit review for each past booking if the user has already provided a review. Otherwise, provide a button to add a review.
(12 marks)
Question 2b(ii)
Create new functionalities according to the description below.
The button Edit review enables the user to update a review for a past booking. The button Add review adds a review for a booking that does not yet have a review. Figure Q(b) (ii) shows the effect of editing the review for the booking for Shangri-La (first row) and adding a review for Sentosa Cove (last row). The datetime displayed for the edit or create is the current datetime at the time of edition/creation.
Figure Q2(b) (ii) The review page for John after an edit and an add
Note that a review can be repeatedly edited. The review will capture only the latest comments, rating and the datetime of the review.
(8 marks)
Question 3
This question focuses on extending the dashboard function for the admin user.
Question 3a
Modify the Dashboard link on the sidebar to Charts. Also update the Dashboard page so that the page now shows 3 hyperlinks (similar to the Dashboard page in BMI case study) as shown in Figure Q3(a)(i).
Figure Q3(a)(i): The Chart page
Clicking on the first hyperlink Click to Package Incoming Chart will show the chart that the old Dashboard link shows. The chart should now appear on the same page, as shown in Figure Q3(a)(ii).
Figure Q3(a)(ii): The Chart page when the first hyperlink is clicked on
You are to apply responsive web design (RWD) so that if the screen size is small, the two charts should appear on separate lines as shown in Figure 3(a)(iii). Likewise, you must apply RWD for Questions 3(b) and 3(c).
Figure Q3(a)(iii): The Chart page on a smaller screen size
(5 marks)
Question 3b
Show a chart that displays the average rating for packages with reviews. Do not consider packages with past bookings without a review.
When the second link Click to Package Average Rating Chart is clicked on, the chart for average rating for packages with reviews should displayed. Refer to Figure Q3(b)(i) for an example. Compute the average rating by summing the rating and dividing the sum by the number of reviews for each package.
Figure Q3(b)(i): The Chart page when the second hyperlink is clicked on
(14 marks)
Question 3c
Modify the existing functionalities according to the description below.
When the third link Click to Package Rating Chart is clicked on, a dropdown for package names with at least one review should show on the page. Refer to Figure Q3(c)(i).
Figure Q3(c)(i): The Chart page when the third hyperlink is clicked on
When a package is selected, the count of each rating (1-5) is used to plot the chart. Two examples are shown in Figure Q3(c)(ii) and Figure Q3(c)(iii). Revert to Figure Q3(c)(i) when Choose package name is selected. In such a case, you should not make any request to the server to fetch data, instead set the chart to empty.
Figure Q3(c)(ii): The Chart page when Sentosa Cove is selected
Figure Q3(c)(iii): The Chart page when Capella is selected
(16 marks)
—– END OF ECA PAPER —–



