______________________________________________________
FACULTY OF SCIENCE AND TECHNOLOG
COURSEWORK FOR THE
BSC (HONS) INFORMATION TECHNOLOGY; BSC (HONS) COMPUTER SCIENCE; YEAR 2
ACADEMIC SESSION 2023; SEMESTER 3 PRG2214: Functional Programming Principles Assignment 2
STUDENT NAME 1: __________________________________________________________
STUDENT NAME 2: ______________________________________________________
INSTRUCTIONS TO CANDIDATES
Answer ALL questions in pairs or alone.
This assignment will contribute 30% to your final grade. All answers must be written in this one note page IMPORTANT NOTES TO CANDIDATES
Student must remember to click on Turn In button in Microsoft Team
Assessing SLO: Use polymorphism and higher-order functions and demonstrate problem solving skill in Functional approach(C3, PLO2)
[This paper contains One questions printed on Three pages]
浙大学霸代写 加微信 cstutorcs
Question 1 (30 marks)
You are given the following dataset from https://github.com/MoH- Malaysia/covid19-public. Please refer to the attached deaths_state.csv.
Please write a Haskell program to answer the following questions:
1. Which states in Malaysia has the highest deaths due to Covid ?
2. What is the average death per day for Malaysia in the provided data ? 3. Which of the five states are the lowest death in the provided data ?
The Program should display the answer for all the three questions above. The description of data is shown in the following:
1. 2. 3. 4.
From
date: yyyy-mm-dd format; data correct as of 1200hrs on that date
state: name of state (present in state file, but not country file)
deaths_new: deaths due to COVID-19 based on date reported to public
deaths_bid: deaths due to COVID-19 which were brought-in dead based
on date reported to public (perfect subset of deaths_new)
deaths_new_dod: deaths due to COVID-19 based on date of death
deaths_bid_dod: deaths due to COVID-19 which were brought-in dead based
on date of death (perfect subset of deaths_new_dod)
deaths_pvax: number of partially-vaccinated individuals who died due to
COVID-19 based on date of death (perfect subset of deaths_new_dod),
where “partially vaccinated” is defined as receiving at least 1 dose of a 2-
dose vaccine at least 1 day prior to testing positive, or receiving the
Cansino vaccine between 1-27 days before testing positive.
deaths_fvax: number of fully-vaccinated who died due to COVID-19 based
on date of death (perfect subset of deaths_new_dod), where “fully
vaccinated” is defined as receiving the 2nd dose of a 2-dose vaccine at
least 14 days prior to testing positive, or receiving the Cansino vaccine at
least 28 days before testing positive.
deaths_tat: median days between date of death and date of report for all
deaths reported on the day
Code Help, Add WeChat: cstutorcs
MARGINAL (D)
D 14% of 30% D- 12% of 30%
Evidence shows a minimal
acceptable understanding of Function concept in Haskell.
ADEQUATE ( C )
C 17 % of 30% C- 15 % of 30%
There is evidence of adequate
Proper use of function in Haskell language and the ability to use them to solve problem with some error. Such as :
Function Encapsulation
B + 20% of 30% B- 18% of 30%
Illustrates a good mastery of the Haskell Function API.
Able to demonstrate correct
use of Haskell Function API, and evidence of proper use High order function.
Use polymorphism in the Haskell code where appropriate.
EXCELLENT(A)
A+ 30% of 30% A 25% of 30% A- 21% of 30%
As in good but provides further
depth through either:
Able to demonstrate ability to compose function to solve problem using Haskell functions with concise and accurate manner.
Demonstrated concise, efficient, reusable and modular code.
程序代写 CS代考 加QQ: 749389476