Answered step by step
Verified Expert Solution
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:
Create a struct which can store medical device information in terms of:
a Device Name eg ECG machine, spirometer, Incubator, HeartLung Machine, etc
b Brand
c Model
d Serial No
e Purchase Price
f Purchase Date
g Warranty Period in the unit of months
Create an array of structs with maximum size of
The program will ask the hospital administrator to key in the total number of the medical device that need to be registered.
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
After the keyin 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.
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:
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 fflushstdin and gets to solve this issue.
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 submitupload few files to the elearning:
pdf: Flowchart of your program solutions.
c: Source code of your program or OneCompiler link.
pngjpg: Snapshot of your execution output only applicable to Codeblock
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started