Contenido del Curso
C++ OOP
C++ OOP
Constructor Delegation Practice
Tarea
- Rewrite this constructors using constructor delegation.
- The default constructor should delegate to a parameterized constructor, passing default values.
- The constructor that initializes only the name should delegate to the parameterized constructor, passing default values for the other members.
- The constructor that initializes name and age should delegate to the parameterized constructor, providing a default value only for salary.
- The constructor that initializes all member variables remains unchanged.
Tarea
- Rewrite this constructors using constructor delegation.
- The default constructor should delegate to a parameterized constructor, passing default values.
- The constructor that initializes only the name should delegate to the parameterized constructor, passing default values for the other members.
- The constructor that initializes name and age should delegate to the parameterized constructor, providing a default value only for salary.
- The constructor that initializes all member variables remains unchanged.
¿Todo estuvo claro?
Constructor Delegation Practice
Tarea
- Rewrite this constructors using constructor delegation.
- The default constructor should delegate to a parameterized constructor, passing default values.
- The constructor that initializes only the name should delegate to the parameterized constructor, passing default values for the other members.
- The constructor that initializes name and age should delegate to the parameterized constructor, providing a default value only for salary.
- The constructor that initializes all member variables remains unchanged.
Tarea
- Rewrite this constructors using constructor delegation.
- The default constructor should delegate to a parameterized constructor, passing default values.
- The constructor that initializes only the name should delegate to the parameterized constructor, passing default values for the other members.
- The constructor that initializes name and age should delegate to the parameterized constructor, providing a default value only for salary.
- The constructor that initializes all member variables remains unchanged.
¿Todo estuvo claro?
Constructor Delegation Practice
Tarea
- Rewrite this constructors using constructor delegation.
- The default constructor should delegate to a parameterized constructor, passing default values.
- The constructor that initializes only the name should delegate to the parameterized constructor, passing default values for the other members.
- The constructor that initializes name and age should delegate to the parameterized constructor, providing a default value only for salary.
- The constructor that initializes all member variables remains unchanged.
Tarea
- Rewrite this constructors using constructor delegation.
- The default constructor should delegate to a parameterized constructor, passing default values.
- The constructor that initializes only the name should delegate to the parameterized constructor, passing default values for the other members.
- The constructor that initializes name and age should delegate to the parameterized constructor, providing a default value only for salary.
- The constructor that initializes all member variables remains unchanged.
¿Todo estuvo claro?
Tarea
- Rewrite this constructors using constructor delegation.
- The default constructor should delegate to a parameterized constructor, passing default values.
- The constructor that initializes only the name should delegate to the parameterized constructor, passing default values for the other members.
- The constructor that initializes name and age should delegate to the parameterized constructor, providing a default value only for salary.
- The constructor that initializes all member variables remains unchanged.