首页 > > 详细

辅导FIT5046辅导Mobile and Distributed Computing Systems


Monash University
FIT5046 – Mobile and Distributed Computing Systems
Practical Assignment (Server-Side) (10%)
Due Week 5, Friday 3 pm (10th of April)
An Overview:
 The assignment is an individual assignment.
 This assignment 1 (server-side) does not have an interview.
 This assignment requires submitting a report that includes all the required code, diagram and
screenshots as specified and in the right order, format and structure.
(Note: Your mark will be based on the code and screenshots provided in the report)
 Practical Assignment (client-side) Phase 2 will be developed based on this assignment Phase 1 and
it will have an interview.
 The marks allocated for all the tasks in this assignment will add up to 100 marks and it is worth
10% of the total mark for this Unit.

Due Date: The submission is due on Friday Week 5 (10th April) by 3 pm.

Objectives and learning outcomes:
 To identify, develop and apply different approaches and methods for building distributed and mobile
computing systems;
 To select and apply effective and efficient (server-side) approaches for this particular distributed
application;
 To develop and test the server-side components of a mobile distributed application.
My Movie Memoir (M3)
The practical assignments Phase 1 and Phase 2 (server-side and client-side) aim towards building a
mobile and distributed, personalised diary application for keeping track of movies (and TV series) that
the user watched or wants to watch in future. The application will provide a movie memoir that allows
the user to create a collection of memories that they had about the movies.
The practical assignment 1 will focus on creating the backend and server-side components of this
mobile, distributed system. The server side will make the data and services (methods) available to all
the mobile clients through an API (RESTful web services APIs).
The practical Assignment (server-side) requires: 1) creating a database (Java DB database in NetBeans)
that will include the specified tables and populating the tables with meaningful data; and 2) creating a
RESTful web service that enables querying this data and updating it if necessary.
The practical Assignment 3 (client-side) Phase 2 will involve creating an android application that will
interact with public web APIs and the REST web service (created in Assignment 1) to query and retrieve
data.
Assignment 1 MUST be implemented in NetBeans.
2


Figure 1. an overview of Assignment 1 and Assignment 3
Report Format
You need to submit a written report as a Word/pdf document, which includes a copy of your written
code (copy and paste your code from NetBeans) and screenshots of running RESTful methods in the
browser:
 The report will include a cover page that includes your full name and student id, the assignment
name, the unit name, and your tutor name;
 You need to include Table of contents (this means you have to include a page number)
 You will include your written code and the screenshots with the same order of tasks listed
here.
 You need to use numbered headings and subheadings (e.g. 1. Task 1. Part a:… ).
 You must write one sentence to explain your written code/method, and a screenshot of its
execution in the browser, similar to Figure 2 (shown on page 4).
 Your code in the report must be EXACTLY the same code in the NetBeans project that
you will submit to Moodle in a zip file.
Task 1 – Database (15 marks):
Based on the requirements below, you will create the backend database and its tables with the specified
attributes and populate them with data as described in part (b). You need to add all the required
constraints and create the relationships.
a) You need to create the following tables (you should not add any additional table):
User Person Table (3 marks)
The user Person table will store data about the user that include: first name, surname, gender, DoB,
address (street number and street name), state, and postcode (only consider for Australia).

Credentials Table (3 marks)
The Credentials table will store information about a user’s credentials including: username (we suggest
to use the email for the username), password hash, and sign-up date. There is no need for extra security
measurements in this application such as adding salt to hashing. Also, there is no need for considering
password expiration.
Assignment 1
Assignment 3
3

Memoir Table (3 marks)
This table will store a collection of memories about movies that the user have watched. These memories
include the following information: movie name, movie release date, the date and time that the user
watched the movie, a comment about user memory or opinion, a rating score given by the user (not by
the public) based on stars. The table below shows the star ratings compared to a 1 – 99 scale. In the
Assignment 3 (the phase 2 of this assignment) you must show all the rating scores as stars (half and
full).
STARS 1-99 scale
0 1-9
0.5 10-18
1 19-27
1.5 28-36
2 37-45
2.5 46-54
3 55-63
3.5 64-72
4 73-81
4.5 82-90
5 91-99

Cinema Table (2 marks)
The Cinema table will store data about the cinema that include: cinema name, and its location as suburb
or postcode (you can decide on this based on the APIs you will use in Assignment 3).
- One person/user can have multiple movie memories in the Memoir table.
-One movie memory can be associated with only one cinema. One cinema can repeated in different
memories.
-The person/user will have only one memory for a movie experience. It means if the user watches the
same movie and in the same cinema, it will create a different experience and memory (the date and time
will also be different).

