代做COMP 636、Java程序设计代写
COMP 636: Web App Assessment
Milestone submission due: 5pm Friday 10 May 2024 via Learn
Final submission due: 5pm Wednesday 12 June 2024 via Learn
Worth: 50% of COMP636 grade
Submit via Akoraka | Learn, with files set up and available on GitHub and pythonanywhere.
Introduction
Selwyn Campground have decided that they want to upgrade their internal system from the textbased
system to a web-based system. Your task is to develop a small Web Application to help them
manage customers, sites, and bookings. You will also write a report.
The system will only be used by office staff and does not require any form of login or authentication.
Bookings are recorded in the system by making an entry for each night a site is booked.
Download the Web Application Project Files from the Assessment block on the Learn page. These will
get you started, including for the Milestone. You will add more routes and templates as you develop
your app.
The requirements presented are not exhaustive, you are expected to apply critical thought to them
as a key aspect of the software development process. Ask clarifying questions in the in-person or
online support sessions.
Important
This is an individual assessment. You may not collaborate or confer with others. You
may help others by verbally explaining concepts and making suggestions in general
terms, but without directly showing or sharing your own code. You must develop the
logical structure and the detail of your code on your own. Code that is copied or shares a
similar logic to others will receive zero marks for both parties. The University policy on
Academic Integrity can be found here.

Requirements

1) Create a private github repository called scg, this repository should be pulled locally and to
pythonAnywhere. Your web application should be in a top level directory called scg
(automatically created when you pull your repository), and your MySQL database should be
called scg. You are required to commit and push changes from your local computer to your
GitHub repository at least twice a week between milestone and final submissions.
2) Host your web app on pythonAnywhere.
3) Complete the camperlist.html template to display a list of campers who are camping on a
particular night. The template should use bootstrap for formatting.
4) Complete the /booking/add route to insert a booking into the database.
5) Create templates and routes to allow customers to be searched and for the results to be
displayed.
6) Create templates and routes to allow customers to be added to the system, and ensure
appropriate validation is in place.
2

7) Create or modify templates and routes to allow customer information to be edited.
8) Create templates and routes to display a report that shows the total number of nights that a
customer has booked (past, current and future booking combined). The report should show
the name of the customer, the total number of nights booked and the average occupancy for
this customer.
9) Create a report as described in the Report section to be hosted in your github repository.

Report
Your report must be created using GitHub Markdown format and saved in the README.md file of
your GitHub repository. It does not need to be a formal report – a tidy document using the following
headings will be sufficient. Write a brief project report that includes:
• Design decisions:
o Discuss the design decisions you made when designing and developing your app: what
design options you weighed up, why you designed your app the way that you did, your
decisions about the routes, templates, navigation, broad layout, etc., that you made.
o For example, when the edit button is clicked on a page, does that open a different template
for editing or does it use the same template with IF statements to enable the editing? Did
you use GET or POST to request and send data, and how and why? These are two examples,
you do not have to include them in your own discussion. You will have considered many
design possibilities; write in plain language about your own personal decisions.
o Note your decisions as you work, so you do not forget them!
• Database questions: Refer to the supplied scg_local.sql file to answer the following questions:
1. What SQL statement creates the customer table and defines its fields/columns?
(Copy and paste the relevant lines of SQL.)
2. Which line of SQL code sets up the relationship between the customer and booking
tables?
3. Which lines of SQL code insert details into the sites table?
4. Suppose that as part of an audit trail, the time and date a booking was added to the
database needed to be recorded. What fields/columns would you need to add to
which tables? Provide the table name, new column name and the data type. (Do not
implement this change in your app.)
5. Suppose the ability for customers to make their own bookings was added. Describe
two different changes that would be needed to the data model to implement this.
(Do not implement these changes in your app.)
• Image sources: It is not necessary to use any external images in your web app, but if you do,
ensure you reference the image source in your report.

3

Data Model


Model Notes:
Child table.field * (refers to) Parent table.field
bookings.customer

customers.customer_id
bookings.site

sites.site_id
* the ‘Foreign Key’

Project Constraints
You must:
• Use only the COMP636 technologies (Python & Flask, Bootstrap CSS, MySQL). Do not use
SQLAlchemy or ReactJS (or other similar technologies) in your solution.
Do not use any scripts, including JavaScript, except for the