JAVA CODING QUESTION. Object-oriented and constructor chaining!!! Build a "country" class. A country object will have 2 attributes its name and an array of the names of football stadiums in the country You have to assume there is a football stadium class that consists of just one constructor that has only one input parameter, which is its name. Add the following constructors to the country class: 1) Country(String country_name) //country has no football stadium 2)Country(String country_name, String football_stadium_name) //country has exactly 1 football stadium 3)Country(String country_name, football_stadium[] football_stadiums) //country has multiple football stadiums YOU HAVE TO USE CONSTRUCTOR CHAINING!! After coding answer the following question in words: When making a country object what is the maximum amount of constructor methods that are called and what is the minimum amount that will be called. Write an example for both situations
JAVA CODING QUESTION. Object-oriented and constructor chaining!!!
Build a "country" class. A country object will have 2 attributes its name and an array of the names of football stadiums in the country
You have to assume there is a football stadium class that consists of just one constructor that has only one input parameter, which is its name.
Add the following constructors to the country class:
1) Country(String country_name) //country has no football stadium
2)Country(String country_name, String football_stadium_name) //country has exactly 1 football stadium
3)Country(String country_name, football_stadium[] football_stadiums) //country has multiple football stadiums
YOU HAVE TO USE CONSTRUCTOR CHAINING!!
After coding answer the following question in words:
When making a country object what is the maximum amount of constructor methods that are called and what is the minimum amount that will be called. Write an example for both situations
Step by step
Solved in 2 steps