Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

as soon as possible Given the following CovidVictim, Node and LinkedList ADTS: public class Covidvictim private String victimName private String caseid private int age private

as soon as possible

image text in transcribed

image 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 1/ Teratai, Nibong & Lestari private String positiveDate // DDMMYYYY e.g 08112020 /* All the accessor methods */ public void displayVictim(); class Nodel 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 insertAtFront() {...} 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) victimLL into Move all covid victims' which aged more than 50 years old from riskvictimLL, 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 XXXXX No. of Victims 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 1/ Teratai, Nibong & Lestari private String positiveDate // DDMMYYYY e.g 08112020 /* All the accessor methods */ public void displayVictim(); class Nodel 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 insertAtFront() {...} 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) victimLL into Move all covid victims' which aged more than 50 years old from riskvictimLL, 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 XXXXX No. of Victims 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

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions