Completed Problem 8 (In Java...C++ Later)