C++ queue

Use C++ and implement your own queue using linked list that should be templated.

Get Help With a similar task to - C++ queue

Login to view and/or buy answers.. or post an answer
Additional Instructions:

CPSC 1160: ASSIGNMENT 9[25 MARKS] To Do You will need to implement a Queue class using a linked list that should have a template, so it can store any data type. You only need to implement a constructor, enqueue, dequeue,isEmpty and the big three. Write a program called memorySim.cpp which will use the Queue class you have implemented. You should use a queue to store jobs to go into memory. Your program should ask the user for a file to simulate and the capacity of memory. Every line in the file has the time the Job arrives, the space the job takes up, the time it takes to complete the job and the ID of the Job. Your program should queue jobs when they arrive but should only start running them when there is space in memory to hold the job. The only new job that can be added into memory is the one at the start of the queue. Your output should match the sample below. When your simulation is done print out the total time it took to run the simulation, the number of jobs and the average time it took to complete a job. Test.txt 3 11 8 1 3 3 3 2 7 2 3 3 10 5 3 4 13 9 3 5 18 2 2 6 23 8 1 7 24 7 2 8 28 5 2 9 30 7 5 10 To Submit 1) You should zip and submit all the h and cpp files that you wrote to compile them.

Related Questions

Similar orders to C++ queue
14
Views
0
Answers
c++ lab 1 intro lab
P ROBLEM STATEMENT: A review and extension of cs132: sort a file with 120 records. However, due to memory restrictions only 20 records may be placed into memory. You are to implement a “quasi” external sort CODE/DIRECTIONS: For the sake of si...
15
Views
0
Answers
Cryptography Assignment C
1. Write two programs that use some of the build-in Cryptographic APIs a. Write one C program that uses Symmetric-Key algorithm b. Write one C program that used Asymmetric-key algorithm c. Use C programming language to write your code d. Make sure tha...
5
Views
0
Answers
DFA&NFA Perl language
Question about DFA and NFA Perl programming for DFA and NFA...
9
Views
0
Answers
Python Coding Homework
Its about python implementation of linguistic computer science. Due to covid its our form of exam this year and I need it till 31st of January. There will be another one of these - maybe you could calculate the price of that one on top of that....