Desktop applications development

 

 

implement a Priority Queue from a Heap. You will then implement a class Student and use your Priority Queue to output the students two different ways.

You are provided with 8 files:

PriorityQueueDriver.java
IKey.java
Heap.java
IPriority.java
IPriorityQueue.java
PriorityQueue.java
Student.java
students.txt
You will need to implement the following: an interface for priority methods in IPriority, a priority queue in PriorityQueue.java, and the main program in PrioirtyQueueDriver.java. The files IKey.java, Heap.java, IPriorityQueue.java, and Student.java are read only. You do not need to make an implementation changes to these files.

Part 1: Implement IPriority
In the file IPriority.java, you should implement an interface that will need to be used by any data type that contained by the priority queue. Make sure you do each of the following.
1 Write a method declaration for the getter. Use the signature Integer getPriority();
2 Write a method declaration for the setter. Use the signature void setPriority(Integer priority);
Note: This interface will only have two methods.

Part 2: Implement a PriorityQueue
In the file PriorityQueue.java, you should implement a generic priority queue. Make sure you do each of the following.
1 Declare one instance variable of type Heap to store your data
2 Code a one parameter constructor that takes a boolean that indicates whether a lower number should have a higher priority. If the parameter is true, then the constructor should instantiate the Heap as a min heap. If the parameter is false then the constructor should instantiate the heap as a max heap.
3 Code a default constructor. This constructor can simply call the one parameter constructor passing it true or you can have the constructor instantiate the Heap as a min heap since that is the default behavior for a priority queue.
4 Implement the methods in IPriorityQueue. IPriorityQueue has five methods you should implement each one.

 

Sample Solution

erm efficiency. Anyway there are critical issues with gathering people as such, especially when assignments become more perplexing, and eventually the model ought to essentially be utilized for checking the advancement of gatherings (Pettinger, 2007). Figure 3: Belbin’s Team Roles (PrePearl Training Development, 2019) A more useful methodology of collection people is to use Belbin’s Team Theory (Belbin, 2017). Belbin distinguishes 9 key jobs that should be satisfied inside a gathering to guarantee a good outcome, the jobs are summed up in Figure 3. The jobs cover a wide range of abilities that should be available inside a gathering to guarantee a good outcome, and becomes fundamental when assignments are extensive and complex. Associations can track down the Belbin jobs every individual fits through a poll, and along these lines adjusted gatherings can be framed covering every one of the jobs. Nonetheless, as with Fiedler’s possibility model, the hypothesis when meant practice can frequently turn out to be exceptionally unrealistic for associations to routinely carry out. This is generally in light of the fact that the association is compelled by the characters of their representatives, their might be a wealth of one character type and a shortfall of another, the main arrangement is to recruit remotely to fill the missing jobs inside groups. This can bring about a broad finance for an association and colossal monetary ramifications as they can’t legitimately excuse worker’s assuming they have an excessive number of one character type. The significance of Belbin jobs in a group became obvious for Group 1 on the principal day of the open air administration course, the gathering had 5 individuals who filled the completer finisher and practitioner jobs, but had nobody filling the asset examiner or screen evaluator job, the gathering used up all available time and didn’t get done with the job effectively. Clearly using up all available time was not the sole reason for the gatherings disappointment, but in the event that somebody had been checking time and execution, the gathering might have understood their choice was impossible and might have tracked down an elective arrangement. One answer for absence of Belbin jobs is to appoint explicit jobs to people, this was carried out vigorously on the open air administration course for jobs apparent to be fundamental for progress, for example, time keeping. This strategy works for basic errands, but for complex undertakings the person with the relegated liability can frequently become charmed in the assignment and fail to remember their job, or the inverse turning out to be excessively immersed with the obligation they

This question has been answered.

Get Answer
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, Welcome to Compliant Papers.