Question: Problem 2 . Define a class named Airport that has the following - An instance variable named name of type String - An instance variable

Problem 2.
Define a class named Airport that has the following
- An instance variable named name of type String
- An instance variable named capacity of type int
- An instance variable named rank of type int
- A constructor that takes no argument and sets name to "SkyFly", capacity to 3, and rank to 1. The constructor's header is
Airport()
- A constructor that takes three parameters and sets the instance variables accordingly. The constructor's header is
Airport(String newName, String newCapacity, double newRank)
- An instance method that displays the instance variables of the invoking object in a format of your choice. The method's header is void displayAirport()
Problem 2 . Define a class named Airport that has

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!