Sit down with and write out how you would do this. This is your algorithm. Then translate this to code. Use the API to guide and provide you methods you can use, for instance, String (Java Platform...