Challenge: Design a Contact Class
Tarefa
Swipe to start coding
Create a Contact class to represent a person's contact information for an address book application.
- The
Contactclass must have three private fields:name,phone, andemail. - You must implement a constructor that takes three parameters (name, phone, email) and assigns them to the corresponding private fields.
- Implement a public method named
GetNamethat returns the value of thenamefield. - Implement a public method named
GetPhonethat returns the value of thephonefield. - Implement a public method named
GetEmailthat returns the value of theemailfield.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 2. Capítulo 2
single
Pergunte à IA
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo
Suggested prompts:
Can you explain this in simpler terms?
What are the main takeaways from this?
Can you give me a real-world example?
Incrível!
Completion taxa melhorada para 4.17
Challenge: Design a Contact Class
Deslize para mostrar o menu
Tarefa
Swipe to start coding
Create a Contact class to represent a person's contact information for an address book application.
- The
Contactclass must have three private fields:name,phone, andemail. - You must implement a constructor that takes three parameters (name, phone, email) and assigns them to the corresponding private fields.
- Implement a public method named
GetNamethat returns the value of thenamefield. - Implement a public method named
GetPhonethat returns the value of thephonefield. - Implement a public method named
GetEmailthat returns the value of theemailfield.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 2. Capítulo 2
single