Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Other

Cos2611 Assignment 1 Solutions for 2026

Rating
-
Sold
1
Pages
18
Uploaded on
13-05-2026
Written in
2025/2026

Question for Cos2611 Assignment1 for 2026 Warehouse Order Dispatch System Scenario As a second-year IT student, you have been requested by a warehouse manager to develop a simulation system that demonstrates how orders are received, queued, processed, and dispatched in trucks. The warehouse handles three types of orders: Small (S) Medium (M) Bulk (B) Orders arrive randomly during the day. Each truck has a capacity of five orders. Once full, a truck is dispatched. The manager wants to see a clear simulation of how orders are queued, processed, and dispatched. Project Objective Using C++ and linear data structures (queues and stacks), develop a simulation that: Generates random orders without using external files. Assigns each order to a queue based on its type. Processes orders in first-in-first-out (FIFO) order for each queue. Uses stacks to represent dispatched trucks, showing last dispatched trucks on top (LIFO order). Tracks processing time for each order. Provides a record of all generated orders (time step, order type, processing time). Presents output clearly:: Queues with order types and processing times Dispatched trucks stack with numbering New arrivals at each time step Final table of all generated orders [To help you visualise the project - see the attached pseudocode] Simulation Details Queues Three queues represent each order type: S, M, B. Orders are added to the queue based on type. Each order has a processing time (randomly generated). Orders are processed in FIFO order. Trucks / Stack Each truck can hold 5 orders. Once full, the truck is dispatched. Dispatched trucks are placed in a stack, showing LIFO order. Each truck is numbered per type: Truck1[S], Truck2[M], Truck3[B], etc. Random Order Generation At each time step, 0–3 new orders arrive randomly. Each order type is chosen randomly. Each order is assigned a random processing time (1–4 time units). Output Format At each time step, display: New arrivals: list of order types arriving. Queue state: each queue with order types and remaining processing times. Stack of dispatched trucks: last dispatched on top with numbering. At the end of the simulation, display a table of all generated orders, in the format: time_step,type,processing_time 1,S,3 1,B,2 2,M,4 3,S,1 3,S,2 5,B,3 Example Expected Output (partial) Time Step 1: New Orders: S, B Queue S: [S(3)] Queue M: [] Queue B: [B(2)] Stack: empty Time Step 2: New Orders: M Queue S: [S(2)] Queue M: [M(4)] Queue B: [B(1)] Stack: empty Dispatched Trucks Stack (example at end): Top - Truck1[S] Truck1[B] Truck1[M] Bottom Final Generated Orders Table: time_step,type,processing_time 1,S,3 1,B,2 2,M,4 3,S,1 3,S,2 5,B,3 ... Technical and coding requirements Must use latest C++ standard (C++20 or later). Only standard libraries (iostream, queue, stack, vector, algorithm, etc.) are allowed. Submission Requirements Single C++ file only: _AS First three lines: student number and name. Must use latest C++ standard and standard libraries only. Output must follow format described above.

Show more Read less
Institution
Course

Content preview

COS2611 ASSIGNMENT 1 2026 SOLUTION


OUTPUT




The code is ready for submission. Just copy and paste the code into
your IDE and submit it. Remember, you are not supposed to upload
it as a PDF.

Written for

Institution
Course

Document information

Uploaded on
May 13, 2026
Number of pages
18
Written in
2025/2026
Type
OTHER
Person
Unknown

Subjects

$7.47
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
IntellectInn Crystal Indigo
Follow You need to be logged in order to follow users or courses
Sold
24
Member since
2 year
Number of followers
4
Documents
41
Last sold
21 hours ago
Tendai's Intellect Inn

We specialize in providing a curated selection of university notes and assignments, meticulously crafted to aid students on their academic journey. Whether you're seeking comprehensive study materials or supplementary resources to enhance your learning, our store is your one-stop destination. Browse our collection and unlock the key to academic success, with quality content tailored to various disciplines and subjects. Empower your education with ease and efficiency at our store today.

Read more Read less
5.0

3 reviews

5
3
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions