The ReactiveCalculator project

So, let's start with an event with the user input. Go through the following example:

    fun main(args: Array<String>) { 
      println("Initial Out put with a = 15, b = 10") 
      var calculator:ReactiveCalculator = ReactiveCalculator(15,10) 
      println("Enter a = <number> or b = <number> in separate      lines\nexit to exit the program") 
      var line:String? 
      do { 
        line = readLine(); 
      } while (line!= null && !line.toLowerCase().contains("exit")) 

If you run the code, you'll get the following output:

In the main method, we are not doing much operation except for just listening to the input and passing it to the ...

Get Reactive Programming in Kotlin now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.