Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As a software programmer in a hospital XYZ , you are requested to create a program to keep track of the medical device record in

As a software programmer in a hospital XYZ, you are requested to create a program to keep track of the medical device record in the hospital. Your program should fulfil the specification as stated below:
1. Create a struct which can store medical device information in terms of:
a. Device Name (e.g. ECG machine, spirometer, Incubator, Heart-Lung Machine, etc)
b. Brand
c. Model
d. Serial No
e. Purchase Price
f. Purchase Date
g. Warranty Period in the unit of months
2. Create an array of structs with maximum size of 100.
3. The program will ask the hospital administrator to key in the total number of the medical device that need to be registered.
4. Based on the total number, create a loop to let the user key in the medical device detail one by one according to the information listed in (1).
5. After the key-in process, the system will automatically display all the medical device detail in sequence one by one and write the output to a file as store report.
6. Optional Challenging Task for Bonus Mark:
Calculate and display the expected Warranty Expiry Date.
Calculate and display the remaining warranty period from the current date in the unit of days.
Hints:
1. You may find out that the scanf() cannot handle any string with white space or the program functionality will go haywire. Try to make use of fflush(stdin) and gets() to solve this issue.
2. Explore the functions in to help you solve the Challenging Task for date calculation.
Snapshot in the next page shows the program execution output example for your reference, you are free to design your own more interactive user interface or additional function
For assignment submission, you need to complete the following tasks and submit/upload few files to the e-learning:
.pdf: Flowchart of your program solutions.
.c: Source code of your program or OneCompiler link.
.png/.jpg/: Snapshot of your execution output (only applicable to Codeblock).

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

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions