Programming Activity 7-2 Guidance
This activity builds upon the work done in activity 7-1.
It requires you to create and work with a static class variable.
It also requires you to create toString() and equals() functions.
The framework comments provide detailed instructions.
Make sure you read and follow them.
You will make changes to and compile Airport.java.
However, to run the program you run it from AirportClient.java.
This means that AirportClient.java must be the current opened source file in TextPad
when you choose to run the application.
The static field countAirports is not a constant and should be private.
Static fields are referenced by using the class name, rather than an object name.
To reference the static field countAirports, use Airport.countAirports.
Since the getCountAirports() function references a static field, this
function must be declared as a static function (using the static keyword).
The following example shows the format for the String returned by toString():
Airport code: IAD; Number of gates: 30