Solved: 20 - Classes and Objects

This commit is contained in:
2026-08-15 17:43:30 +03:00
parent 8b82257ed6
commit 564cc1b765
3 changed files with 14 additions and 9 deletions
@@ -11,8 +11,8 @@ public:
[[nodiscard]] auto owner() const -> const std::string&;
[[nodiscard]] auto balance() const -> double;
void deposit(double amount);
auto withdraw(double amount) -> bool;
void deposit(double amount) pre(amount > 0);
auto withdraw(double amount) -> bool pre(amount > 0);
private:
std::string owner_;