In this tutorial, we will learn how to create an interface in the Raptor flowchart. An interface is a specification of abstract method signatures and constants. A class that implements the interface should provide implementations for the methods that are specified in the interface declaration.
An interface would only have method declarations. The actual implementation of the methods is up-to-the Class that implements the interface. This will allow more implementations and customization of the interface capabilities.
For example, iAccount is an interface with methods deposit() and withdraw(). The interface doesn’t contain the method implementations.
SavingAccount is the class that implements the interface. SavingAccount class needs to provide the implementations for the methods deposit() and withdraw().
Many classes can implement the same interface. For example, another class called CheckingAccount can implement the iAccount interface but may provide different implementations for the methods in the interface.
Sample UML Diagram
Steps to create an Interface
- Launch the Raptor tool.
- Enable UML mode.
- Switch to UML mode.
- Click on the ‘Add new Interface’ button.
- Select the interface and add details about it.
- To add method signatures, Click >> Edit members.
Members in an Interface
Variables in the interface are static and final.
Methods are abstract.
Raptor Tutorials on this website can be found at:
RAPTOR official website: https://raptor.martincarlisle.com/