Homework 5 - /1. public void displayRowOfCharacters(char...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
//1. public void displayRowOfCharacters( char givenSymbol, int Number){ if (Number > 1) { displayRowOfCharacters(givenSymbol, Number - 1); } } // 2. public void DrawCircle( int diameter, somePoint ){ if (diameter > 1){ DrawCircle(0.75 * diameter, somePoint); } } // 3. public void IntegersEnter(){ Scanner scan = new Scanner(System.in); int someInt = scan.nextInt(); if IntegersEnter(); else System.out.println( "Values:" + integer); } // 4. public int Factorial( int number){ if (number > 1) return (number * factorial(number-1)); else return 1; } // 5. public void DisplayArrayBack( int Array[], int first, int last){ if (first <= last){ System.out.pringln(array[last]); DisplayArrayBack(Array, first, last - 1); } } // 6. public void DisplayArrayBack2( int Array[], int first, int last){ if (first <= last){ DisplayArrayBack(Array, first + 1, last); System.out.pringln(array[first]); } } // 7.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
public void DisplayStringBack(String someString){ if (someString.length() == 1){
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/23/2012 for the course CS 111C taught by Professor Metzler during the Spring '11 term at City College of San Francisco.

Page1 / 3

Homework 5 - /1. public void displayRowOfCharacters(char...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online