graphic with four colored squares

Demo

ASCIIViolet

This is a program creates class diagram and sequence diagram by input words notation.

Class Diagram command

We use expression like > and . in order to do a command; great example are below

Class Diagram command cont.

We could also can add label on the edge by insert string in between the command:

Sequence Diagram command

we use the command: "className1"|"index1"->"className2"|"index2":"methodCall"

Techniques

Strategy Design1

Context:

SmartGraph

Strategy:

LayoutPlanner

ConreteStrategy:

ForceDirectedLayout

doWork:

refresh

Techniques

Strategy Design2

Context:

TextBar

Strategy:

Reader

ConreteStrategy:

ClassDiagramReader

doWork:

read

Techniques

Polymorphism

Reflection

I use reflection in Reader and LayoutPlanner interfaces to let them create the corresponding Strategy for a specific Context.

Design

Prorgram was built with Different Interface and layout

  • Interface: LayoutPlanner
  • We change the parent in ClassDigramGraph and SequenceDiagramGraph to SmartGraph. When a user add a node or connect an edge the graph will auto-rearrange the position of nodes and edges appropriately.

    Design

    Program was built with Different Interface and layout

  • Interface: SequenceLayout
  • The SequenceLayout will automatically arrange top nodes to the same Y coordinate and different X coordinates with a fixed interval between each two top nodes and arranges topnodes' callnodes to the same X coordinate as the topnodes' with a small interval between two adjacent callnodes.

    Design(continuation)

  • Interface: SequenceLayout
  • The SequenceLayout will automatically arrange top nodes to the same Y coordinate and different X coordinates with a fixed interval between each two top nodes and arranges topnodes' callnodes to the same X coordinate as the topnodes' with a small interval between two adjacent callnodes.

    We create a Reader that executes some commands to create a Graph. The get method takes Graph as a parameter to construct the corresponding reader and return it. There is read() method which will take a string as a parameter and create a new graph based on the string. Then the read method will return the new Graph to TextBar. And let it handle the graph.

    Design(continuationpt2)

    Sequence Diagram Command Model:

  • Interface: SequenceLayout
  • "className1"|"index1"->"className2"|"index2":"methodCall" The index after the '|' is the index of the method called on the timeline. Look at examples below for more explanation.The method call after the ':' is an optional parameter that will be placed above the connection line of the two nodes.

    Teamwork

    What helps

    Started the project early

    Communication(discussion)

    What can be better

    Work is not evenly distributed(We need a plan)

    Need frequent meet ups