Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Assignment

Overview

This assignment is to be implemented using procedural programming. The overall program should process patients through a medical centre. This is not supposed to be a sensible simulation of such a centre, and does not comply with typical operating practices for such centres.

General code notes
These are some general rules about what you should and shouldn't do.

1. Your assignment should be organised into:
(a) A driver file containing your main() function.
(b) A header file containing the prototypes for the functions you write.
(c) An implementation file containing the implementations of your functions.

2. Your code must compile on Banshee with the compilation instructions you provide in Readme.txt.

3. You are not allowed to use classes.

4. You can use structs, but without member functions.

5. You should include some exception handling in the case of data file unavailability.

6. Be consistent in your tabbing style.

7. Include sensible volumes of commenting.

8. Use appropriate variable names.

9. Don't leak memory.

10. The main() function should make it clear what is going in, and shouldn't be too large.

Run structure

If your program were to be compiled into the executable MedCent, it must run as follows:
$ ./MedCent Patients Output-file
The Medical Centre runs on a strict quota system, and closes after seeing the number of Patients specified as the command argument, or when there are no Patients left to see.
There is otherwise no sense of time in this program, so it's possible every patient could see the same doctor.
Errors should be reported to standard error. Runtime progress should be reported to standard out. A summary of what happens to each patient should be passed to whatever file is specified on the command line as the Output-file.
When you load the data files, you should output the content in a sensible format to make it clear that your input processing works.
- You should deal with the patients on a one by one basis.
- Each patient will need to see a randomly chosen doctor of the same gender. If at any time there is no available doctor of the same gender, the patient leaves with their ailment unresolved.
- The doctors will attempt to diagnose the correct ailment, with the percentage change of doing so be- ing some sensible function of the doctor's quality, the ailment degree, and the ailment determination complexity. You should specify this function in your Readme.txt file.
- If the doctor fails to identify the correct ailment, the doctor will guess at the ailment, equally likely to specify any ailment including the correct one.
- If a doctor determines that the patient has a particular ailment they will apply the treatment associated with that ailment.
- The chance of the treatment working should be some sensible function of the doctor's quality and the ailment treatment complexity. If it's the wrong treatment, the chance of it working should be 25% of the chance when using the correct treatment. You should specify your success function in your Readme.txt file.
- Once given a treatment the patient leaves, whether the treatment is successful or not.
Sensible with respect to the functions above means that increasing or decreasing the arguments should change the chance of success in a common sense way, so a higher quality doctor, higher ailment degree and lower ailment determination complexity give better chances of success.

Inputs
Four data files will be provided. The general syntax of those files is described here, and examples are provided on Banshee in /share/cs-pub/251/Assignments/One/. Those files are in Unix format so if you copy them over to Windows and back to Unix there may be additional characters, particularly the end of line ˆM that may appear.
The four data files are as follows:

1. Patients.txt: No more than 100 entries. Title,Name,Age,Gender,Ailment,Ailment degree. Example:
Ms,Alice Anteater,25,F,3,100. Mr,Bob Badger,37,M,2,50.
Cpl,Carol Carrot,45,F,2,75.
,Dan Digger,30,M,1,20. Dr,Ernie Edwards,50,M,3,75.

The Age, Ailment and Ailment degree are all integers, with the Ailment degree a percentage in the range 1 to 100. Gender is a single character. The title and name can be anything, although while the title can be empty there must be a name. The Ailment corresponds to the Ailments listed in the Ailments.txt file.

The higher the Ailment degree the worse the case of that Ailment the patient has. The higher it is the easier it is to recognise.
2. Doctors.txt: No more than 10 entries.

Name,Gender,Quality.

Boris Barn-Owl,M,77. Ernie Edwards,M,60. Frankie Fisher,M,75. Geraldine Gardner,F,73. Henrietta Helpful,F,80.

The name cannot be empty. Gender is a single character. The quality is a percentage in the range 1 to 100.
3. Ailments.txt: No more than 20 entries.

Name,Ailment determination complexity,Ailment treatment complexity,Treatment.

Ailment determination complexity and Ailment treatment complexity are percentages in the range 1 to 100. The lower the Ailment determination complexity, the easier it is to recognise the ailment. The higher the Ailment treatment complexity. the harder it is to treat the ailment successfully.

The Treatment corresponds to the Treatments listed in the Treatments.txt file.

Dizziness,20,70,1. Headache,5,5,3.
Broken bone,5,25,2.

4. Treatments.txt: No more than 10 entries.

Bed rest. Plaster cast. Panadol.
Antibiotics. Miscelleneous Medicine.

If a given data file has an incorrectly formatted line, you should report the problem and ignore that line.

Output
Errors should be reported to standard error. Runtime progress, included the file loading output demo, should be reported to standard out.
A summary of what happens to each patient should be passed to whatever file is specified on the command line as the Output-file. This should include the doctor seen, the ailment diagnosed, and the treatment, and whether the treatment was successful.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92429298
  • Price:- $75

Guranteed 36 Hours Delivery, In Price:- $75

Have any Question?


Related Questions in Computer Engineering

How do you apply the five components of the information

How do you apply the five components of the information systems to an information systems application like "online bill pay" system offered by many banks.

Understanding the digital revolution assignment - parchment

Understanding the Digital Revolution Assignment - Parchment Purgatory Overview - For this assignment, you will use skills acquired through practical laboratory exercises to automate a business process, and to visualize t ...

Assessment - managing services and securitytask - in this

Assessment - Managing Services and Security Task - In This Assignment your job is to create two Virtual machines each running a different but the latest distribution of Linux e.g. Ubuntu Server and CentOS. Each of these ...

Question suppose a destination computer receives several

Question : Suppose a destination computer receives several packets from a source. How can it be sure that the fragments belonging to a datagram are not mixed with the fragments belonging to another datagram?

Question consider how deming and tqm would have dealt with

Question: Consider how Deming and TQM would have dealt with (or avoided) the problems at Boeing. What does a TQM initiative look like in an IT department? How would IT support Total Quality at Boeing? The response must b ...

Refer to the figure on the previous page now assumed host a

Refer to the figure on the previous page. Now assumed Host A has a file that has been broken down into 2001 packets, of size 20Kb each. How long would it take to transmit the file if each link has a capacity of 10Mbs, pr ...

Research the web for an example of a startup using a cloud

Research the Web for an example of a startup using a cloud infrastructure. What were the main reasons for choosing a cloud infrastructure? What alternatives did the startup have? Answer should be at least 1 page long dou ...

Write a c functionnbspescapechar s char tnbspthat converts

Write a C function escape(char s[], char t[]) that converts the characters newline and tab into two character sequences n and t as it copies the string t to the string s. Use the C switch statement. Also write the revers ...

Recently a government department is involved in the

Recently, a government department is involved in the development of an Online Passport Application Platform. The officers in the department are clear about the requirements of this platform. Besides, the functions of thi ...

The contracts manager at a company needs to make a large

The contracts manager at a company needs to make a large legal document available to an overseas customer. However, she has some challenges: The document contains sensitive information; it is too large to send via e-mail ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As