b) You will use an appropriate and correct schema based on the above-mentioned requirements and
implement the right relationships and choose the right FKs. Provide a simple ER diagram. (2 marks)
We strongly recommend using a unique ID for each table as the PK because it makes it easy when
working with NetBeans RESTful web services.
c) All the tables need to be populated with meaningful data and appropriate data types. (2 marks)
You need to have at least 3 records in the user person and credentials tables. In Assignment 3 (practical
assignment Phase 2), you will automatically generate the latitude and longitude values from the user
person’s full address data so make sure you enter correct and real world values. To populate the
credential table, you can use an online hash converter to convert a password to hash values but in
Practical Assignment (client-side), you will hash the password using Java code and libraries.
In the memoir table, you need to include at least 10 records/memories for one of the users. In the cinema
table, you will enter at least 5 cinemas. You need to make sure you enter such data that all the queries
in Task 4 will return data (not an empty response.

4

You need to provide the SQL code for creating and populating EACH table (and code for
establishing FK constraints or any other constraints) and a simple ER diagram in your submitted
report document to receive marks for this Task. Any missing or incomplete SQL code or an ER
diagram as specified will result in mark deduction.

Task 2 - RESTful Web Service (5 marks)

A RESTful web service should be created based on the above-mentioned database and tested on the
browser without any error. (5 marks)

For this part, you need to test the web service and provide one screenshot showing all methods as
the figure below. On the left-hand side, you need to expand all the folders and show their contents.


Figure 2. An example of the browser screenshot


Task 3 – Dynamic and Static Queries (20 marks)

In this part, the web service will be extended by adding extra methods and queries using the Java
Persistence Query Language (JPQL). The queries that you write will apply two different approaches as
discussed in the lectures and tutorials: one approach where you define a static query (NamedQuery) in
Entity class and then you call it from a RESTFacade’s method, and the other approach where you create
a dynamic query directly in a RESTFacade’s method.

a) You will write additional REST methods to query all the tables based on each attribute that the table
has. E.g. if the user Person table has 6 attributes, you write 6 REST methods to query each attribute
separately. This excludes the method to query the primary key (id) because it is automatically generated.
For this task, provide all the code BUT only one screenshot for one of the REST methods for each table.
(5 marks)

b) You need to create a new REST method that enables querying the user Person table using a
combination of three attributes (e.g. address, state and postcode). This should be implemented as a
DYNAMIC query. You will decide which attributes to consider based on their usefulness in the query.
(5 marks)

5

c) You will write a new REST method that enables querying the memoir and the cinema tables using
a combination of two attributes in the condition where each attribute is from a different table. The
query should be a DYNAMIC query using an IMPLICIT join. (5 marks)

d) You will write a new REST method that enables querying the memoir and the cinema tables using
a combination of two attributes in the condition where each attribute is from a different table. The
query should be a STATIC query using an IMPLICIT JOIN. For this, you also need to show the code
for the NamedQuery in the entity class. (5 marks)

For this part, you need to provide your written code for the REST methods (by copying and pasting it
from NetBeans), any code added to the Entity classes, and one screenshot per each method after
testing on the browser. Any missing code or screenshot will result in mark deduction.
In subtask Task 3 (a), only one screenshot of one GET method for each table is sufficient but provide
all the code.

Task 4 - Advanced REST methods (60 marks)

a) You will add a REST method that will accept a user person id, a starting date and an ending
date and return a list that contains the cinema’s suburbs/postcodes and the total number of
movies watched per suburb/postcode during that period. (10 marks)
b) You will add a REST method that will accept a user person id and a year, and return a list that
contains the month names and the total number of movies watched per month in that year. (10
marks)
c) You will add a REST method that will accept a user person id and return the name(s), the rating
score(s) and release date(s) of the movie(s) with the highest rating score given by that user.
Please note that the result can be a list if more than one movie received the same score. (10 marks)
d) You will add a REST method that will accept a user person id and return a list of movie names
and their release years for those movies that their release year is the same as the year the user
watched them. E.g. if a movie was released in 2020 and the user watched it in 2020. (10 marks)
e) You will add a REST method that will accept a user person id and return a list of movie names
and their release years for those movies that the user has watched their remakes as well. E.g. If
the user watched The Lion King 2019 and The Lion King 1994. (10 marks)
f) You will add a REST method that will accept a user person id and return a list of the movie
names, their release dates and rating scores for FIVE movies that have been released in the
recent year and have the highest rating score (five top ones). (10 marks)

For Task 4 and 5, you need to provide all the code of new REST methods, and any code added to the
entity files (and any other additional code/class you added) to receive full marks for this part. You also
need to test the web service and provide ONE screenshot for each new method. Any missing or
incomplete code or the screenshot will result in mark deduction.
Late Submission:
Late Assignments or extensions will not be accepted unless you submit a special consideration form and
provide valid documentation such as a medical certificate prior to the submission deadline (NOT after).
Otherwise, there will be a 5% penalty per day including weekends.
Submission Guideline:
A ZIP file will be uploaded to Moodle by the deadline including the following files:
6

1. The REPORT with all the specified code and screenshots that were mentioned in each
task in ONE word/pdf report document, NOT as separate image files.
2. The NetBeans project including all the packages and classes and files.
3. The zip file should have this name: FIT5046Assign1-Sem1-[studentname]-[studentid]-
[tutor name].zip
Mark Deduction will be applied if: i) any piece of code or screenshot for each Task is missing,
ii) the REPORT does not follow the above-mentioned format, or iii) if any of the NetBeans
project files is missing and not included in the zip file
PLEASE NOTE.
Plagiarism and Collusion
Before submitting your assignment, please make sure that you haven't breached the University
plagiarism and cheating policy. It is the student's responsibility to make themselves familiar with the
contents of these documents.
Please also note the following from the Plagiarism Procedures of Monash, available at
http://www.policy.monash.edu/policy-bank/academic/education/conduct/plagiarism-procedures.html

Collusion occurs when a student works with others to produce work, which is
then presented as the student's own work, or the work of the other person(s). Collusion includes when
a student without the authorisation of staff involved in the teaching of a unit:
 works with one or more people to prepare and produce work;
 allows others to copy their work or shares their answer to an
assessment task;
 allows someone else to write (with the exception of instances where the use of a scribe is
approved by the Disability Liaison Unit) or edit their work (noting that proofreading is
acceptable, provided it is compliant with the University's definition contained in the Academic
Integrity Policy);
 writes or edits work for another student; or
 offers to complete work or seek payment for completing academic work for other students.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!