Wednesday 5 July 2023

PlantUML: Define abstract class

‘abstract’ keyword is used to define abstract class.

 

Example

abstract class AbstractList{
	# int modCount	
}

 

abstractClass.txt

@startuml

interface List{
	+ int size()
	+ void clear()
}

abstract class AbstractList{
	# int modCount	
}
class ArrayList
class LinkedList
class Serializable

enum TimeUnit {
	DAYS
	HOURS
	MINUTES
}

List <|.. AbstractList 
AbstractList <|-- ArrayList
AbstractList <|-- LinkedList
Serializable <|.. ArrayList
Serializable <|.. LinkedList

@enduml

 

Above snippet generate below diagram.



 


Previous                                                    Next                                                    Home

No comments:

Post a Comment