Skip to main content

Cs301 Assignment 2 Solution Spring 2021

      

     Cs301 Assignment 2 Solution Spring 2021

Note :

 For Unique Solution Contact on Whatsapp 

03235459470

 code


#include<iostream>
using namespace std;
class CustomerNode
{
public:
int customer_id;
int item_purchased;
string customer_name;
CustomerNode* left;
CustomerNode* right;
CustomerNode(int id,int item,string name)
{
customer_id=id;
item_purchased=item;
customer_name=name;
}
};
class queue
{
public:
CustomerNode* arr[100];
int n=100;
int front=-1;
int rear=-1;
int count=0;
void addCustomer(CustomerNode* customer)
{
if(front=-1)
{
front=0;
rear++;
}
arr[rear]=customer;
count++;
}
void recoverCustomer()
{
if(count==0)
{
cout<<"Queue is empty"<<endl;
}
else
{
cout<<"Customer Name:"<<arr[front]->customer_name<<endl;
cout<<"Customer ID:"<<arr[front]->customer_id<<endl;
cout<<"Number of items Purchased:"<<arr[front]->item_purchased<<endl;
front++;
count--;
}
}
};
int main()
{
queue normalQueue;
queue expressQueue;
int choice;
int temp;
do
{
cout<<"Press 1 to add customer\nPress 2 to remove custome\Press 0 to exit\n";
cin>>choice;
if(choice==1)
{
int id;
int item;
string name;
cout<<"Enter Name:";
cin>>name;
cout<<"Enter Customer ID:";
cin>>id;
cout<<"Enter Number of items:";
cin>>item;
CustomerNode*newcustomer=new CustomerNode(id,item,name);
if(item<=5)
{
expressQueue.addCustomer(newcustomer);
{
cout<<"Customer Entered into Express Queue";
cout<<"Customer in express queue are:"<<expressQueue.count<<endl;
}
else
{
normalQueue.addCustomer(newcustomer);
cout<<"Customer is entered into normal queue"<<endl;
cout<<"Customer in normal queue are:"<<normalQueue.count<<endl;
}
}
else
if(choice==2)
{
int choice;
cout<<"To remove customer from express queue press 1"<<endl;
cout<<"To remove customer from normal queue press 2"<<endl;
cin>>choice;
if(choice==1)
{
int choice;
cout<<"Information of remove customer is:"<<endl;
expressQueue.recoverCustomer();
cout<<"remaining customer queue are:"<<expressQueue.count<<endl;
}
if(choice==2)
{
int choice;
cout<<"Information of remove customer is:"<<endl;
normalQueue.recoverCustomer();
cout<<"remaining customer queue are:"<<normalQueue.count<<endl;
}
}
}
while(choice!=0);
}







These paid Solution are Available cs411 cs609 and 604

Contact us on WhatsApp

MR Ammar    +923235459470

MR Atif          +923086278790

MR Umar      +923053183537

Mam Farah     +994409089591

PURPOSE OF VUPORTAL865.COM

Virtual university is Providing quality of Education in Pakistan and Overseas too. Thousands of Students getting quality education. Virtual University of Pakistan is first university In Pakistan that providing online education to everyone in Pakistan. in this university online Education is easy and Affordable for everyone.

Most students find trouble scheduling time for their assignments since the research work is a time-consuming activity. Even so, others find trouble writing their assignment due to a lack of writing skills. Such students need to worry no more since there are several available online assignment help websites. As such, this article provides the top 10 most trusted online assignment help websites that ensure that students get the best out of their assignment help services.

We take your assignments with paramount importance as happy students are our primary goal. Our services are the most affordable, trustworthy and cover a lot of subjects.

Assignment Submission Instruction

Please read the following instructions carefully before submitting the assignment:
It should be clear that your assignment will not get 0 if:

Ø  The assignment is submitted after the due date.

Ø  The submitted assignment file is corrupt or does not open.

Ø  Assignment is copied from any where like any student or from internet.

How to Submitted Assignment:

Ø Download a question File of the Assignments on LMS.

Ø Solve a question and make a file own words.

Ø Save an Answer file in which extension who Instructor Told.

Ø Go to the LMS and Click the Books Code which you can make a solution file.

Ø Go to the Submitted Option and Click the Chose File Button.

Ø File chose where you can Save the File.

Ø After chose the File last step click the Submitted Option.

 

 

For Paid  Assignments Solution

Contact us on WhatsApp

MR Ammar(Developer)    +923235459470

MR Atif (Blogger)         +923086278790

MR Umar  (WordPress Expert)    +923053183537

Mam Farah(Assignment Expert)     +994409089591 

 

FOR ALL ASSIGNMENTS VISIT THE WEBSITE BELOW

CLICK HERE

 

 

 







Comments

Popular posts from this blog

cs610

                                                                cs610

PAK301 GDB 1 Solution Fall 2022

     PAK301 GDB 1 Solution Fall 2022  DownLoad PURPOSE OF VUPORTAL865.COM Virtual university is Providing quality of Education in Asian nation and Overseas too. Thousands of scholars obtaining quality education. Virtual University of {pakistan|Pakistan|Islamic Republic of {pakistan|Pakistan|Islamic Republic of Asian nation|West Pakistan|Asian country|Asian nation}|West Pakistan|Asian country|Asian nation} is initial university In Pakistan that providing on-line education to everybody in Pakistan. during this university on-line Education is straightforward and reasonable for everybody. Most students realize bother planning time for his or her assignments since the analysis work may be a long activity. Even so, others realize bother writing their assignment because of an absence of writing skills. Such students have to be compelled to worry no additional since there ar many accessible on-line assignment facilitate websites. As such, this text provides the highest ten m...

ENG101 GDB 1 Solution Fall 2022

      ENG101 GDB 1 Solution Fall 2022 DownLoad PURPOSE OF VUPORTAL865.COM Virtual university is Providing quality of Education in Asian nation and Overseas too. Thousands of scholars obtaining quality education. Virtual University of {pakistan|Pakistan|Islamic Republic of {pakistan|Pakistan|Islamic Republic of Asian nation|West Pakistan|Asian country|Asian nation}|West Pakistan|Asian country|Asian nation} is initial university In Pakistan that providing on-line education to everybody in Pakistan. during this university on-line Education is straightforward and reasonable for everybody. Most students realize bother planning time for his or her assignments since the analysis work may be a long activity. Even so, others realize bother writing their assignment because of an absence of writing skills. Such students have to be compelled to worry no additional since there ar many accessible on-line assignment facilitate websites. As such, this text provides the highest ten most t...