Question: Write a test program in a separate file, named TestHotelRating, to create an object of the class and test all seven class methods on that
Write a test program in a separate file, named TestHotelRating, to create an object of the class and test all seven class methods on that object following the sample run below. Allow the user to enter both number of years and number of hotels. Do not hardcode the array size. Use a sentinel loop to allow reruns and recreate the object with different input values. Document your code, organize, and space the outputs properly. Use escape characteristics and formatting objects $ and as needed. The following sample test shows only the output labels and format assuming three hotels and four years for illustration purpose Make sure your code displays the outputs following the test data format. Test data: Five stars hotels indices: Average Ratings are: Hotel : Hotel : Hotel : Four or more stars hotels indices: Any five stars hotel? true Best hotel index: Worst hotel index: Page of Ratings chart: Year Year Year Year Hotel : Hotel : Hotel : Would you like to run the program again yn y
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
