From bceb3f4c765c7279c2ca184d3d2f0bcf807a7c74 Mon Sep 17 00:00:00 2001 From: Kriti-2308 <104774832+Kriti-2308@users.noreply.github.com> Date: Thu, 12 May 2022 18:50:44 +0530 Subject: [PATCH 1/5] Create read me --- Team-Loop_lapeta/read me | 1 + 1 file changed, 1 insertion(+) create mode 100644 Team-Loop_lapeta/read me diff --git a/Team-Loop_lapeta/read me b/Team-Loop_lapeta/read me new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Team-Loop_lapeta/read me @@ -0,0 +1 @@ + From d67bc050673a74212d92e448e255df35757af60e Mon Sep 17 00:00:00 2001 From: Kriti-2308 <104774832+Kriti-2308@users.noreply.github.com> Date: Thu, 12 May 2022 18:52:07 +0530 Subject: [PATCH 2/5] added the code --- Team-Loop_lapeta/main.cpp | 188 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 Team-Loop_lapeta/main.cpp diff --git a/Team-Loop_lapeta/main.cpp b/Team-Loop_lapeta/main.cpp new file mode 100644 index 0000000..cfe75cf --- /dev/null +++ b/Team-Loop_lapeta/main.cpp @@ -0,0 +1,188 @@ +#include +#include +#include +using namespace std; + +class Burger +{ + int front,rear, f, r,q[5]; + char o[5]; + public: + Burger() + { + front=-1; + rear=-1; + f=-1; + r=-1; + } + + int isfull() + { + if((front==0&&rear==4)||front==rear+1) + { + return 1; + } + else + { + return 0; + } + } + + int isfull2() + { + if((f==0&&r==4)||f==r+1) + { + return 1; + } + else + { + return 0; + } + } + + int isempty() + { + if(front==-1&&rear==-1) + { + return 1; + } + else + { + return 0; + } + } + + int isempty2() + { + if(f==-1&&r==-1) + { + return 1; + } + else + { + return 0; + } + } + + void add() + { + if(isfull()==0 && isfull2()==0) + { + cout<<"\n\n a. Veg Burger b. Chicken Burger c. Paneer Burger d. Special Veg Burger"; + cout<<"\n Enter the Burger ID and items: "; + if(front==-1&&rear==-1&&f==-1&&r==-1) + { + f=0; + r=0; + front=0; + rear=0; + cin>>q[rear]; + cin>>o[r]; + cout<>q[rear]; + cin>>o[r]; + } + + char c; + cout<<" Do you want to add another order ? "; + cin>>c; + if(c=='y'||c=='Y') + add(); + } + else + { + cout<<"\n Orders are full "; + } + + + } + + void serve() + { + if(isempty()==0 && isempty2()==0) + { + if(front==rear) + { + cout<<"\n Order served is : "<>ch; + switch(ch) + { + case 1: + add(); + break; + + case 2: + display(); + break; + + case 3: + serve(); + break; + + case 4: + exit(0); + + default: + cout<<" Invalid choice "; + check(); + } + char ch1; + cout<<"\n Do you want to continue? "; + cin>>ch1; + if(ch1=='y'||ch1=='Y') + check(); + } +}; + + int main() + { + Burger b1; + b1.check(); + return 0; + } From a0452bb3356f7eca9a23018a9599b0c296fa1b30 Mon Sep 17 00:00:00 2001 From: Kriti-2308 <104774832+Kriti-2308@users.noreply.github.com> Date: Thu, 12 May 2022 18:59:09 +0530 Subject: [PATCH 3/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 90dc15c..0f73009 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # Buffer_3.0 Buffer 3.0 Repository to submit your projects +we have written a code to perform basic functions such as add, display and serve orders in a fast food rest From 2a57b6275a3ae4fdbdc7cef5b4f5ce88d7542c1a Mon Sep 17 00:00:00 2001 From: Kriti-2308 <104774832+Kriti-2308@users.noreply.github.com> Date: Thu, 12 May 2022 19:00:41 +0530 Subject: [PATCH 4/5] Delete read me --- Team-Loop_lapeta/read me | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Team-Loop_lapeta/read me diff --git a/Team-Loop_lapeta/read me b/Team-Loop_lapeta/read me deleted file mode 100644 index 8b13789..0000000 --- a/Team-Loop_lapeta/read me +++ /dev/null @@ -1 +0,0 @@ - From 9bd6e6a44bb78a09aba94b853f33bbe23205e007 Mon Sep 17 00:00:00 2001 From: Kriti-2308 <104774832+Kriti-2308@users.noreply.github.com> Date: Thu, 12 May 2022 19:10:07 +0530 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f73009..358ab2e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Buffer_3.0 Buffer 3.0 Repository to submit your projects -we have written a code to perform basic functions such as add, display and serve orders in a fast food rest +we have written a code to perform basic functions such as add, display and serve orders in a fast food restaurant.