Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Westlake Hospital is a research hospital doing cutting - edge research on new drugs. They are currently planning a study for a new study -

Westlake Hospital is a research hospital doing cutting-edge research on new drugs. They are currently planning a study for a new study-enhancing drug called StudyMor. They need your help writing an application that will collect the study data for StudyMor and store it in a set of files. They are expecting files named participant.dat and survey.dat. Eventually, they want to be able to look at statistics about the frequency of certain side effects and the drugs overall effectiveness.
You will write a menu-based program with 4 options.
Add new participant
Collect survey for participant
Display participants
Quit
For the first option, you will collect information for a participant. They study people who want to know the persons first name, last name, age, and gender. Participants should be assigned an id value (not a random number). Then if the id value is even then the participant will receive StudyMor, if the id value is odd they will receive a placebo. Whether or not they receive StudyMor should be recorded in the data file.
For the second option, the user gets to choose a participant from the list of participants and enter survey data for them. Each week they will distribute either StudyMor or the placebo to the participant. They will ask the user will then ask the participant the following questions and record the answers.
Did you have any headaches using StudyMor?
Did you have any constipation using StudyMor?
Did you experience any difficulty sleeping while using StudyMor?
List any other potential side effects, you experienced using StudyMor.
Did you feel like you could study more using StudyMor?
To make things a little easier to manage you should keep the survey data in a separate file from the participant list. Each survey data entry should start with the date the survey information was collected and the participant id so we can properly match the survey data to the participant.
The third option will list out all of the study participant information without their survey answers.
Make sure that when you are opening and writing to your two output files, you aren't losing data. You might want to look at this article about appending to text files in C++Links to an external site.. If you just open the file, the default behavior is to erase the contents.
In addition to the header documentation provided above, make sure to provide documentation in your code in the form of inline comments.

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

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

Students also viewed these Databases questions

Question

2. What do you believe is at the root of the problem?

Answered: 1 week ago