No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
the assignment is on [url]http://cs.ahsweb.org/text/LessonA10/Lab-[/url]... Below is what I wrote. It doesn't work. please help to correct if you can. package StringLab; public class StringUtil { public static String reverse(String str) { if (str.length() == 1) str.charAt(1); return reverse(str.substring(1) + str.charAt(0)); } public static boolean palindrome(String str) { String str2; … |
|
I tried to run it, but nothing turned out. Can someone help? import gpdraw.DrawingTool; import gpdraw.SketchPad; public class KochCurve { private DrawingTool pen; private SketchPad paper; public KochCurve(){ paper = new SketchPad(500,500); pen = new DrawingTool(paper); } public void draw(int level, int length) { if (level < 1) pen.forward(length); else … |