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

Contenido del Curso

Java Extended

Java Extended

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

bookTeam Constructor Challenge

Tarea

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 desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 7
toggle bottom row

bookTeam Constructor Challenge

Tarea

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 desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 4. Capítulo 7
toggle bottom row

bookTeam Constructor Challenge

Tarea

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 desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Tarea

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 desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
Sección 4. Capítulo 7
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
some-alt