Coursework

139 views 10:38 am 0 Comments September 28, 2023

University of Westminster
Department of Computer Science
5COSC023W Coursework 2 (Semester 2)

Module leader
Unit
Weighting:
Qualifying mark
Description
Learning Outcomes Covered
in this Assignment:
Handed Out:
Due Date
Expected deliverables
Method of Submission:
Type of Feedback and Due
Date:
Dr D. Dracopoulos
Coursework 2
50%
30%
LO1, LO2, LO3, LO4, LO5
March 2023
11/4/2023 13:00
Source code/XML files/Resources (images, etc)/Video
Online via Blackboard
Individual feedback via Blackboard within 3 weeks of submission
All marks will remain provisional until formally agreed by an Assessment
Board.

Assessment regulations
Refer to section 4 of the “How you study” guide for undergraduate students for a clarification of how you are assessed,
penalties and late submissions, what constitutes plagiarism etc.
Penalty for Late Submission
If you submit your coursework late but within 24 hours or one working day of the specified deadline, 10 marks will be
deducted from the final mark, as a penalty for late submission, except for work which obtains a mark in the range 40 –
49%, in which case the mark will be capped at the pass mark (40%). If you submit your coursework more than 24 hours or
more than one working day after the specified deadline you will be given a mark of zero for the work in question unless a
claim of Mitigating Circumstances has been submitted and accepted as valid.
It is recognised that on occasion, illness or a personal crisis can mean that you fail to submit a piece of work on time. In
such cases you must inform the Campus Office in writing on a mitigating circumstances form, giving the reason for your
late or non-submission. You must provide relevant documentary evidence with the form. This information will be reported
to the relevant Assessment Board that will decide whether the mark of zero shall stand. For more detailed information
regarding University Assessment Regulations, please refer to the following website
:http://www.westminster.ac.uk/study/current-students/resources/academic-regulations
It
is recognised that on occasion, illness or a personal crisis can mean that you fail to submit a piece of work on
time. In such cases you must inform the Campus Office in writing on a mitigating circumstances form, giving
the reason for your late or non-submission. You must provide relevant documentary evidence with the form.
This information will be reported to the relevant Assessment Board that will decide whether the mark of zero

shall stand. For more detailed information regarding University Assessment Regulations, please refer to the
following website:
http://www.westminster.ac.uk/study/current-students/resources/academic-regulations
It is recognised that on occasion, illness or a personal crisis can mean that you fail to submit a piece of work on
time. In such cases you must inform the Campus Office in writing on a mitigating circumstances form, giving
the reason for your late or non-submission. You must provide relevant documentary evidence with the form.
This information will be reported to the relevant Assessment Board that will decide whether the mark of zero
shall stand. For more detailed information regarding University Assessment Regulations, please refer to the
following website:
http://www.westminster.ac.uk/study/current-students/resources/academic-regulations
5COSC023W MOBILE APPLICATION
DEVELOPMENT – Assignment 2
Deadline 11/4/2023, 13:00
Dr Dimitris C. Dracopoulos
Email: [email protected]
Description
You are required to implement an Android application using Kotlin described by the specifcations below.
You are not allowed to use third-party libraries. The only libraries that you can
use are the standard Android API libraries found in the following URL:
https://developer.android.com/reference/
It is important to follow exactly the specifcations and your implementation must
conform to these:
The application developed will be helping users with meal preparation.
The application will be using the
https://www.themealdb.com/api.php/ Web service and
the Room Library to save information about meals.
1. When the application starts, it presents the user with 3 buttons labelled
Add Meals to DB,
Search for Meals By Ingredient and Search for Meals. (2 marks)
2. Clicking on the Add Meals to DB button saves all the details of a few meals in an SQLite
database local to the mobile device using the Room library. The specifc information of
the meals which will be saved is shown in the following link and the information saved
could simply be hardcoded in the application.
https://dracopd.users.ecs.westminster.ac.uk/DOCUM/courses/5cosc023w/meals.txt
An appropriate database with appropriate tables should be created and populated by your
application, based on the above data.
(20 marks — 10 marks for the creation of the database and 10 marks for its population)
3. The application is using the following Web service:
https://www.themealdb.com/api.php/
The documentation of how to use the Web service is in the above web page. For example,
the following request (type this in your web browser):
1

