Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create two global structures named Details and patient. The first structure named Details contains the members: dateAdmit (use string), 111nesstype, statun (eg, high risk, medium

image text in transcribed

Create two global structures named Details and patient. The first structure named Details contains the members: dateAdmit (use string), 111nesstype, statun (eg, high risk, medium risk, normal) while the structure Patient contains the members: ID, name, wardno and the structure Details (nested struct). Write a program that does the following: a. Declare an array of structure of size 4 that can store the information of 4 patients b. A function that passes the structure as an argument and accepts information about the patient through user Input A function that sorts the information about the patient in descending order based on name. d. A function that writes the information about the patient into a text file (.txt). Sample output: Enter ID of patient: 123456 Enter name of patient: Muhd. Alift Rusydi Enter ward no of patient: 25A Enter date of admission: 060122 Enter type of illness: Stroke Enter status: High risk Enter ID of patient: 345678 Enter name of patient: Siti Roslinda Saad Enter ward no of patient : 448 Enter date of a dimission: 311221 Enter type of Illness: Covid-19 Enter status: Medium risk Enter ID of patient: 411290 Enter name of patient: Abu Khuzair Ali Enter ward no of patient: 210 Enter date of admission: 030122 Enter type of illness: Diabetes Enter status: Medium risk Enter ID of patient: 561035 Enter name of patient: Fateema Al-Walid Enter ward no of patient: 533 Enter date of admission: 261221 Enter type of illness: Athma Enter status: Normal ID Patient Name Ward No Date Adimit 345678 Siti Roslinda Saad 44B 311221 123456 Muhd. Aliff Rusydi 25A 060122 561035 Fateema Al-Walid 53B 261221 411290 Abu Khuzair Ali 210 030122 Status Illness Covid-19 Stroke Athma Diabetes Medium risk High risk Normal Medium risk

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 Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago