Using the language C# in visual studios please complete the following Assignment: The program for this assignment will consist of five sections, each headed by the three-line commen
Using the language C# in visual studios please complete the following Assignment:
The program for this assignment will consist of five sections, each headed by the three-line comment below:
//*********************************************************
//****Assignment 4 Section X
//*********************************************************
(where X stands for the portion of the assignment to follow.)
Assignment Requirements
Section 1:
- Enter the comment with the section title as described above.
- CarDealz used cars wants to build an app for their buyers to know what cars are on the approved list for purchase. You will create a structure with the string fields for Make and Model and one integer field ModelYear for the earliest acceptable model year for that car.
- Create an array of these structures. For testing purposes, we will begin with three and the values for them will be {Ford, Mustang, 2010}, {Chevrolet, Silverado, 2008}, and {Dodge, Charger, 2012}.
- Print to the console the statement, “Section 1: Array of Structures.”
- Using a loop, display the full contents of each structure in the array.
Section 2:
- Enter the comment with the section title as described above.
- The app from section 1 needs a means to check to see how many of each model CarDealz already has on the lot so that the buyers do not create a glut of any one model. In this section, you will create a dictionary named inventoryCount that will use the car model as the key and the inventory quantity as the value.
- Populate your dictionary with the following values:
Mustang
9
Silverado
13
Charger
4
- Print to the console a blank line and the statement, “Section 2: Inventory Count.”
- Using the methods available in the dictionary class, display the current number of each model in the inventoryCount dictionary.
Section 3:
- Enter the comment with the section title as described above.
- You are thinking of adding array lists for different work weeks to the CarDealz app because not all employees work the same days of the week. Create an arraylist called DaysofWeek and add all the days of the week to it.
- Print to the console the statement, “Section 3: Days of the Week.”
- Using a loop, display the days from the arraylist.
- Using a loop, display the days from the arraylist in reverse order.
- Create a second arraylist called WorkDays and copy the DaysofWeek arraylist to it.
- Delete “Saturday” and “Sunday” from the WorkDays arraylist.
- Print the contents of WorkDays.
Section 4:
- Enter the comment with the section title as described above.
- There is further discussion about features to be added to the CarDealz app at a later time. You think it is best that you get some practice with stacks and queues as you think you will likely need them.
- Print to the console the statement, “Section 4: Stack.”
- Create a stack.
- Using your stack, push the following values: 10,24, 31, 45, 19, 76
- Using methods of the stack class, print a message telling how many items are on the stack.
- Pop three items off of the stack and repeat your printed message telling how many items are in the stack.
- Display the next item in the stack to be popped.
Section 5:
- Enter the comment with the section title as described above.
- Print to the console the statement, “Section 5: Queue”
- Create a queue.
- Using your queue, enqueue the following values: 10,24, 31, 45, 19, 76
- Using methods of the queue class, print a message telling how many items are on the queue.
- Dequeue three items off of the queue and repeat your printed message telling how many items are in the queue.
- Display the next item in the queue to be dequeued.
EXPECTED OUTPUT
Section 1: Array of Structures
Ford, Mustang, 2010
Chevrolet, Silverado, 2008
Dodge, Charger, 2012
Section 2: Inventory Count.
There are 9 Mustangs.
There are 13 Silverados.
There are 4 Chargers.
Section 3: Days of the Week
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Saturday
Friday
Thursday
Wednesday
Tuesday
Monday
Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Section 4: Stack
There are 6 items in the stack.
There are 3 items in the stack.
The next item to be popped from the stack is 31.
Section 5: Queue
There are 6 items in the queue.
There are 3 items in the queue.
The next item to be dequeued from the queue is 45.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.