https://www.themealdb.com/api/json/v1/1/search.php?s=Arrabiata
will give you back the results (in JSON format) of searching the meal with name “Arrabiata”:
{“meals”:[{“idMeal”:”52771″,”strMeal”:”Spicy Arrabiata Penne”,
“strDrinkAlternate”:null,”strCategory”:”Vegetarian”,”strArea”:”Italian”,
“strInstructions”:”Bring a large pot of water to a boil. Add kosher
salt to the boiling water, then add the pasta. Cook according to the
package instructions, about 9 minutes.,
“strTags”:”Pasta,Curry”,
“strYoutube”:”https://www.youtube.com/watch?v=1IszT_guI08″,
“strIngredient1″:”penne rigate”,”strIngredient2″:”olive oil”,
“strIngredient3″:”garlic”,
“strIngredient4″:”chopped tomatoes”,”strIngredient5″:”red chile flakes”,}] …..}
Clicking on the Search for Meals By Ingredient button will present the user with a
screen displaying a single textbox and 2 buttons
Retrieve Meals and Save meals to
Database
.
The user will be using the textbox to type the name of an ingredient and click the
Retrieve
Meals
button to retrieve all the details of all the meals containing this ingedient from the
Web service. The details of each meal will be displayed as part of the same screen of the
application in the following format, for example if the user searches for “chicken” as an
ingredient:
“Meal”:”Brown Stew Chicken”,
“DrinkAlternate”:null,
“Category”:”Chicken”,
“Area”:”Jamaican”,
“Instructions”:”Squeeze lime over chicken and rub well….”,
“Tags”:”Stew”,
“Youtube”:”https://www.youtube.com/watch?v=_gFB1fkNhXs”,
“Ingredient1″:”Chicken”,
“Ingredient2″:”Tomato”,
“Ingredient3″:”Onions”,
“Ingredient4″:”Garlic Clove”,
“Ingredient5″:”Red Pepper”,
“Ingredient6″:”Carrots”,
“Ingredient7″:”Lime”,
“Ingredient8″:”Thyme”,
“Ingredient9″:”Allspice”,
“Ingredient10″:”Soy Sauce”,
“Ingredient11″:”Cornstarch”,
“Ingredient12″:”Coconut Milk”,
“Ingredient13″:”Vegetable Oil”,
“Measure1″:”1 whole”,
“Measure2″:”1 chopped”,
“Measure3″:”2 chopped”,
“Measure4″:”2 chopped”,
“Measure5″:”1 chopped”,
2
“Measure6″:”1 chopped”,
“Measure7″:”1”,
“Measure8″:”2 tsp”,
“Measure9”:”1 tsp “,
“Measure10″:”2 tbs”,
“Measure11″:”2 tsp”,
“Measure12”:”2 cups “,
“Measure13″:”1 tbs”,
“Meal”:”Chicken & mushroom Hotpot”,
“DrinkAlternate”:null,
“Category”:”Chicken”,
“Area”:”British”,
“Instructions”:”Heat oven to 200C/180C fan/gas 6…. “,
“Tags”:null,
“Youtube”:”https://www.youtube.com/watch?v=bXKWu4GojNI”,
“Ingredient1″:”Butter”,
“Ingredient2″:”Onion”,
“Ingredient3″:”Mushrooms”,
“Ingredient4″:”Plain Flour”,
“Ingredient5″:”Chicken Stock Cube”,
“Ingredient6″:”Nutmeg”,
“Ingredient7″:”Mustard Powder”,
“Ingredient8″:”Chicken”,
“Ingredient9″:”Sweetcorn”,
“Ingredient10″:”Potatoes”,
“Ingredient11″:”Butter”,
“Measure1″:”50g”,
“Measure2″:”1 chopped”,
“Measure3”:”100g “,
“Measure4″:”40g”,
“Measure5″:”1”,
“Measure6″:”pinch”,
“Measure7″:”pinch”,
“Measure8″:”250g”,
“Measure9″:”2 Handfuls”,
“Measure10″:”2 large”,
“Measure11″:”1 knob”,
“Meal”:”Chicken Alfredo Primavera”,
“DrinkAlternate”:null,
“Category”:”Chicken”,
“Area”:”Italian”,
“Instructions”:”Heat 1 tablespoon of butter and 2 tablespoons of …. “,
“Tags”:”Pasta,Meat,Dairy”,
“Youtube”:”https://www.youtube.com/watch?v=qCIbq8HywpQ”,
“Ingredient1″:”Butter”,
3
“Ingredient2″:”Olive Oil”,
“Ingredient3″:”Chicken”,
“Ingredient4″:”Salt”,
“Ingredient5″:”Squash”,
“Ingredient6″:”Broccoli”,
“Ingredient7″:”mushrooms”,
“Ingredient8″:”Pepper”,
“Ingredient9″:”onion”,
“Ingredient10″:”garlic”,
“Ingredient11″:”red pepper flakes”,
“Ingredient12″:”white wine”,
“Ingredient13″:”milk”,
“Ingredient14″:”heavy cream”,
“Ingredient15″:”Parmesan cheese”,
“Ingredient16″:”bowtie pasta”,
“Ingredient17″:”Salt”,
“Ingredient18″:”Pepper”,
“Ingredient19″:”Parsley”,
“Ingredient20″:””,
“Measure1″:”2 tablespoons”,
“Measure2″:”3 tablespoons”,
“Measure3″:”5 boneless”,
“Measure4″:”1 teaspoon”,
“Measure5″:”1 cut into 1/2-inch cubes”,
“Measure6″:”1 Head chopped”,
“Measure7″:”8-ounce sliced”,
“Measure8″:”1 red”,
“Measure9″:”1 chopped”,
“Measure10″:”3 cloves”,
“Measure11″:”1/2 teaspoon”,
“Measure12″:”1/2 cup”,
“Measure13″:”1/2 cup”,
“Measure14″:”1/2 cup”,
“Measure15″:”1 cup grated”,
“Measure16″:”16 ounces”,
“Measure17″:”pinch”,
“Measure18”:”pinch “,
“Measure19″:”chopped”,
“Measure20″:””,
(20 marks — 10 marks for search and 10 marks for connectivity)
4. Following this, if the user clicks on the second button Save meals to Database all the
retrieved details of all the retrieved meals will be saved to the SQLite database of the device
(using the Room library), by using the same tables which were utilised in the previous
subquestion.
(10 marks)
5. Clicking on the Search for Meals button will display the user with a screen which contains a single textbox and a Search button.
4

The user can type in the textbox any string which is part of any the name of an meal or
an ingedient for a meal and subsequently press the
Search button to display ALL the
meals in the database which contain the typed string in the
Name or Ingredients felds of
the meal in the corresponding table containing this information.
The search should be case insensitive and a match does not have to be a complete match
but partial. I.e. if the user types the string “pEp” the displayed meal(s) could be, a
meal which contains “Roasted Peppers” or “red pepper” in the list of meals (names or
ingredients of meals).
(12 marks — 8 marks for search and 4 marks for case insensitivy)
6. Extend the application so that when the user clicks on the Search for Meals button (in
the last subquestion) all the meals displayed are also displaying their image (it could be a
small thumbnail image)
(8 marks)
7. For all the tasks, the application should behave in a user friendly manner when the device
is rotated from portrait to landscape and back to portrait mode. I.e. the application
should resume from exactly the same point (same screen and data) when the orientation
changes. The rotation of the device should not change what was the user was seeing before
the rotation.
(10 marks)
8. Extend the application so that the initial screen contains an additional button which the
user can press and subsequently type a string. All meals containing the string as part of
their name will be retrieved directly from the
Web service (NOT THE DATABASE)
and displayed to the user.
For example, if the user types “CHi” all of the meals in the OMDb Web service containing
this substring in their name will be retrieved and displayed to the user. These could be
“The Chicken Kiev”, “cHicken French”, etc.
(10 marks)
Marking Scheme: The marks achieved for each part of the program are indicated in the
description of the task above. In addition to these the following will be taken into account:
Code readability (structure, comments, variable naming, etc,): 4%
Implementation (e.g. quality, efciency, look and feel of the application, based on fonts,
colours, etc.): 4%
In addition to the above marks indicated in each of the sub-questions in the
specifcation, additional marks will be deducted if an application behaves in an
unexpected way. For example, an application should not crash, the application
should work properly even if a user enters invalid data or rotate the device
.
The maximum for work which does not compile (or XML or other resources fles
with syntax errors causes the project not to build) is 30%.
Failure to submit a video or a working link to a video will result to a capping of
your mark to 30% (i.e. if your submitted work is given initially a mark above 30%
it will be capped to 30%).
5
Submission of assignments using a different method other than Blackboard will
not be accepted and zero (0) marks will be awarded in such cases. The exception
is a working link to a video outside Blackboard.
Deadline
: Tuesday 11th of April 2023, 13:00.
Submission Instructions
Files to submit:
1. All of the fles of the Android Studio project of your application in a zip fle.
2. A video demonstrating all the functionality that you implemented for your application. If
the video size exceeds the size allowed by Blackboard you can submit a link to a video to
another site (e.g. Google Drive, Youtube, etc.) where you have uploaded the video. Make
sure that if your video is located to another web site and not Blackboard that you have
given appropriate permissions to external people to access your video.
Referencing code: Any code taken from other resources (i.e. a textbook or internet) should be
referenced in comments within your code (full textbook details or full web URL), identifying
the exact code that you used it as part of your application and the exact portions of the original
source code that you reused.
You should submit via BlackBoard’s Assignment functionality (do NOT use email, as email
submissions will be ignored.), all the fles described above. A single zip fle with the name
wNNNNNNNN (where wNNNNNNN is your university ID login name) containing all the above fles
could be submitted alternatively. You can create such a fle by using the main menu in Android
Studio and choose
File->Manage IDE Settings->Export to Zip File…
Note that Blackboard will allow to make a submission multiple times. Make
sure before submitting (i.e. before pressing the
Submit button), that all the fles
you want to submit are contained there (or in the zip fle you submit).
In the case of more than one submissions, only your last submission before the
deadline given to you will be marked, so make sure that all the fles are included in
the last submission attempt and the last attempt is before the coursework deadline.
Request to mark submissions which are earlier than the last submission before
the given deadline will be ignored as it is your responsibility to make sure everything
is included in your last submission
.
The following describes how to submit your work via BlackBoard:
1. Access
https://learning.westminster.ac.uk and login using your username and password (if either of those is not known to you, contact the Service Desk, tel: +44 (0) 207
915 5488 or log a call via
https://servicedesk.westminster.ac.uk.).
2. Click on the module’s name,
MODULE: 5COSC023W.2022 MOBILE APPLICATION DEVELOPMENT
found under My Modules & Courses.
3. Click on the
Assessment->Submit Coursework->Coursework.
6

