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

Conteúdo do Curso

Java Extended

Java Extended

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

bookChallenge: Team Constructor

Tarefa
test

Swipe to show code editor

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 desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 4. Capítulo 7
toggle bottom row

bookChallenge: Team Constructor

Tarefa
test

Swipe to show code editor

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 desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 4. Capítulo 7
toggle bottom row

bookChallenge: Team Constructor

Tarefa
test

Swipe to show code editor

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 desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Tarefa
test

Swipe to show code editor

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 desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 4. Capítulo 7
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt