Question: Problem 2 . Define a class named Airport that has the following - An instance variable named name of type String - An instance variable
Problem
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 and rank to The constructor's header is
Airport
A constructor that takes three parameters and sets the instance variables accordingly. The constructor's header is
AirportString 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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
