Challenge: Overloaded Movie Class
Tarefa
Swipe to start coding
Create a Movie class that supports multiple ways to initialize its fields using overloaded constructors.
- The class must have a default constructor that sets the
Titleto"Unknown"andReleaseYearto0. - The class must have a constructor that takes a
titleparameter and setsTitleto the given value andReleaseYearto0. - The class must have a constructor that takes both a
titleand areleaseYear, and sets the fields accordingly.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 4
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 an example?
Incrível!
Completion taxa melhorada para 4.17
Challenge: Overloaded Movie Class
Deslize para mostrar o menu
Tarefa
Swipe to start coding
Create a Movie class that supports multiple ways to initialize its fields using overloaded constructors.
- The class must have a default constructor that sets the
Titleto"Unknown"andReleaseYearto0. - The class must have a constructor that takes a
titleparameter and setsTitleto the given value andReleaseYearto0. - The class must have a constructor that takes both a
titleand areleaseYear, and sets the fields accordingly.
Solução
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 4
single