AP Notes, Outlines, Study Guides, Vocabulary, Practice Exams and more!

Subroutines

KochCurve code

Subject: 
Rating: 
0
No votes yet

import gpdraw.*; public class KochCurve { private DrawingTool marker; private SketchPad poster; public KochCurve(){ poster = new SketchPad(600,600); marker = new DrawingTool(poster); } public void drawKochCurve(int x, int y){ if (x < 1){ marker.forward(y); } else{ drawKochCurve(x - 1, y / 3); marker.turnLeft(60); drawKochCurve(x - 1, y / 3); marker.turnRight(120); drawKochCurve(x - 1, y / 3); marker.turnLeft(60); drawKochCurve(x - 1, y / 3); } } public void drawSnowflake(int x , int y){ if (x < 1){ marker.forward(y); } else{ marker.turnRight(90); drawKochCurve(x,y); marker.turnRight(120); drawKochCurve(x,y);

Computer Sience A.P. Roman-Arabic converter (Java Project Filie)

Subject: 
Rating: 
0
No votes yet
SocialTags: 

import java.util.Scanner; public class romannumerals{ private static int ArabicNumber = 0; public static String rom= ""; public static boolean rnum; public static String RomanNumeral(String z){ int m = z.indexOf('M'); int d = z.indexOf('D'); int c = z.indexOf('C'); int l = z.indexOf('L'); int x = z.indexOf('X'); int v = z.indexOf('V'); int i = z.indexOf('I'); if (z.contains("M")){ String firstChar = z.substring(0, m + 1); String remainingstring = z.substring(m + 1, z.length()); ArabicNumber +=1000; RomanNumeral(remainingstring); } else if (z.contains("D")){ String firstChar = z.substring(0, d +1);
Subscribe to RSS - Subroutines

Need Help?

We hope your visit has been a productive one. If you're having any problems, or would like to give some feedback, we'd love to hear from you.

For general help, questions, and suggestions, try our dedicated support forums.

If you need to contact the Course-Notes.Org web experience team, please use our contact form.

Need Notes?

While we strive to provide the most comprehensive notes for as many high school textbooks as possible, there are certainly going to be some that we miss. Drop us a note and let us know which textbooks you need. Be sure to include which edition of the textbook you are using! If we see enough demand, we'll do whatever we can to get those notes up on the site for you!