Given the text file citytpr.txt containing temperature readings for various cities, develop a Raptor algorithm to sort the temperatures in decreasing values. The sorted temperatures shall be written to a file called sortedcitytpr.txt. The content of the files citytpr.txt and sortedcitytpr.txt must be stored in the formats shown below. For each city, the citytpr.txt includes the city name and the temperature respectively. The solution must work for any arbitrarily large file ( i.e. the number of city-temperature records must not be hard coded in the algorithm).The submission must be the Raptor file of your flowchart solution. Any other forms of submissions will be marked as zero.  Content of citytpr.txtOttawa10Hamilton4Victoria2Halifax14Regina11Content of sortedcitytpr.txtHalifax: 14Regina: 11Ottawa: 10Hamilton: 4Victoria: 2Hint:Since it is a sorting problem, the solution must resemble something like the main chart for the insert, selection or the bubble sorting algorithm – anyone of these will do. The only differences may be : (1)  the sorting order (increasing or decreasing), (2) the swap. For the homework the swap must be applied to both temperatures and city names at the same time. For file reading check the example of  Figure 7.9 (module 7).Store the city names and corresponding temperatures in two separate arrays. Make sure that for any city, its name and temperature are placed at the same index position of their corresponding arrays.  The problem at hand can then be solved by sorting the temperature array (using any one of the sorting algorithms) while at the same time moving the positions of the names in the city array so that they match the positions of their corresponding city temperatures being sorted.




Why Choose Us

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

How it Works

  • Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the "PAPER DETAILS" section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.