Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q1) Download the code on MYGUST and Today is Ms.Fatme's last day to teach in a lab (9 th of January) and she is planning
Q1) Download the code on MYGUST and Today is Ms.Fatme's last day to teach in a lab (9 th of January) and she is planning a huge farewell party. In order to determine the priority of who to invite, she uses the formula shown below: priority number =A/1000+BC where A is the invitee's total distance away from Ms. Fatme B is the number of years in his or her have been friends with her C is a sequence number representing the invitee's gifts worthiness to ensure good gifts only Given a file of overbooked invitees as shown in the following table, You first need to add a method that calculates the priorityNumber inside the Invitee class, and implement the compareTo method. Then, write a program that reads the file and determines each invitee's priority number. The program then builds a priority queue using the priority number and prints a list of waiting invitees in priority sequence. Notes: for simplicity, this table is given to you in your project as input file: "in.txt". Assume the maxsize for this question is 100
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started