Question: Using Airport class, create instance variable that is an array of at least 5 values. You may select the data type. Make sure that this

Using Airport class, create instance variable that is an array of at least 5 values.

You may select the data type. Make sure that this array is appropriate and makes sense for the class that you selected.

Write the line or lines of code that will declare the array as an instance variable.

Write a "get" method for this class that returns a "deep-copy" of the new array instance variable from the previous question.

If a class has an array for one of the instance variables, will the toString() method always have a for loop? Why or why not?

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 Databases Questions!