Tutorial 8
- Due Mar 31, 2022 by 11:59pm
- Points 10
- Submitting a file upload
- Available until Apr 20, 2022 at 11:59pm
Do as Directed:
Q - 1 : Summarized Expert System.
Q - 2 : List out popular examples of the Expert System.
Q - 3 : List out symptoms of corona and omicron in table form.
Q - 4 : Create Expert System that detect Simple Fever, Cold, Corona and Omicron based on given symptoms.
Take reference of following code that can detect Simple Fever and Cold based on symptoms.
#include <iostream>
using namespace std;
void simpleflu(char,char,char);
void cold(char,char,char,char,char,char);
int main()
{
char name[50];
char a,b,c,d,e,f,g,h,i,j,k;
cout << "Please enter your name.. " << endl;
cin>> name;
cout << "Do you have fever? (y/n)"<< endl;
cin>>a;
cout << "Do you have headache? (y/n)"<< endl;
cin>>b;
cout << "Do you have running nose? (y/n)"<< endl;
cin>>c;
cout << "Do you have cough? (y/n)"<< endl;
cin>>d;
cout << "Do you have ache? (y/n)"<< endl;
cin>>e;
cout << "Do you have chills? (y/n)"<< endl;
cin>>f;
cout << "Do you have snezzing? (y/n)"<< endl;
cin>>g;
cout << "Do you have sore throat? (y/n)"<< endl;
cin>>h;
cold(b,c,d,e,g,h);
simpleflu(a,b,e);
return 0;
}
void cold(char b,char c,char d,char e,char g,char h)
{
if(b =='y' && c =='y' && d =='y' && e =='y' && g ==
'y' && h == 'y')
cout<< "You may have Cold."<< endl;
else
cout<< "";
}
void simpleflu(char a,char b,char e)
{
if(a =='y' && b =='y' && e =='y')
cout<< "You may have flu."<< endl;
else
cout<< "";
}