list of dots University of Ottawa logo / Université d'Ottawa

User Manual    [Previous]   [Next]   


Requirements allow for the same comment to appear in different sections of the code without typing out the comment multiple times.

They consist of two components: the requirement definition, which contains the comment statement to be added, and the requirement implementation, which specifies where the requirement statement should be added.

Multiple requirements can be called through an implementsReq statement.


req R01 {
  This is a comment we would like to add
  multiple times in different locations.

  The identifier used for this requirement is

req R02 {
  This is a second requirement statement.

implementsReq R01;
class Example {
  implementsReq R02;
  var2; implementsReq R01, R02;

Load the above code into UmpleOnline