7.14 Programming Activity 2: Writing a Class Definition, Part 2

In this programming activity, you will complete the definition of the Airport class. Then you will run a prewritten client program that instantiates several Airport objects, calls the methods that you have written, and displays the values of the objects’ data.

Copy into a folder on your computer all the files from this chapter’s Programming Activity 2 folder in the supplied code files. Note that all files should be in the same folder.

Load the Airport.java source file; you’ll notice that the class already contains the class definition from Programming Activity 1. Your job is to complete the class definition by adding a static class variable (and its supporting code) and writing ...

Get Java Illuminated, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.