Challenge: Team Constructor
Taak
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.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 7
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Geweldig!
Completion tarief verbeterd naar 3.57
Challenge: Team Constructor
Veeg om het menu te tonen
Taak
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.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 7
single