WeChat:lovexc60
COMP90059 Introduction to Programming
Semester 2, 2019
School of Computing and Information Systems
The University of Melbourne
Assignment 2
Due date: Sunday 20th October 2019, 11.30pm
This assignment is worth 20 marks, and will count as 20% of your final mark in this subject. The
assignment specification is on the COMP90059 GROK environment, under the heading ‘Assignment 2’
(https://groklearning.com/learn/unimelb-comp900598-2019-s2/ass2/0/).
There are FIVE (5) questions in this assignment. The fifth question will require you to call the functions
you wrote in the first four questions, but we will provide sample versions so that you can complete the fifth
question even if you don’t complete all the others.
This is an individual project. While you may discuss the problems with your classmates, you must not
show written solutions to another student or use written solutions from another student.
You are reminded that your submission for this project is to be your own individual work. For most people,
collaboration will form a natural part of the undertaking of this project. However, it is still an individual task,
and so reuse of code or excessive influence in algorithm choice and development will be considered misconduct. We will check submissions for originality and will invoke the University’s Academic Misconduct
policy (http://academichonesty.unimelb.edu.au/policy.html) where inappropriate collusion or
plagiarism appear to have taken place. Your code will be passed through our plagiarism software.
Late submissions: A 10% penalty will be applied for each ‘late’ day and no late submissions will be
accepted after 5 days from deadline. If you submit after the deadline, your submission will be treated as
late and will be penalised.
Marking rubric: A sample marking rubric is uploaded on the LMS for your information.
Note: Three types of automated test cases will be run against your submission on GROK: (i) example
test cases from the examples given to you in the specification – you will see a tick mark if you pass them;
(ii) hidden test cases—you won’t see the test cases but you will receive a tick if your code has passed each
of them; and (iii) assessment test cases, which you will not see, but the markers will see and use to assess
your project. Be careful! GROK will allow you to submit code that does not pass tests.
Read the specification carefully and follow the instructions for each question.
Only assessment test cases will be used to calculate your mark, as outlined in the marking rubric. Make
sure to use a good programming style that includes relevant comments and formatting of the code. Five (5)
marks out of the 20 will be allocated to style, formatting and approach to solving the questions.
Good Luck!
Dr Antonette Mendoza, semester 2 2019
1
Background
Things to look out for in solving the questions are:
• don’t be afraid to create extra variables, e.g. to break up the code into conceptual sub-parts, improve
readability, or avoid redundancy in your code
• we also encourage you to write helper functions to simplify your code – you can write as many
functions as you like, as long as one of them is the function you are asked to write
• commenting of code is one thing that you will be marked on; get some practice writing comments in
your code, focusing on:
1. describing key variables when they are first defined, but not things like index variables in for
loops; and
2. describing what ‘chunks’ of code do, i.e. not every line, but chunks of code that perform a
particular operation, such as
#find the maximum value in the list
or
#count the number of vowels.
• be aware of tradeoffs with extra variables, functions, and comments – whilst we encourage these, if
we can’t see the important parts of your code easily, it is a style issue and may be penalized.
• start early and seek help from Grok Tutor messaging if you have trouble understanding what the
question asks you to do, or if your output does not match expectations.
Health expenditure in Australia
Health expenditure occurs where money is spent on health goods and services. It occurs at different levels
of government, as well as by non-government entities such as private health insurers and individuals.
In many cases, funds pass through a number of different entities before they are ultimately spent by
providers (such as hospitals, general practices and pharmacies) on health goods and services.
The term ‘health expenditure’ in this context relates to all funds given to, or for, providers of health goods
and services. It includes the funds provided by the Australian Government to the state and territory governments, as well as the funds provided by the state and territory governments to providers.
Congratulations! You have been appointed by the Australian Institute of Health and Welfare (AIHW) as a
programmer-analyst to make sense of the large volumes of data they collected between 1997 – 2012 and
conduct some data analysis to understand Australia’s health expenditure. As part of your new job, your
manager has asked you to write four (4) functions that perform specific tasks, plus a ‘main’ function that