From d8d5d0fa61e2a7ed2aadb9fb1e5167c984bf5d36 Mon Sep 17 00:00:00 2001 From: Louis Frament Date: Tue, 29 Oct 2019 17:50:19 +0100 Subject: [PATCH] update classDiagram documentation: fix typos and describe naming convention --- docs/classDiagram.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/classDiagram.md b/docs/classDiagram.md index 39f98146a..057618d4a 100644 --- a/docs/classDiagram.md +++ b/docs/classDiagram.md @@ -44,7 +44,7 @@ Mermaid can render class diagrams. +String beakColor +swim() +quack() - } + } class Fish{ -int sizeInFeet -canEat() @@ -69,7 +69,7 @@ A single instance of a class in the diagram contains three compartments: ``` classDiagram class BankAccount - BankAccount : +String onwer + BankAccount : +String owner BankAccount : +Bigdecimal balance BankAccount : +deposit(amount) BankAccount : +withdrawl(amount) @@ -77,7 +77,7 @@ classDiagram ```mermaid classDiagram class BankAccount - BankAccount : +String onwer + BankAccount : +String owner BankAccount : +BigDecimal balance BankAccount : +deposit(amount) BankAccount : +withdrawl(amount) @@ -98,6 +98,9 @@ classDiagram class Animal Vehicle <|-- Car ``` + +Naming convention: a class name should be composed of alphanumeric (unicode allowed) and underscore characters. + ## Defining Members of a class UML provides mechanisms to represent class members, such as attributes and methods, and additional information about them. @@ -117,7 +120,7 @@ There are two ways to define the members of a class, and regardless of the which ``` class BankAccount - BankAccount : +String onwer + BankAccount : +String owner BankAccount : +BigDecimal balance BankAccount : +deposit(amount) BankAccount : +withdrawl(amount) @@ -125,7 +128,7 @@ There are two ways to define the members of a class, and regardless of the which ```mermaid classDiagram class BankAccount - BankAccount : +String onwer + BankAccount : +String owner BankAccount : +BigDecimal balance BankAccount : +deposit(amount) BankAccount : +withdrawl(amount) @@ -134,7 +137,7 @@ There are two ways to define the members of a class, and regardless of the which - Associate members of a class using **{}** brackets, where members are grouped within curly brackets. Suitable for defining multiple members at once. For example: ``` class BankAccount{ - +String onwer + +String owner +BigDecimal balance +deposit(amount) +withdrawl(amount) @@ -143,7 +146,7 @@ class BankAccount{ ```mermaid classDiagram class BankAccount{ - +String onwer + +String owner +BigDecimal balance +deposit(amount) +withdrawl(amount)