Messenger is used to send or receive text messages. When someone is offline a messenger maintains a buffer of messages which is delivered to the receiver when he gets online. The phenomena take place on simple timestamp phenomena, the message delivered earlier will be sent to the receiver first and the message received late will be delivered after it. Sometime a message in the buffer may have higher priority so it should be delivered earlier on the higher priority. Some of the messages are to be delivered on a particular day or a date are also in the same buffer. Your task is to select a suitable data structure (Heap or Priority Queue) and implement the requirements mentioned above. You need to implement program which shows a user to be offline, display the messages, with a click or a key stroke make the user online and deliver/display the messages according to the mentioned criteria.
I dont understand how to check priority