In this post, we will learn RAPTOR Object-oriented mode by creating a class and invoking it in the main flow chart. We will create a simple plain object called Messenger. It stores a string message and returns when invoked by a getter method. OO version of the RAPTOR flowchart uses NClass code.
NClass is a free UML class diagram tool. To know more about the tool, visit:
Steps for creating a class
Switch to Object-oriented mode.
Go to the UML tab
In the UML tab, you can create a class.
Create a class for example Messenger.
Right Click, New >> Class
Give the name of the class Messenger.
Add a new field called message.
Add a getter method getMessage()
Add a constructor for the class Messenger. This method is invoked when we create the object in the main flow chart.
Design the main flow chart.
Create a variable that stores the message.
Create an object for the class Messenger.
Pass the variable to the constructor of the class.
Output the information from the object getter method.
Run and check the output of the flow chart.