import StringComputer; // We'll compute with strings import rebelsky.io.SimpleInput; // We'll read strings import rebelsky.io.SimpleOutput;// We'll write strings /** * Manipulate a string in a few different ways. */ public class StringStuff { public static void main(String[] args) { // A string the user inputs String str; // Something for reading input SimpleInput in = new SimpleInput(); // Something for writing output SimpleOutput out = new SimpleOutput(); // Something that can manipulate strings StringManipulator manip = new StringManipulator(); // Get a string out.print("Enter a string: "); str = in.readLine(); // Print out various modified versions of that string out.println("Doubled: " + manip.duplicate(str)); out.println("Reversed: " + manip.reverse(str)); // Repeatedly remove the first element until we run out of // letters. while (!str.equals("")) { out.println(str); str = manip.deleteFirst(str); } // while } // main(String[]) } // StringStuff