write the UMLclass diagram #include #include using namespace std; const int maxrow = 10; string ChickenriceQuantity[maxrow] = {}; string ChickenriceType[maxrow] = {}; string search(); class Chickenrice {       public:        string ChickenriceQuantity[maxrow];        string ChickenriceType[maxrow];        void DisplayMenu();        void AddRecord();        void DeleteRecord(string search);        void ShowRecord(string search);        void DisplayAllRecord();        }; int main() {    std::cout<<"MENU\n";    int option;    system("CLS");    Chickenrice rice;    do{               cout<<"1-Display menu"<        cout<<"2-Add details"<        cout<<"3-Delete details"<        cout<<"4-View all list of chicken rice"<        cout<<"5-View selected chicken rice record"<        cout<<"6-EXIT"<    cout<<"Select OPTION"<    cin>>option;       switch(option)    {        case 1:            {            rice.DisplayMenu();            getchar();            getchar();            break;       }           case 2: rice.AddRecord();            system("CLS");            break;                   case 3: rice.DisplayMenu();            break;                   case 4: rice.DisplayAllRecord();            break;                   case 5:            cin.ignore();            cout<<"Enter the search chicken rice type"<            getline(cin,ChickenriceType);            cout<            ShowRecord(ChickenriceType);            break; }    }while(option != 6); } void Chickenrice::DisplayMenu() {    cout<<"The type of chicken rice "<    cout<<"a.Salad chicken rice"<    cout<<"b.Steam chicken rice"<    cout<<"c.Fried chicken rice"<    cout<<"d.Roasted chicken rice "<    cout<<"e.Special chicken rice\n"< } void Chickenrice::AddRecord() {       char Quantity[5];    char Type[10];       cin.ignore();    cout<<"Enter ";    rice.DisplayMenu();    cout<<"\n";    cin.getline(Type,10);    cout<<"Enter quantity :";    cin.getline(Quantity,5);           for(int x =0;x    {        if(ChickenriceType[x] == "\0")        {            ChickenriceType[x] = Type;            ChickenriceQuantity[x] = Quantity;            break;        }       } } void Chickenrice::DeleteRecord() {    int counter =0;    for (int x=0; x    {        if (ChickenriceType[x] == search)        {            counter++;            ChickenriceType[x] = "";            ChickenriceQuantity[x] = "";                          cout<<"The item is delete sucessfully !!!\n"<        break;        }    }    if (counter == 0)    {        cout<<"The item's ID does not exist !!!";    } } void Chickenrice::ShowRecord(string search) {          int counter =0;    cout<<"Record of chicken rice:"<    cout<<"-----------------------------------------"<    cout<<"No. |Chicken Rice Type | Quantity\n";    for(int x=0; x < maxrow; x++)    {        if (ChickenriceType[x] == search)        {                       counter++;            cout<<""<        }        }    if(counter ==0)    {        cout<<"No record found !!!\n\n";    }        } void Chickenrice::DisplayAllRecord() {    system("CLS");    cout<<"All current record of Chicken rice"<    cout<<"------------------------------------------------------------------\n";       int counter = 0;    cout<<"No. | Type | Quantity\n";    for(int x=0; x < maxrow; x++)    {        if (ChickenriceType[x] != "\0")        {            counter++;            cout<<""<        }           }    if(counter == 0)    {        cout<<"No record found!!!"<    }               cout<<"----------------------------------------------------------\n";                }

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

write the UMLclass diagram

#include<iostream>
#include<string>

using namespace std;

const int maxrow = 10;

string ChickenriceQuantity[maxrow] = {};
string ChickenriceType[maxrow] = {};
string search();

class Chickenrice
{
  
   public:
       string ChickenriceQuantity[maxrow];
       string ChickenriceType[maxrow];
       void DisplayMenu();
       void AddRecord();
       void DeleteRecord(string search);
       void ShowRecord(string search);
       void DisplayAllRecord();
      
};


int main()
{
   std::cout<<"MENU\n";
   int option;
   system("CLS");
   Chickenrice rice;
   do{
      
       cout<<"1-Display menu"<        cout<<"2-Add details"<        cout<<"3-Delete details"<        cout<<"4-View all list of chicken rice"<        cout<<"5-View selected chicken rice record"<        cout<<"6-EXIT"<    cout<<"Select OPTION"<    cin>>option;
  
   switch(option)
   {
       case 1:
           {
           rice.DisplayMenu();
           getchar();
           getchar();
           break;
      }
  
       case 2: rice.AddRecord();
           system("CLS");
           break;
          
       case 3: rice.DisplayMenu();
           break;
          
       case 4: rice.DisplayAllRecord();
           break;
          
       case 5:
           cin.ignore();
           cout<<"Enter the search chicken rice type"<            getline(cin,ChickenriceType);
           cout<            ShowRecord(ChickenriceType);
           break;
}
   }while(option != 6);

}

void Chickenrice::DisplayMenu()
{
   cout<<"The type of chicken rice "<    cout<<"a.Salad chicken rice"<    cout<<"b.Steam chicken rice"<    cout<<"c.Fried chicken rice"<    cout<<"d.Roasted chicken rice "<    cout<<"e.Special chicken rice\n"< }

void Chickenrice::AddRecord()
{
  
   char Quantity[5];
   char Type[10];
  
   cin.ignore();
   cout<<"Enter ";
   rice.DisplayMenu();
   cout<<"\n";
   cin.getline(Type,10);
   cout<<"Enter quantity :";
   cin.getline(Quantity,5);
      
   for(int x =0;x    {
       if(ChickenriceType[x] == "\0")
       {
           ChickenriceType[x] = Type;
           ChickenriceQuantity[x] = Quantity;
           break;
       }
  
   }
}

void Chickenrice::DeleteRecord()
{
   int counter =0;
   for (int x=0; x    {
       if (ChickenriceType[x] == search)
       {
           counter++;
           ChickenriceType[x] = "";
           ChickenriceQuantity[x] = "";
          
      
       cout<<"The item is delete sucessfully !!!\n"<        break;
       }
   }
   if (counter == 0)
   {
       cout<<"The item's ID does not exist !!!";
   }
}

void Chickenrice::ShowRecord(string search)

{      
   int counter =0;
   cout<<"Record of chicken rice:"<    cout<<"-----------------------------------------"<    cout<<"No. |Chicken Rice Type | Quantity\n";
   for(int x=0; x < maxrow; x++)
   {
       if (ChickenriceType[x] == search)
       {
          
           counter++;
           cout<<""<        }
      
}
   if(counter ==0)
   {
       cout<<"No record found !!!\n\n";
   }

      
}

void Chickenrice::DisplayAllRecord()
{
   system("CLS");
   cout<<"All current record of Chicken rice"<    cout<<"------------------------------------------------------------------\n";
  
   int counter = 0;
   cout<<"No. | Type | Quantity\n";
   for(int x=0; x < maxrow; x++)
   {
       if (ChickenriceType[x] != "\0")
       {
           counter++;
           cout<<""<        }
      
   }
   if(counter == 0)
   {
       cout<<"No record found!!!"<    }
      
       cout<<"----------------------------------------------------------\n";

              
}



  

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY