I really appreciate if anybody give me at least only pseudocode for this assignmet?

I would really appreciate if anybody at least tell me only pseudocode even it would be enough only the logic part at least 3-5 line code how to start how to compare the numbers each other i mean the tricky part of this assignmet.

This is the assignment.
-----------------------
Write a program SortCities, reading any number of cities with their corresponding postal numbers from a text file. You may assume that each line in the file contains one postal number (integer) and one city (string) and that they are separated by a semicolon (. Create a class City, representing a city. The class City should implement the interface Comparable.

Re: I really appreciate if anybody give me at least only pseudocode for this assignme

Actually in this assingment is required something more advanced not only <>.
If anyone has any idea at least how to start comparing two lines which has numbers and to sort them.which is the smalletst one. as u can see on assignment what is required.

February 23rd, 2011, 09:11 AM

KevinWorkman

Re: I really appreciate if anybody give me at least only pseudocode for this assignme

When designing an algorithm, you should ask yourself: how would I do this in my head or with a pencil and paper? Pretend you have a friend who has no idea how to accomplish the goal, and write out the directions you would give him that he could follow, knowing nothing else, to do so.

When you have that written out, you should have an algorithm that should be pretty easy to translate into code.

February 23rd, 2011, 09:20 AM

KevinWorkman

Re: I really appreciate if anybody give me at least only pseudocode for this assignme

Again, it seems we're wasting our time, as this thread has already received help elsewhere: