Skip to content

A scenario for managing queues and service counters using Heaps min and max in C

License

Notifications You must be signed in to change notification settings

SauloCav/Min-and-Max-Heap-in-Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Min and Max Heap in Practice

A scenario for managing queues and service counters using Heaps min and max

Activity proposal:
Consider the scenario of a company that provides services to the public through service counters.

When the customer arrives at the establishment, he goes to the password menu informing:
• the type of service you want, whether for Individuals (PF) or Legal Entities (PJ).
• and if the service is a priority, when self-declaring as being: people with physical disabilities, elderly people aged over 60 years, pregnant women, nursing mothers and people accompanied by infants.

After including this information, the system will generate a password, respecting the service queue in which the customer will be allocated. This customer, like the others, will be attended to while everyone in front of him is called.
The service at the establishment starts after the opening of at least two cashiers, one of which is exclusive for priority service (box 0). Once opened, the service process is started by calling customers from the queue.

Points of observation:
▪ Cashier 0 can perform non-priority service, if the priority queue is empty.
▪ Non-priority cashiers will be able to attend priority customers if the non-priority queue is empty.
▪ During the day, according to demand, new cashiers can be opened or closed, including cashier 0, which will have its function assumed by another cashier.
▪ The minimum amount of active boxes, during the day, must be equal to one after the opening of the service.
▪ If we have only one teller in operation, it must provide priority and non-priority services.
▪ Closing of all service boxes can only occur after all customers have been serviced.

The program must show at all times the current status of the cashiers (the passwords of the customers who are being served at that moment) and of the waiting line(s). It should also show a menu containing options for: generating a password for a new client; call of a new customer for assistance and opening/closing actions of a cashier.

About

A scenario for managing queues and service counters using Heaps min and max in C

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages