Question: Section 1 : Enter the comment with the section title as described above. CarDealz ( a used car seller ) wants to build an app
Section : Enter the comment with the section title as described above. CarDealz a used car seller wants to build an app to help their buyers 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, you will begin with three, and the values for them will be Ford Mustang, Chevrolet Silverado, and Dodge Charger, Print to the console the statement, Section : Array of Structures. Using a loop, display the full contents of each structure in the array. Section : Enter the comment with the section title as described above. The app from Section needs a means to check 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 Silverado Charger Print to the console a blank line and the statement, Section : Inventory Count. Using the methods available in the dictionary class, display the current number of each model in the inventoryCount dictionary. Section : Enter the comment with the section title as described above. You are thinking of adding ArrayLists 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 : 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 : 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 : Stack. Create a stack. Using your stack, push the following values: 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 : Enter the comment with the section title as described above. Print to the console the statement Section : Queue. Create a queue. Using your queue, enqueue the following values: 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 : Array of Structures Ford, Mustang, Chevrolet, Silverado, Dodge, Charger, Section : Inventory Count There are Mustangs. There are Silverados. There are Chargers. Section : Days of the Week Sunday Monday Tuesday Wednesday Thursday Friday Saturday Saturday Friday Thursday Wednesday Tuesday Monday Sunday Monday Tuesday Wednesday Thursday Friday Section : Stack There are items in the stack. There are items in the stack. The next item to be popped from the stack is Section : Queue There are items in the queue. There are items in the queue. The next item to be dequeued from the queue is
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
