Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions