10.1 Using the same class code for Car and GreenCar, manage the collection using a Stack, and a Queue. Was using a user-defined collection easier to implement? Was using a user—defined collection easier for the end-user?
10.2 A good application for a Queue is handling information in the order it was received. Create a new Window application with a Form that has two textboxes with the Multi-line property set to True, and two buttons as shown below. In real-life applications, the left side would be the end-user screen, and the right-side would an administrator's screen. The end user faces a technical problem and is creating an error report by typing into the right-side textbox, then clicking the Send Message button. The Administrator see's the first message that was sent, and can delete that message once it has been processed. To gage their time, we display how many messages there are as in the form snapshot shown below. Implement such application by adding:
One textbox where the client types a message and then clicks the Send Message button.
The Send Message adds the text from above to the queue after checking that it's not empty. This updates the label showing how many messages are received so far.
The admin side sees a textbox that is empty until the Process Message is CliCked wh|ch shows the top message received. Once the Admin processes the message they can click the Purge Message which deletes the message from the last and clears the textbox then updates the label with the current number ofmessages. See image.
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly complete the form.
Please provide a valid email address and we will get back to you within 24 hours.
Payment is through PayPal, Buy me a Coffee
or Cryptocurrency.
We are a nonprofit organization however we need funds to keep this organization operating
and to be able to complete our research and development projects.