CP2011 Assignment Details, SP1 2015

CP2011 Assignment Details, SP1 2015

The coding project is designed to assess how you problem solve and implement a client/server architecture using HTML5/CSS/JS on the client-side and Java 1.8 Servlets and JDBC on the server-side. Your task is to design and implement a prototype electronic weather tracking system that could be deployed on PCDuino devices with appropriately calibrated sensors (temperature, humidity, light).

This task requires you to create several JavaScript objects/functions on the client-side and a few Java classes on the server-side. Both sides of the system utilize the MVC design pattern. The client-side programming requires you to create a basic GUI in HTML and CSS code that is controlled and manipulated by JavaScript code. The server-side programming requires you to setup a Tomcat web- server with an associated MySQL database connectivity.

The documentation requirements for the project with suggested number of pages for each part:

  1. Project scope – a half-page description about the project’s goals and key concepts
  2. Project Tools – a half-page description about the software tools you used during the project
  3. Requirements Analysis – a collection of fully-dressed use-cases and a use-case diagram that

    describes the overall usage of the weather tracking system (2 pages)

  4. Implementation – a one page discussion about the data structures and algorithms you used

    to support the main functionality of the project (client-side and server-side)

  5. Design – a collection of UML object diagrams (client-side), UML class diagrams (server-side),

    and a deployment diagram that reveal the overall structure of your solution (2 pages)

  6. Modularity – a one page discussion about the design patterns used to solve design problems

    on the client-side and the server-side

  7. Database – your Domain Model diagram and your SQL table(s) structure (1 page)

The coding requirements for the project:

 Use web application technology: HTML5/CSS/JS, JavaEE, MySQL, and Tomcat o HTML forms that posts requests to Java Servlets
o Java Servlets programmed to interact with a MySQL database

 Your prototype weather tracking system needs to support these features at least:
o A setup page for selecting which sensors are active (temperature, humidity, light).

The current sensor configuration details are saved into a database table
o Enabling a sensor clears and restarts its data collection statistics (sum, mean,

population standard deviation). Disabling a sensor stops its data collection
o The weather tracker only needs to generate random values in the following ranges:

 Temperature: 16 – 38 Celsius  Humidity: 10 – 90 %
 Light 0 – 100

o The weather tracker saves the statistics into a database table
o A data view page for displaying the raw sensor data and the statistics. You must be

able to tell the difference between enabled and disabled sensors on this page

o A notification page that allows the user to set a list of valid email address and threshold values for sensors. When a sensor value reaches its threshold then email notifications are sent with the currently active sensor data.

Note: threshold values should be defined in terms of relational operators, for example:

  •   Temperature > 35
  •   Humidity > 85
  •   Light < 10

    The students who produce the most realistic weather tracking prototype will be selected to present their projects at Open Day this year using real PCDuino kits!

    Submission details:

  •   Individual submission: due 22nd May 2015 (end of Week 12)
  •   We have the following expectations about the project work:

     Your high-level deployment diagram should illustrate the software and hardware setup  You provide the follow fully-dressed use-cases at least:

o Add notification, remove notification, change notification, select active sensors  Your Domain model illustrates the problem domain and helps you define the MySQL

database table schema
 Your prototype codebase closely matches your UML design diagrams – we suggest that

you annotate your diagrams with the design patterns you used
 Data visualisation should be done using programmatically generated <table> elements

on the client-side (i.e. the corresponding Servlet sends the data as plain text)
 The MySQL database records information about the sensors, data, and notifications:

o You are not expected to produce a highly normalised database design

o But, some care should be taken when choosing appropriate column data types  Your assignment will be evaluated by executing your prototype to see how closely it

follows your use-cases
 You are expected to include JUnit test cases for checking database connectivity