Beijing-Dublin International College
SEMESTER 2 RESIT EXAM - (2019/2020)
School of Computer Science
COMP3019J Web Application Development
Time Allowed: 120 minutes
Instructions for Candidates:
This is a programming exam. Read the question paper carefully and write
code to satisfy the requirement.
BJUT Student ID: UCD Student ID:
I have read and clearly understand the Examination Rules of both Beijing University of Technology
and University College Dublin. I am aware of the Punishment for Violating the Rules of
Beijing University of Technology and/or University College Dublin. I hereby promise to abide
by the relevant rules and regulations by not giving or receiving any help during the exam. If
caught violating the rules, I accept the punishment thereof.
Honesty Pledge: (Signature)
Instructions for Invigilators
No rough-work paper is to be provided for candidates.
BDIC Semester 2 Academic Year (2019/2020)
This resit exam is based on the skeleton code that has been given to
COMP3019J作业代做
you. You are required to make modifications to the skeleton code to
add/modify features. At the end of the exam, you are required to create
a zip file containing only the blogapp directory, and submit it on
Moodle. Please do NOT send any other code or documents. The zip
file must be named: [your-ucd-student-id].zip. If you are unable to
upload to Moodle, please send the zip file to [email protected]
Question 1: Flask-Based Microblog
1. Modify the static HTML page of the microblog to add the table as shown
in the figure below
(10)
2. Modify the appearance of the table you created in the previous question
by applying CSS. Note: You must only modify the css file and nothing
else. After applying the CSS, your table should look like the figure below
(10)
Page 2 of 5
BDIC Semester 2 Academic Year (2019/2020)
3. Modify the menu that the user sees, when the website is first loaded, so
that the user is able to see a link that says Show all posts like the figure
below
Clicking on the link should show the user all the posts that have been
added to the system by various users and the time at which they added
it. Note: the user should not need to login for this. Create a template
called allposts.html for showing the result. The resulting page should
look like below
(10)
Page 3 of 5
BDIC Semester 2 Academic Year (2019/2020)
4. Add Javascript to the appropriate file (myjs.js), such that when the user
goes to the signup link and tries to register, it checks the password field
for the following features:
(a) The password must be at least eight (8) characters in length
(b) The password must begin with either a number (0 − 9) OR a capital
letter (A - Z)
The Javascript should check the password field, when the user finishes entering
the password and goes to the next field (which is Repeat Password).
The Javascript should check condition (a) before condition (b), and it
should alert the user at the first failure. The screen should look like one
of the screens below (depending on the condition that failed)
(20)
5. Add a feature to the site, so that when a user logs in, they can see another
option, both in the menu at the top as well as on the webpage, to see
their own previous posts. Create a new template called prev posts.html
to show the posts. The screen should look like the one below:
Clicking on the Show previous posts link should show the user only the
posts that they have made, themselves. If there are no posts made by the
user, the screen should look like below:
Page 4 of 5
BDIC Semester 2 Academic Year (2019/2020)
If there are any posts, then the screen should look like below:
(30)
6. Modify the existing code for Write a micro post so that when the user
finishes writing the post, they are taken to the screen that shows their
previous posts. For example, if I write a new post saying “My second
post”, then clicking on the Add Post button should take me to the Show
previous posts screen. The screen would then look like below:
(20)
(Sub-total for the section: 100)
Total marks for the paper: 100
Page 5 of 5
如有需要,请加QQ:99515681 或邮箱:[email protected] 微信:codehelp