Highlights
Introduction
This assignment aims to give you practice in using the constructs and techniques covered in the functional programming lectures and practicals by developing a complete Haskell program. This work will be marked out of 50 and carries 40% of the module’s marks. You need to submit your program via the module’s Moodle site by the deadline of 11pm, Friday 1st May 2020. If you submit your work late, your mark for this assignment will be capped according to University rules. Feedback and the mark for this assignment will be returned to you via email.
Your task
Your task is to write a program in Haskell for querying and updating recent daily rainfall data for several places in the UK. Each place has a name, a location expressed in degrees north and degrees east (almost all degrees east figures are negative since most places are in the western hemisphere), and a list of 7 daily rainfall figures for the last week (where the first value is for yesterday and the final value is for one week ago). Core functionality [28 marks]
The program should include pure functional (i.e. non-I/O) code that performs the following items of functionality:
i. return a list of the names of all the places
ii. return the average rainfall (as a float) for a place given its name
iii. return all place names and their 7-day rainfall figures as a single string which, when output using putStr, will display the data formatted neatly into eight columns
iv. return a list of the names of places that were totally dry (i.e. had zero rainfall) a given number of days ago (1 meaning yesterday, 7 meaning a week ago)
v. update the data given a list of most recent rainfall figures (one value for each place), removing the oldest rainfall figure for each place
vi. replace a given existing place with a new place (the new place will have a name, a location and a list of 7 rainfall figures)
vii. given a location return the closest place that was totally dry yesterday (assume the world is flat – use the standard Pythagoras theorem to calculate the distance between locations)
Each item is worth 4 marks. You should begin by developing purely functional code to cover this core functionality, and then add to this the functions/actions that will output a rainfall map and comprise the program’s user interface (see below).
I recommend that you attempt the above items in order – the first few should be easier than those at the end. If you can’t complete all seven items of functionality, try to ensure that those parts that you have attempted are correct and as well-written as possible.
This U21274: IT Assignment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.