Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java coding Assignment: Pandemic World Report In this Assignment we will be implementing a Coronavirus Pandemic Dashboard using the COVID-19 world dataset (see https://www.worldometers.info/coronavirus/#news). The

Java coding

image text in transcribedimage text in transcribed
Assignment: Pandemic World Report In this Assignment we will be implementing a Coronavirus Pandemic Dashboard using the COVID-19 world dataset (see https://www.worldometers.info/coronavirus/#news). The purpose of this assignment is to perform the following set of actions: 1. Report (Display) Covid Cases by Countries. 2. Report (Display) Covid Cases by Total Deaths (decreasing order). 3. Report (Display) Covid Cases by Total Cases (decreasing order). 4. Report Countries with minimum and maximum number of Total Deaths. 5. Report Countries with minimum and maximum number of Total Cases. 6. Search for a Country and report their Mortality Rate (death-to-case %). death-to-case ratio the number of deaths attributed to a particular disease, injury, or other health condition during a specified period, divided by the number of cases of that disease, injury, or condition identified during the same period 7. Report (Display) top 10 countries by their Mortality Rate (decreasing order). Dataset: You have been given a complete COVID-19 dataset maintained by Our World in Data (Ref: https://ourworldindata.org/coronavirus-source-data). This data is updated daily and includes data on confirmed cases, deaths and testing. . Data on total & new confirmed cases and deaths: full_data.csv Note: At this point you should know how to read from a CSV file (See lab on Sets & Maps). Assignment Details: We need to start by defining our CovidCase object class based on the design principles of OOP. A class diagram with required fields is shown below. At this point you should be able to design the rest of the class (that includes any additional fields, constructor(s), and methods. Your object needs to be comparable based on the lexicographical (alphabetical) order of the country names. CovidCase country: String totalCases: long totalDeaths: long deathToCaseRatio: double 7/ Your constructor compareTo (CovidCases) :int // Your methods Next, implement a class called PandemicDashboard (this is our tester file) to read from the dataset and report results as mentioned in the assignment description above. Your class should implement the following methods: Method: To read data from the file and create an instance of CovidCase and add to a List Parameter: String fileName Return: List caseList* / public static List CovidCase> fillCovidCaseList (String fileName) Hint: Total cases & deaths are accumulated by date. Date: 2020-11-19 row will have the total case and death count. Note: Do not store data related to location = "World" / * Method: To display the Covid Cases in sorted order based on either - Total Cases, Total Deaths & Mortality Ratio. Display Country, Total Cases & Total Deaths Parameter: List caseList (you are passing a sorted list) Return: void * / public static void displayCovidCases (List CovidCase> caseList) Hint: Use System. out . format () to format your output in columns Note: You are passing a sorted list to the above method based on the dashboard actions. Method: To display the dashboard options to the user. Parameter: None Return: None * / public static displayDashboard( ) Here is a sample output of the what your dashboard should look like: Select 1 . Report (Display y Total Deaths (decreasing order). 1 Cases decreasing order). ber of Total Cases. Mortality Rate (death-to-case ) Displ y their Mortality Rate (decreasing order) Note: Your main ( ) method should keep displaying dashboard actions till the user decides to quit the program. These are minimum required methods in your PandemicDashboard class. You can add additional methods as you deem them necessary. Action items 1,2,3 and 7 require that you use Sorting (Natural vs. Comparator) and Action 6 requires BinarySearch (make sure to display the mortality rate in %)- Hint: Action 4 and 5, use sorted list to retrieve Covid Cases with minimum & maximum cases & deaths. Note that more than 1 country can have same minimum and maximum values and you need to display them all. You can implement Comparator class in the same file as PandemicDashboard or write separate class files. For your reference, the sample output for each of these actions is provided in a file called SampleOutput.pdf

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

\f

Answered: 1 week ago