Work on this with your assigned partner. Take turns programming and error catching. Turn in one copy, with both names on it.
The first thing in your program should be documentation, just like with homework 1.
Suppose that you want to travel to several different cities, to sell your latest MATLAB program. Obviously, you want the trip to be as cheap as possible, and do not really care what order you visit the cities. You start in Atlanta, travel from city to city, and finally return to Atlanta. Of course, whatever your destination for flight 1 will be the source for flight 2. For example, you might fly from Atlanta to Boston, Boston to Dallas, Dallas to Chicago, then Chicago to Atlanta.
Your program should use a matrix to store the flight information. Each row should correspond to one source city, and each column represent the price to fly to the destination city. (We will assume for simplicity that the cost to fly is the same regardless of the direction, i.e. a flight from Dallas to Chicago costs the same as a flight from Chicago to Dallas.) Your program should report a flight itinerary, indicating flight number, source city, and destination, such as: "flight 1 from Atlanta to Chicago $50.00". At the end, display the total amount.
You only have to solve this problem for the cities Atlanta, Boston, Chicago, Dallas, and Evansville, to receive full credit.
To solve your problem, write a program that reads the necessary information to compute and output the indicated values, as efficiently as possible. Design your program by specifying its behavior, identifying the variables and operations it needs to solve the problem, and then organizing the variables and operations into an algorithm. Then code your design in MATLAB using stepwise translation. Finally, test your program thoroughly.