Creating UML Class Diagram for password check
<p>I am trying to create UML Class Diagram for this problem: So, user is prompted to enter a password. It's a 9 digit number. System receives passwords and checks if it's correct or not by looking into database which has correct password stored inside. If the password is correct, System needs to show message "Correct". Otherwise, message "Error" is shown. If the user enters wrong password more than 5 times in a row, then System stops showing messages.</p>

<p>I have 4 classes here, right? User, System, Database, Counter</p>

<pre><code>  ┌─────────────────────────┬
  │  User                   │
  ├─────────────────────────┬
  │- pass: int              |
  ├─────────────────────────┼
  |+ EnterPass()            | 
  ├─────────────────────────┼
          | *
          |
          |
          |
          |
          | 1
  ┌─────────────────────────┬
  │  System                 │
  ├─────────────────────────┬
  │                         |
  ├─────────────────────────┼
  |+ CheckPass()            |
  |+ ShowSuccess()          | 
  |+ ShowError()            |
  |+ ShowNothing()          |
  |+ ChangeCategory()       |
  ├─────────────────────────┼
          | 1
          |
          |
          |
          |
          | 1
  ┌─────────────────────────┬
  │  Database               │
  ├─────────────────────────┬
  │- CorrectPass: int       |
  ├─────────────────────────┼
  |+ ValidatePass(): bool   |
  |+ Increment1()           | 
  ├─────────────────────────┼
          | 1
          |
          |
          |
          |
          | 1
  ┌─────────────────────────┬
  │  Counter                │
  ├─────────────────────────┬
  │- CounterState: int      |
  ├─────────────────────────┼
  |+ increment()            |
  |+ GetState(): int        | 
  ├─────────────────────────┼
</code></pre>

<p>Can someone tell me if this is correct? I am not quite sure if I should connect Counter and System somehow? Is there anything I should add?</p>