Conteúdo do Curso
C++ OOP
C++ OOP
Access and Mutator Practice
Swipe to show code editor
- Finish an implementation of a class called Vault that simulates a secure vault for storing a message with a password.
- Implement the get_message() method that should return the stored message if the provided password matches the vault's password otherwise return an empty string or some suitable indication.
- Implement the set_message() method, which takes two parameters, a new message and the current password. This method should allow changing the message only if the current password matches the vault's password.
- Implement the set_password() method that takes two parameters, a new password and the old password. It should change the vault's password to the new one if the old password matches the current password.
Obrigado pelo seu feedback!
Access and Mutator Practice
Swipe to show code editor
- Finish an implementation of a class called Vault that simulates a secure vault for storing a message with a password.
- Implement the get_message() method that should return the stored message if the provided password matches the vault's password otherwise return an empty string or some suitable indication.
- Implement the set_message() method, which takes two parameters, a new message and the current password. This method should allow changing the message only if the current password matches the vault's password.
- Implement the set_password() method that takes two parameters, a new password and the old password. It should change the vault's password to the new one if the old password matches the current password.
Obrigado pelo seu feedback!
Access and Mutator Practice
Swipe to show code editor
- Finish an implementation of a class called Vault that simulates a secure vault for storing a message with a password.
- Implement the get_message() method that should return the stored message if the provided password matches the vault's password otherwise return an empty string or some suitable indication.
- Implement the set_message() method, which takes two parameters, a new message and the current password. This method should allow changing the message only if the current password matches the vault's password.
- Implement the set_password() method that takes two parameters, a new password and the old password. It should change the vault's password to the new one if the old password matches the current password.
Obrigado pelo seu feedback!
Swipe to show code editor
- Finish an implementation of a class called Vault that simulates a secure vault for storing a message with a password.
- Implement the get_message() method that should return the stored message if the provided password matches the vault's password otherwise return an empty string or some suitable indication.
- Implement the set_message() method, which takes two parameters, a new message and the current password. This method should allow changing the message only if the current password matches the vault's password.
- Implement the set_password() method that takes two parameters, a new password and the old password. It should change the vault's password to the new one if the old password matches the current password.