那位大虾帮帮我啊,这题无敌难啊!!给100分!!!做出来的e-mail我啊!!!
题目大概意思是要用c语言做一个基于数据库的决策系统,要求计算机根据人们回答问题的不同答案(只有yes or no)给出不同的决策或者下一道问题,我甚至连算法的思想也没有一个完整的概念,
原题如下:
Assignment
You are to write a C program to implement a simple Decision Support System.(DSS) for use in a small suburban medical clinic. This very simple system will learn as it goes. That is, it will start off very simply, and more data, in the form of questions and answers that get fed into it, the bigger it will grow.
The system stores data in the form of Questions and Actions. All Questions have simple Boolean answers, either “Yes” or “No”.
A Question is presented to the user and they will either answer Yes or No. The answer will lead the DSS to display another Question (depending on the result of the last answer), and again the user will be asked for a Yes or No answer. Finally when all Question along a particular path have been answered, then a possible Action is displayed on the screen (again depending on the last answer).
At this point the medical person will have the option of entering a new Question and Action into the DSS if the Action displayed is not the correct one, in this way, over time the DSS will “learn”.
For example, a sample run might be … (computer generated information is in italics, human is bolded)
Good morning
Go you have physical damage to your body: No
Actionà Please take 2 aspirin and get some rest.
(Practitioner) is this Action correct?: No.
Please enter another question whose action will be the one displayed above if a No answer is returned
Do you have a temperature
(Practitioner) Now enter a new action to be taken if the answer to the new questions is Yes
Take 2 panadol every 4 hours, and use cold compress for temperature
Do you wish to run this DSS again: Yes
----------------------------------------------------------------------------------------------------------------------
Do you have physical damage to your body : NO
Do you have a temperature : Yes
Action -- > Take 2 panadol every 4 hours, and use cold compress for temperature.
(Practitioner) is this Action correct? Yes
Do you wish to run this DSS again: No
…. Good bye!
By following the logic above you should be able to see how the data bank of Questions and Actions will grow over time. A comprehensive realistic DSS would obviously be far more extensive and allow for multi-way decisions, not just the two-way decisions in this assignment. However the principle is similar.
When finished, your program should write the updated Data Bank (Questions and Actions) to a file. When the program starts it should first read the Data Bank from the file and build the appropriate Data Structures. In this way the program “remembers” its Data Bank from one call to the next.
You can decide on the appropriate Data Structure you will use, obviously the wrong choice will make your program more complex than it has to be. Your Actions do not have to be simple text elements like the ones in the sample above, they could have a number of components, like
Initial instructions
Follow-up instructions
Alternative treatments
Treatment duration ect….
Your program will initially have no Data Bank, so a default initial Data Bank will consist of the following single Question and two Actions
Question: Do you have physical damage to your body
No Action: Please take 2 aspirin and get some rest.
Yes Action: Please place a bandage on the affected area.

