Amir J.
asked 08/21/20Data structures
Instruction: Answer all questions in computer based form (C++ software and Microsoft Word).
Coronavirus disease 2019 (COVID-19) caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) is currently raising and had been declared as a new worldwide pandemic. The first case of COVID-19 in Malaysia was detected in January 2020 and the spread of this virus is had caused many infections and deaths. Thus, public awareness is crucial especially in info dissemination.
In order, to create public awareness, a COVID-19 catalog needs to be developed due to expose special terms used in this disease to the public. This catalog consists of unfamiliar terms list that needs to be understood by everyone when dealing with this disease. As a programmer in a well-known company, you have been assigned to build the COVID-19 catalog. It is hoped that the developed catalog can increase public knowledge and awareness towards COVID-19 pandemic easily.
Table 1 display an example of COVID-19’s catalog comprises of the following methods/functions are needed:
a) menu() –Provide interface for user selection option b)push() – Add a new word
C)sort()–Sort the words alphabetically
D)search() –Search a word in the catalog
E)show() – Display the list of words in the catalog
F)delcat() – Delete a word from the catalog
Based on
methods/functions above. For mapping purposes, only a table with table size 7 is allowed. The first letter in the word will be chosen when finding the location.
Declaration Node:
#define tablesize 7;
//declaration of node
struct Node{
string word;
Node *next;
};
Node *Covid[tablesize];
Table 1: COVID 19 Crisis Catalog
No. Glosary
1 world health organization
2 Self-quarantine
3 Clinical trial
4 Intensive care unit
5 Coronavirus
6 COVID-19
7 Epidemic
8 Hydroxychloroquine
9 Intensivist
10 Lockdown
11 Pandemic
12 Physical distancing
13 Respirator
14 SARS-CoV2
15 Screening
16 Thermometer
17 Vaccine
18 Epidemiology
19 Ventilator
20 Spanish flu
21 Symptomatic
22 Fever
23 Mask
24 Cough
25 Breath
26 Stay at home
27 Frontliner
29 Work From Home
30 Community
1 Expert Answer

Patrick B. answered 08/22/20
Math and computer tutor/teacher
The design of this program needs to be further explained and discussed...
(1) Does the word list need to be written to (and read from) data file so that
it stays permanent? otherwise you must re-create the list of 7 terminologies
every time the program is run
(2) There are terminologies that contain more than one word...
EX. World Health Organization
Social Distancing
Stay at home
So then you need to use fgets instead of scanf; However, this puts the newline
in the input buffer which then must get cleared out. Also string trimming is recommeneded
(3) Is the array declared INSIDE or Outside of the main(); If outside, then it is global, and that
affects the routines that process the array;
(4) Is there a particular sorting algorithm required. We can use quicksort qsort() in stdlib.h, and
therefore need a compare callback function.
Since there are only 7 terminologies in the list, we can display the list every time and keep it
sorted (using insertion sort) every time a new terminology is added to the list;
the options for inserting a new terminology can appear only if the number of terminoligies
in the array is less than 7; Likewise the option for deleting a terminology can appear only if
there are 1 or more terminologies in the list...
How are these terminologies deleted from the list? is it required to input the entire terminology or select the terminology by number

Patrick B.
I have uploaded some source code for you... it has title C++ data structures and is found in the RESOURCES section under this link... There is a problem with the terminologies with multiple words... the qsort routine has problems with it... terminologies with multiple tokens should be separated with and UNDERSCORE... example: word_health_organization It would be SO MUCH easier if we could just keep an array of strings; I did my best with what has been described... GOOD LUCK!08/22/20
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Amir J.
Help me08/21/20