Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Team Constructor Challenge | Classes
Java Extended
course content

Course Content

Java Extended

Java Extended

1. Deep Java Structure
2. Methods
3. String Advanced
4. Classes
5. Classes Advanced

bookTeam Constructor Challenge

Task

Here is a class called Team written for you. Your task is to write a constructor that takes all 4 parameters and initializes all 4 fields. Please do not modify the Main class and its methods.

  1. Write a constructor with 4 parameters: name, sport, yearFounded, and city.
  2. Initialize the name field with the value of the name parameter.
  3. Initialize the sport field with the value of the sport parameter.
  4. Initialize the yearFounded field with the value of the yearFounded parameter.
  5. Initialize the city field with the value of the city parameter.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 4. Chapter 7
toggle bottom row

bookTeam Constructor Challenge

Task

Here is a class called Team written for you. Your task is to write a constructor that takes all 4 parameters and initializes all 4 fields. Please do not modify the Main class and its methods.

  1. Write a constructor with 4 parameters: name, sport, yearFounded, and city.
  2. Initialize the name field with the value of the name parameter.
  3. Initialize the sport field with the value of the sport parameter.
  4. Initialize the yearFounded field with the value of the yearFounded parameter.
  5. Initialize the city field with the value of the city parameter.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 4. Chapter 7
toggle bottom row

bookTeam Constructor Challenge

Task

Here is a class called Team written for you. Your task is to write a constructor that takes all 4 parameters and initializes all 4 fields. Please do not modify the Main class and its methods.

  1. Write a constructor with 4 parameters: name, sport, yearFounded, and city.
  2. Initialize the name field with the value of the name parameter.
  3. Initialize the sport field with the value of the sport parameter.
  4. Initialize the yearFounded field with the value of the yearFounded parameter.
  5. Initialize the city field with the value of the city parameter.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Task

Here is a class called Team written for you. Your task is to write a constructor that takes all 4 parameters and initializes all 4 fields. Please do not modify the Main class and its methods.

  1. Write a constructor with 4 parameters: name, sport, yearFounded, and city.
  2. Initialize the name field with the value of the name parameter.
  3. Initialize the sport field with the value of the sport parameter.
  4. Initialize the yearFounded field with the value of the yearFounded parameter.
  5. Initialize the city field with the value of the city parameter.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 4. Chapter 7
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
some-alt