4. Click on View Assignment.
5. Attach your zip fle containing all the Kotlin source code fles and resources of the Android
Studio Project, by using the
Browse button.
6. Attach your video or include a link of your video as the frst comment line) in the MainActivity of your code.
7. Create a Word or PDF fle with the following information:
Comments: Type your full name and your registration number, followed by:
”I confrm that I understand what plagiarism is and have read and understood the
section on Assessment Offences in the Essential Information for Students. The work
that I have submitted is entirely my own. Any work from other authors is duly
referenced and acknowledged.”
8. Attach the fle with the statement above.
9. Check that you have attached both the zip, the video (or the video link) and the statement
fle.
10. Click the
Submit button.
If Blackboard is unavailable before the deadline you must email the Registry at
[email protected] with cc: to myself and your personal tutor before the
deadline with a copy of the assignment, following the naming, title and comments conventions
as given above and stating the time that you tried to access Blackboard. You are still expected
to submit your assignment via Blackboard. Please keep checking Blackboard’s availability at
regular intervals up to and after the deadline for submission. You must submit your coursework
through Blackboard as soon as you can after Blackboard becomes available again even if you
have also emailed the coursework to the above recipients.
7

Coursework Marking scheme
The Coursework will be marked based on the following marking criteria:
Criteria Mark per
component
Mark
provided
Comments
Implementation 100
Functionality 92 For a split of the marks see the
subquestions description in the main
description of the coursework
Code Readability 4 structure, comments, variable naming,
etc,
Software Quality 4 Quality, efficiency, etc.
Total 100

Tags: , , , , , , ,