Cash-back offer from May 7th to 12th, 2024: Get a flat 10% cash-back credited to your account for a minimum transaction of $50.Post Your Questions Today!

Question DetailsNormal
$ 5.50

Raptor algorithm to sort the temperatures in decreasing values

Question posted by
Online Tutor Profile
request

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

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 Sorted city tpr.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.txt

Ottawa10Hamilton4Victoria2Halifax14Regina11

Content of sortedcitytpr.txt

Halifax: 14Regina: 11Ottawa: 10Hamilton: 4Victoria: 2

Hint:

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

Available Answer
$ 5.50

[Solved] Raptor algorithm to sort the temperatures in decreasing values

  • This solution is not purchased yet.
  • Submitted On 12 Mar, 2020 12:15:04
Answer posted by
Online Tutor Profile
solution
First the Raptor algorithm flow chart for the sorting problem is: T...
Buy now to view the complete solution
Other Similar Questions
User Profile
Brain...

Raptor algorithm to sort the temperatures in decreasing values

First the Raptor algorithm flow chart for the sorting problem is: The equivalent algorithm is: Practice using basic flowchart symbols correctly; Start/Stop Output Input Process Decision Use simp...

The benefits of buying study notes from CourseMerits

homeworkhelptime
Assurance Of Timely Delivery
We value your patience, and to ensure you always receive your homework help within the promised time, our dedicated team of tutors begins their work as soon as the request arrives.
tutoring
Best Price In The Market
All the services that are available on our page cost only a nominal amount of money. In fact, the prices are lower than the industry standards. You can always expect value for money from us.
tutorsupport
Uninterrupted 24/7 Support
Our customer support wing remains online 24x7 to provide you seamless assistance. Also, when you post a query or a request here, you can expect an immediate response from our side.
closebutton

$ 629.35