Challenge: Team Constructor
Tarefa
Swipe to start coding
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
namefield with the value of thenameparameter. - Initialize the
sportfield with the value of thesportparameter. - Initialize the
yearFoundedfield with the value of theyearFoundedparameter. - Initialize the
cityfield with the value of thecityparameter.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 7
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Incrível!
Completion taxa melhorada para 3.57
Challenge: Team Constructor
Deslize para mostrar o menu
Tarefa
Swipe to start coding
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
namefield with the value of thenameparameter. - Initialize the
sportfield with the value of thesportparameter. - Initialize the
yearFoundedfield with the value of theyearFoundedparameter. - Initialize the
cityfield with the value of thecityparameter.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 7
single