So basically, you have to write a calculator, and you don't want to do the "difficult bit" that you might learn something useful from?
You could try this:
java - How to evaluate a math expression given in string form? - Stack Overflow[
^]
But ... be aware that not only will you learn nothing useful from this assignment, but you will almost certainly get a poor grade as well: teachers can tell when you copy'n'paste a solution instead of "rolling your own" ...
I'd strongly suggest that you look at writing a parser to check the expression syntax and build an execution tree or RPN stack while it's doing it for evaluation when it's shown to be valid. Then execute the tree / stack to produce your result. You will learn a whole load more about how to do things, and if your aim is to become and advanced Java programmer as you said two weeks ago then you need to actually practice writing code:
Can you please list me all the necessary things I should learn in android , to become an advanced or atleast good with building android apps ?[
^]
Juist grabbing somebody else's code, finding it doesn't work in your app for some reason, and abandoning it isn't a good way to get anywhere towards that goal.