Contenido del Curso
Java Extended
Java Extended
Team 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.
- Write a constructor with 4 parameters:
name
,sport
,yearFounded
, andcity
. - Initialize the
name
field with the value of thename
parameter. - Initialize the
sport
field with the value of thesport
parameter. - Initialize the
yearFounded
field with the value of theyearFounded
parameter. - Initialize the
city
field with the value of thecity
parameter.
¡Gracias por tus comentarios!
Team 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.
- Write a constructor with 4 parameters:
name
,sport
,yearFounded
, andcity
. - Initialize the
name
field with the value of thename
parameter. - Initialize the
sport
field with the value of thesport
parameter. - Initialize the
yearFounded
field with the value of theyearFounded
parameter. - Initialize the
city
field with the value of thecity
parameter.
¡Gracias por tus comentarios!
Team 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.
- Write a constructor with 4 parameters:
name
,sport
,yearFounded
, andcity
. - Initialize the
name
field with the value of thename
parameter. - Initialize the
sport
field with the value of thesport
parameter. - Initialize the
yearFounded
field with the value of theyearFounded
parameter. - Initialize the
city
field with the value of thecity
parameter.
¡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.
- Write a constructor with 4 parameters:
name
,sport
,yearFounded
, andcity
. - Initialize the
name
field with the value of thename
parameter. - Initialize the
sport
field with the value of thesport
parameter. - Initialize the
yearFounded
field with the value of theyearFounded
parameter. - Initialize the
city
field with the value of thecity
parameter.