Given the Text File Reciprocity Containing Temperature Readings for Various Cities

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.  

Don't use plagiarized sources. Get Your Custom Essay on
Given the Text File Reciprocity Containing Temperature Readings for Various Cities
GET AN ESSAY WRITTEN FOR YOU FROM AS LOW AS $13/PAGE
Order Essay

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 being sorted.

Grand Paper Writers
Order NOW For A 10% Discount!
Pages (550 words)
Approximate price: -

Our Advantages

Plagiarism Free Papers

All papers are written by the best professional writers to ensure 100% originality. We always provide plagiarism reports whenever we deliver completed papers.

Free Revisions

All papers by Grand Paper Writers are completed and submitted on time. This timely delivery of papers gives you time to go through the paper before the official deadline.

Title-page

As an additional service, we will provide a title page that precedes the contents of your paper. Here, you will provide your personal details.

Bibliography

We also ensure that we provide an extra page for the references or bibliographies following referencing rules.

Originality & Security

At Grandpaperwriters.com, we guarantee students for the provision of security and original work. All your personal information is handled with confidentiality and is not shared with third parties. Additionally, we ensure that we provide original content with accompanying plagiarism reports to show originality.

24/7 Customer Support

Our customer support team is always available 24/7 to provide instant responses to any queries raised by students.

Try it now!

Calculate the price of your order

We'll send you the first draft for approval by at
Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Grandpaperwriters.com has the best professional essay writers for quality services.

Pricing

Flexible Pricing

Here, a Grandpaperwriters.com, we do not compromise on the time of our clients. We always deliver all completed papers on or before the deadlines.

Communication

Admission Help & Client-Writer Contact

Grandpaperwriters.com provides an interactive portal where students can communicate directly to their writers.

Deadlines

Paper Submission

Here, a Grandpaperwriters.com, we do not compromise on the time of our clients. We always deliver all completed papers on or before the deadlines.

Reviews

Customer Feedback

Grandpaperwriters.com appreciates feedback from our clients to help us improve the delivery of essay writing services. As such, we are constantly changing our policies to ensure maximum customer and writer satisfaction.