Challenge: Overloaded Movie Class
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 4
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Großartig!
Completion Rate verbessert auf 4.17
Challenge: Overloaded Movie Class
Swipe um das Menü anzuzeigen
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 4
single