Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

written in c# please Transport Canada designates 13 airports as international airports: Code YYC YEG YFC Airport Name Calgary International Airport Edmonton International Airport Fredericton

image text in transcribedimage text in transcribedimage text in transcribed

written in c# please

Transport Canada designates 13 airports as international airports: Code YYC YEG YFC 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 YQX 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). 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 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 A; //List of airport nodes. public RouteMap() {...}l/RouteMap constructor. 5% public bool FindAirport(string name) {...} //Method to find airport by name. 5% public bool FindAirport(string code) {...} //Method to find airport by code. 5% public bool AddAirport(AirportNode a){...} //Method to add airport node. Duplicates not allowed. 5% public bool Remove Airport (AirportNode a) {...} //Method to remove airport node. Node must exist. 5% public bool AddRoute(AirportNode origin, AirportNode dest) {...} 5% public bool RemoveRoute (AirportNode origin, AirportNode dest {...} 5% } 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, there Toronto Pearson can only appear in Calgary International Airport's destination list once. A ToString method for the RouteMap will help! Task 1 is worth 55% in total

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

Let f(x) = 2 x + 3 x 5 . Find the inverse of f.

Answered: 1 week ago

Question

Explain the causes of indiscipline.

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago