Create a function that calculates multiplication/division using addition and subtract
I have two functions
return a + b;
return a - b;
I need to create another function, let's call it calculate, a function that gets a string argument, something like this "4*5", or "9/3". The calculate function will have to use additions, the sum function respectively, in order to calculate the multiplication, and subtractions, the reduce function, in order to calculate the division.
Can some one please give me some hints on how to do this ??