title: Java Discrete Mathematics Composite Function
body: <p>Im having trouble in solving mathematical problem in discrete mathematics and I need to convert it into programming. The problem is all about composite function. I need to write a program that will calculate the given inputs by the user which are:</p>
  
  <pre><code>
  
  User input example
  f(x) = 3x + 5
  g(x) = x + 2
  
  Computation
  Replace the variable according to what is ask below
  solution
  
  Example #1
  (f o g)(x) = 3x + 5
                 You need to replace x of f with the equation in g(x)
                = 3(x+2)+5
                = 3x + 6 + 5
                = 3x + 11 //Final answer
  </code></pre>
  
  <p>What is the code to this problem ?</p>