Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given the following Covidvictim, Node and LinkedList ADTS: public class Covidvictim private String victimName private String caseid private int age private String clusterName // Teratai,

image text in transcribedimage text in transcribed

Given the following Covidvictim, Node and LinkedList ADTS: public class Covidvictim private String victimName private String caseid private int age private String clusterName // Teratai, Nibong & Lestari private String positiveDate // DDMMYYYY e.g 08112020 /* All the accessor methods */ public void displayVictim(); } class Node Covidvictim element; Node next public Node (Covidvictim element) {...} class Linkedlist! private Node first, last, current; public LinkedList() {...} public CovidVictim getNext() {...} public Covidvictim getFirst() {...} public Covidvictim getLast() {...) public Covidvictim removeFromBack() [...] public CovidVictim insertAt Front() {...} 1 Assumed all data have stored in a Linkedlist data structure named victimlL . Write a program segment to perform the followings: a) Find and display the detail of victims and the number of victims which were diagnosed positive covid for the fourth quarter of year 2020. (5 marks) b) Move all covid victims' which aged more than 50 years old from victimll into riskvictimel, while the others remain in victimll. (5 marks) c) Calculate and display the number of victims for each cluster from riskvictimll. The output should be displayed based on the format shown below: TOTAL VICTIMS FOR EACH CLUSTER Cluster No. of Victims XXXXX XXX (5 marks) Given the following Covidvictim, Node and LinkedList ADTS: public class Covidvictim private String victimName private String caseid private int age private String clusterName // Teratai, Nibong & Lestari private String positiveDate // DDMMYYYY e.g 08112020 /* All the accessor methods */ public void displayVictim(); } class Node Covidvictim element; Node next public Node (Covidvictim element) {...} class Linkedlist! private Node first, last, current; public LinkedList() {...} public CovidVictim getNext() {...} public Covidvictim getFirst() {...} public Covidvictim getLast() {...) public Covidvictim removeFromBack() [...] public CovidVictim insertAt Front() {...} 1 Assumed all data have stored in a Linkedlist data structure named victimlL . Write a program segment to perform the followings: a) Find and display the detail of victims and the number of victims which were diagnosed positive covid for the fourth quarter of year 2020. (5 marks) b) Move all covid victims' which aged more than 50 years old from victimll into riskvictimel, while the others remain in victimll. (5 marks) c) Calculate and display the number of victims for each cluster from riskvictimll. The output should be displayed based on the format shown below: TOTAL VICTIMS FOR EACH CLUSTER Cluster No. of Victims XXXXX XXX

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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

How is organizational justice a refinement of expectancy theory?

Answered: 1 week ago

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago