Draw on the right, write (Umple) model code on the left. Analyse models and generate code. This tool stores your data in cookies and on a server. I understand. Click to learn about privacy. Download Donate For help: User manual Ask questions Report issue
// Simple example to demonstrate umple's template // base string generation mechanism. // In this approach iteration is embedded in the // rows template and there is a single emitter // function generated called result class MathExample { // A simple template to inject a platform // specific newline cr <> // A template for the header lines header <> times table!>> // A template that generates all the rows by // iterating rows <> <<=times>> times <<=i>> is <<=times*i>><<#}#>>!>> // Specification of a single method to emit // the result emit result(int times)(header, rows, cr); public static void main(String[] argv) { int times = 10; // default if(argv.length > 0) { times=Integer.parseInt(argv[0]); } // Output the entire result System.out.print( new MathExample().result(times)); } } //$?[End_of_model]$? // @@@skipcppcompile - Contains Java Code // @@@skipphpcompile - Contains Java Code // @@@skiprubycompile - Contains Java Code // @@@skippythoncompile - Contains Java Code