اذهب إلى المحتوى

Saad Ali

الأعضاء
  • المساهمات

    1
  • تاريخ الانضمام

  • تاريخ آخر زيارة

أجوبة بواسطة Saad Ali

  1. #include <iostream>
    
    using namespace std;
    
    
    class Needy_People {
      public:
      string name, Address,cause ;
      long ID;
      float monthly_allowance;
      
      Needy_People() {}
      Needy_People(const string &name, const string &Address, long id, const string &cause, const string &adress,float monthly_allowance) : name(name),ID(id), monthly_allowance(monthly_allowance),Address(Address) ,cause(cause) {}
    
    
    };
    
    
    
    class Volunteers {
    
    	public:
    
        string name, days;
    	long ID;
        Volunteers() {}
    
        Volunteers(const string &name,long id,const string &days ) : name(name), days(days),ID(id), {}
    
    };
    
    
    
    class Donors {
    
    	public:
    
    	string name;
      	long ID;
      	float donation_money;
    
        Donors() {}
    
        Donors(const string &name, long id,float donation_money) : name(name), ID(id),donation_money(donation_money) {}
    
    };
    
    class Charity {
    
    	public:
    
    
        Charity() {}
    
        Charity( const Donors &Donors,const Volunteers &Volunteers,const Needy_People &Needy_People) : Needy_People(Needy_People), Donors(Donors), Volunteers(Volunteers)  {}
    
    
    
    };
    
    int main() {
    
    
        Charity database[10];
    
    
        int exit = 0;
    
    
    
        do {
    
            cout << "Press 1 to fill data of database\n"
    
                    << "Press 2 to output data in the database \n"
    
                    << "Press 3 to search of 'Ahmed Osama' as a donor \n"
    
                    << "Press 4 to search about the names of people need 1000 L.E monthly\n"
    
                    << "Press 5 to search about needy_people in 'MoQatam' area\n"
    
                    << "Press 6 to search if there is a volunteer working in Sunday\n"
    
                    << "Press 7 to search about people who donate with money greater than 10000 L.E\n"
    
                    << "Press 8 to search about volunteer by ID \n"
    
                    << "Press 9 to search about Donor with ID \n"
    
                    << "press 10 to exit.\n"
    
                    << "Please make your selection\n"
    
                    << "Selection: ";
    
            cin >> exit;
    
            // Cases
    
            switch (exit){
    
                case 1:
    
                    cout << "please fill data of database here\n";
    
                    break;
    
                case 2:
    
                cout << "output data \n";
    
                    break;
    
                case 3:
    
                cout << "please entre name of item\n";
                    break;
    
                case 4:
    
                cout << "please entre price grater than 15000 LE\n";
                    break;
    
                case 5:
    
                 cout << "item made by company in ' Damietta'\n";
                    break;
    
                case 6:
    
                 cout << "please entre item id\n";
                	break;
    
                case 7:
    
                cout << "item with maximum amount\n";
                break;
    
                case 8:
    
                cout << " please enter ID to search \n";
                break;
                case 9:
    
                    cout << "please enter ID to search \n";
                    break;
    
                case 10:
                    cout << "Goodbye!\n";
                break;
    
    
    
                default:
    
                    cout << "wrong number\n";
                    break;
    
            }
    
          } while(exit !=10);                            
    
        return EXIT_SUCCESS;
    
    } 

     

×
×
  • أضف...