Added Java and C++ calculation examples