Question: Complete Chapter 7, Programming Activity 2: Writing a Class Definition, Part 2. Make sure you study the Programming Activity 7-2 Guidance document. Programming Activity 7-2
Complete Chapter 7, Programming Activity 2: Writing a Class Definition, Part 2. Make sure you study the Programming Activity 7-2 Guidance document. 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. Main class ---------- 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. Part 1 ------ The static field countAirports is not a constant and should be private. Part 2 ------ Static fields are referenced by using the class name, rather than an object name. To reference the static field countAirports, use Airport.countAirports. Part 4 ------ Since the getCountAirports() function references a static field, this function must be declared as a static function (using the static keyword). Part 5 ------ The following example shows the format for the String returned by toString(): Airport code: IAD; Number of gates: 30 Need it in Java please.
this is examples of the output


Airport Information gates a Number of Airports gates gates Ainport code IAD:Number ergates 30 2 a 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
