Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion 14_R6.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,12 @@ BankAccountStrict2 <- R6Class(
)
```

To test our new class, we create an instance and try to go into overdraft.
To test our new class, we create an instance and try to directly set the account balance and try to go into overdraft.

```{r, error = TRUE}
my_account_strict_2 <- BankAccountStrict2$new()

my_account_strict_2$balance <- 10
my_account_strict_2$deposit(5)
my_account_strict_2$withdraw(10)
```
Expand Down