logo Use CA10RAM to get 10%* Discount.
Order Nowlogo

Your task for this assignment is to develop a computer repair scheduling application. The application will use an array-based heap to implement a priority queue data structure in C++. This will be accomplished utilizing a user-defined class.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Your task for this assignment is to develop a computer repair scheduling application. The application will use an array-based heap to implement a priority queue data structure in C++. This will be accomplished utilizing a user-defined class.

  1. Implement a transaction-based priority queue data structure using C++. The program will be interactive. A prompt will be displayed requesting an input transaction. Each input transaction will be entered at the command line and results will be displayed on the console.
  2. Each input transaction will represent a new computer repair order to be scheduled or a “service” command. A new computer repair order will be represented in three parts separated by hyphens: customer ID (variable length), computer model year (4 digits), and warranty code (y or n). Each repair order will be scheduled based on priority and the order in which the repair order was received (first-come-first-served). A warranty repair order (i.e., warranty code = ‘y’) is assigned priority 1 (highest). A non-warranty repair for a computer model less than 6 years old is assigned priority 2. A non-warranty repair order for a computer model older than 5 years is assigned a priority 3 (lowest). Each repair order is placed in a priority queue and will be serviced by the next available repair technician.

A transaction that contains a “service” command results in a repair order being removed from the priority queue and the customer ID being displayed on the console. A transaction containing the string “end-of-file” will signal the end of the input. Display the number of repair orders remaining in the queue when the “end-of-file” transaction is processed.

 

Sample input transactions and output expected:

guo-2018-y

hannie-2014-n

ian-2004-y

service (output: guo)

service (output: ian)

danny-2012-n

eli-2017-n

fan-1992-y

service (output: fan)

service (output: hannie)

ann-2013-y

bow-2016-n

cho-2013-n

service (output: ann)

service (output: eli)

service (output: bow)

end-of-file (output: There are 2 remaining repair orders in the queue.)

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

896 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

965 Answers

Hire Me
expert
Husnain SaeedComputer science

602 Answers

Hire Me
expert
Atharva PatilComputer science

684 Answers

Hire Me

Get Free Quote!

365 Experts Online