public string CashierGenerated Number(string CashierNumber) { x++; CashierNumber = Cashier Number + x.ToString(); return Cashier Number;

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

C# language

SEE PICTURE FOR INSTRUCTIONS

Table 1. Forms and Controls
Controls/Forms
Button
Label
Form
btnCashier
IblQueue
QueuingForm
Name
Create a class named CashierClass and add the following codes:
private int x;
public static string getNumberInQueue = "";
public static Queue <string> CashierQueue;
Table 1. Forms and Controls
*Note: The other label is not required to set the names, only the controls/forms that is needed.
public CashierClass() {
x = 10000;
CashierQueue = new Queue<string>();
Cashier
}
public string CashierGenerated Number (string CashierNumber) {
X++;
CashierNumber = Cashier Number + x.ToString();
return Cashier Number;
Cashier
P-10007
Position in Queue
P-10007
}
In the first form named QueuingForm, double click the button to create an event named Click.
Call CashierClass and declare its variable named cashier. Set the access modifier for the declared
class to private.
Ex. private int x;
After the declaration of the variable for CashierClass, initialize the variable cashier inside the
constructor of QueuingForm.
After declaring and initializing the code, add the following codes inside the created event of the button
named btnCashier.
lblQueue.Text = cashier. Cashier Generated Number ("P - ");
Cashier Class.get Number InQueue = lblQueue.Text;
Cashier Class.CashierQueue. Enqueue (CashierClass.getNumber InQueue);
In the second form named CashierWindowQueue Form, add two (2) buttons and a List View control.
See Table 2 for the names of each control.
Transcribed Image Text:Table 1. Forms and Controls Controls/Forms Button Label Form btnCashier IblQueue QueuingForm Name Create a class named CashierClass and add the following codes: private int x; public static string getNumberInQueue = ""; public static Queue <string> CashierQueue; Table 1. Forms and Controls *Note: The other label is not required to set the names, only the controls/forms that is needed. public CashierClass() { x = 10000; CashierQueue = new Queue<string>(); Cashier } public string CashierGenerated Number (string CashierNumber) { X++; CashierNumber = Cashier Number + x.ToString(); return Cashier Number; Cashier P-10007 Position in Queue P-10007 } In the first form named QueuingForm, double click the button to create an event named Click. Call CashierClass and declare its variable named cashier. Set the access modifier for the declared class to private. Ex. private int x; After the declaration of the variable for CashierClass, initialize the variable cashier inside the constructor of QueuingForm. After declaring and initializing the code, add the following codes inside the created event of the button named btnCashier. lblQueue.Text = cashier. Cashier Generated Number ("P - "); Cashier Class.get Number InQueue = lblQueue.Text; Cashier Class.CashierQueue. Enqueue (CashierClass.getNumber InQueue); In the second form named CashierWindowQueue Form, add two (2) buttons and a List View control. See Table 2 for the names of each control.
Create a queuing program that automatically generates a number once the student clicks the button to
This program should have two (2) window forms named QueuingForm and
Queue Form. See Figures 1 and 2.
get a number.
CashierWindow
QueuingForm
Cashier
*Click to get a number
Position in Queue
P - 10007
Figure 1. Queuing Form
CashierWindowQueueForm
Refresh
Next
P - 10001
P - 10002
P - 10003
P-10004
P - 10005
P-10006
P - 10007
Figure 2. CashierWindowQueueForm
Follow the given design in Figure 1. See Table 1 for the names of the control that contains function.
Transcribed Image Text:Create a queuing program that automatically generates a number once the student clicks the button to This program should have two (2) window forms named QueuingForm and Queue Form. See Figures 1 and 2. get a number. CashierWindow QueuingForm Cashier *Click to get a number Position in Queue P - 10007 Figure 1. Queuing Form CashierWindowQueueForm Refresh Next P - 10001 P - 10002 P - 10003 P-10004 P - 10005 P-10006 P - 10007 Figure 2. CashierWindowQueueForm Follow the given design in Figure 1. See Table 1 for the names of the control that contains function.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education