Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Air Canada, the nation's flag carrier was founded in 1937 by the Canadian Parliament. It was first known as Trans-Canada Airlines and did not
Air Canada, the nation's flag carrier was founded in 1937 by the Canadian Parliament. It was first known as Trans-Canada Airlines and did not assume the current name until 1965. Throughout its history Air Canada's routes (pictured below, source: Air Canada) have constantly expanded to include a wide array of international and domestic locations. In graph terms each airport is a vertex (node) and each route is a directed edge. EX POST HAND TOD Transport Canada designates 13 airports as international airports: Airport Name Calgary International Airport Edmonton International Airport Fredericton International Airport Gander International Airport Halifax Stanfield International Airport Greater Moncton Romo LeBlanc International Airport 1 Montral-Trudeau International Airport Ottawa Macdonald-Cartier International Airport Qubec/Jean Lesage International Airport St. John's International Airport Toronto Pearson International Airport Vancouver International Airport Winnipeg International Airport Code YYC YEG YFC YQX YHZ YQM YUL YOW YOB YYT YYZ YVR YWG W Air Canada, the nation's flag carrier was founded in 1937 by the Canadian Parliament. It was first known as Trans-Canada Airlines and did not assume the current name until 1965. Throughout its history Air Canada's routes (pictured below, source: Air Canada) have constantly expanded to include a wide array of international and domestic locations. In graph terms each airport is a vertex (node) and each route is a directed edge. Transport Canada designates 13 airports as international airports: Airport Name Calgary International Airport Edmonton International Airport Fredericton International Airport Gander International Airport Halifax Stanfield International Airport Greater Moncton Romo LeBlanc International Airport Montral-Trudeau International Airport. Ottawa Macdonald-Cartier International Airport Qubec Jean Lesage International Airport St. John's International Airport Toronto Pearson International Airport Vancouver International Airport Winnipeg International Airport Code YYC YEG YFC YOX YHZ YQM YUL YOW YQB YYT YYZ YVR YWG The route map of Air Canada can be repereseted as a graph using an adjacency list. We can assume that all Air Canada flights from Canada will originate from one the aforementioned 13 airports. Our goal is to create a graph that will help find routes for passengers. You can add destinations/return flights to these airports as you please (they do not have to be real routes). class AirportNode! public string Name get; set;//property for name field. public string Code (get: set /property for code field. public List Airport Node Destinations (get, set;}//property for list of destinations. public AirportNode(string name, string code) //constructor 5% AddDestination (AirportNodedestAirport) //method to add destination. 5% Remove Destination (AirportNode destAirport)./method to remove destination: 5% ToString()//ToString method overload to print out airport name, code, and list of deestinations. 5% } class RouteMap private List Task 1: Implement each of the classes with their corresponding fields, properties, constructors, and methods. Keep the following in mind: Each route is directed. Only one route can exist between two airports. For example, Toronto Pearson can only appear in Calgary International Airport's destination list once. A ToString method for the RouteMap will help! Task is worth 55% in total. Task 2: Using a breadth first search, implement a method named FastestRoute(AirportNode origin, AirportNode Destination) which outputs the shortest path between two given airports. 15% Task 3: Implement a main method (not necessarily a main method anymore after .NET 6 I suppose) to create your own Route Map and to drive your test cases. 5% Task 4: Draw your own connected Route Map and prepare your test cases. Include the map, test cases, and test results in a separate .pdf test document. 20%
Step by Step Solution
There are 3 Steps involved in it
Step: 1
1 Implement the Route class csharp public class Route public AirportNode Source get set public Airpo...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started