#include "classes_and_objects.hpp" namespace oop { BankAccount::BankAccount(std::string owner, const double balance) : owner_(std::move(owner)), balance_(balance) {} auto BankAccount::owner() const -> const std::string& { return owner_; } auto BankAccount::balance() const -> double { return balance_; } void BankAccount::deposit(const double amount) { this->balance_ += amount; } auto BankAccount::withdraw(const double amount) -> bool { if (this->balance_ >= amount) { this->balance_ -= amount; return true; } return false; } } // namespace oop