Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Goals Practice sorting collections Description A tour agency receives a weekly update of hotels prices per night. The list contains hotel names, star rating and

image text in transcribed
Goals Practice sorting collections Description A tour agency receives a weekly update of hotels prices per night. The list contains hotel names, star rating and prices. The agency keeps the list of hotels sorted by star rating and by names alphabetically and every once in a while the hotels must be sorted by price per night. Write a program that will read all the hotels information from a file \"Hotels.txt\" and create a list of Hotel objects. Assume that hotel names do not contain numbers. Natural ordering of the list will be by star rating combined with hotel name, i.e. first all the 5 star hotels alphabetically, followed by the 4 stars and three stars. Also provide sorting by lowest price using a comparator. The application should provide two printouts of the list to standard output: - By natural ordering - By lowest price In order to receive full mark, create a JavaFX GUI application that will present the hotel names in a ListView and allow the user to sort them via two buttons: star rating and lowest price. The ListView should update accordingly. A third button will be saving the updated list in a text file named \"Sorted.txt\". Deliverables Submit a zip file of all of the NetBeans directory of your project named StudentLastNameAssignment4. Incomplete projects or separate code files or rar format will not be evaluated

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

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions