diff --git a/cuisine.h b/cuisine.h new file mode 100644 index 0000000..81dadff --- /dev/null +++ b/cuisine.h @@ -0,0 +1,23 @@ +#ifndef CUISINE_H +#define CUISINE_H +#include +#include +using namespace std; + +class cuisine{ + private: + int num_of_dishes; + std::string dish_type; + public: + cuisine(string="",int=0); + + void settypeName(string dish); + + void setdishNum(int num); + + std::string gettypeName(); + + int getdishNum(); + +};//class +#endif diff --git a/cuisineIm.cpp b/cuisineIm.cpp new file mode 100644 index 0000000..10ab4a6 --- /dev/null +++ b/cuisineIm.cpp @@ -0,0 +1,30 @@ +#include +#include +#include"cuisine.h" +using namespace std; +cuisine::cuisine(string dish, int num) +{ + std::string dish_type; + int num_of_dishes; +} +void cuisine::settypeName(std::string dish) +{ + + dish_type=dish; +} + +void cuisine::setdishNum(int num) +{ + num_of_dishes=num; +} + +std::string cuisine::gettypeName() +{ + return dish_type; +} + +int cuisine::getdishNum() +{ + return num_of_dishes; +} + diff --git a/cuisinedriver.cpp b/cuisinedriver.cpp new file mode 100644 index 0000000..d1c9e3e --- /dev/null +++ b/cuisinedriver.cpp @@ -0,0 +1,63 @@ +#include +#include +#include +#include "cuisine.h" +using namespace std; + +int linearSearch(auto data, auto key);//prototype +int linearSearch(auto data, auto key) +{ + for (int i=0; i restaurant; + cuisine order; + + for(int i=0;i<4;i++) + { + + cout << "Please enter the type of cuisine." << endl; + + cin >> dish; + + order.settypeName(dish); + + cout << "Enter the number of dishes you have of this cuisine." <> num; + + order.setdishNum(num); + + restaurant.push_back(order); + + + } + cout <<" Enter an interger for a search key"<> search_key; + + cout <