Commits

Anonymous committed dccafcf

fixed compilation error introduced from renaming

  • Participants
  • Parent commits 8098978

Comments (0)

Files changed (1)

File src/TelephoneWords.java

  * @author Absolute Noob
  *
  */
-public class Phone2Words {
+public class TelephoneWords {
 
 	private static final char[] TWO_CHARACTERS = { 'A', 'B', 'C' };
 	private static final char[] THREE_CHARACTERS = { 'D', 'E', 'F' };
 			result = '1';
 			break;
 		case 2:
-			result = Phone2Words.TWO_CHARACTERS[place];
+			result = TelephoneWords.TWO_CHARACTERS[place];
 			break;
 		case 3:
-			result = Phone2Words.THREE_CHARACTERS[place];
+			result = TelephoneWords.THREE_CHARACTERS[place];
 			break;
 		case 4:
-			result = Phone2Words.FOUR_CHARACTERS[place];
+			result = TelephoneWords.FOUR_CHARACTERS[place];
 			break;
 		case 5:
-			result = Phone2Words.FIVE_CHARACTERS[place];
+			result = TelephoneWords.FIVE_CHARACTERS[place];
 			break;
 		case 6:
-			result = Phone2Words.SIX_CHARACTERS[place];
+			result = TelephoneWords.SIX_CHARACTERS[place];
 			break;
 		case 7:
-			result = Phone2Words.SEVEN_CHARACTERS[place];
+			result = TelephoneWords.SEVEN_CHARACTERS[place];
 			break;
 		case 8:
-			result = Phone2Words.EIGHT_CHARACTERS[place];
+			result = TelephoneWords.EIGHT_CHARACTERS[place];
 			break;
 		case 9:
-			result = Phone2Words.NINE_CHARACTERS[place];
+			result = TelephoneWords.NINE_CHARACTERS[place];
 			break;
 		default:
 			result = '?';
 		char c;
 		// process 1st number
 		if (input.isEmpty()) {
-			if (Phone2Words.isOneOrZero(numberToProcess)) {
-				c = Phone2Words.getCharKey(numberToProcess, 0);
+			if (TelephoneWords.isOneOrZero(numberToProcess)) {
+				c = TelephoneWords.getCharKey(numberToProcess, 0);
 				output.add(Character.toString(c));
 			} else {
 				for (int i = 0; i < 3; i++) {
-					c = Phone2Words.getCharKey(numberToProcess, i);
+					c = TelephoneWords.getCharKey(numberToProcess, i);
 					output.add(Character.toString(c));
 				}
 			}
 		} else { // process rest of the number
 			for (String result : input) {
-				if (Phone2Words.isOneOrZero(numberToProcess)) {
-					c = Phone2Words.getCharKey(numberToProcess, 0);
+				if (TelephoneWords.isOneOrZero(numberToProcess)) {
+					c = TelephoneWords.getCharKey(numberToProcess, 0);
 					output.add(result.concat(Character.toString(c)));
 				} else {
 					for (int i = 0; i < 3; i++) {
-						c = Phone2Words
+						c = TelephoneWords
 								.getCharKey(numberToProcess, i);
 						output.add(result.concat(Character
 								.toString(c)));
 		ArrayList<String> result = new ArrayList<String>();
 
 		for (int i = 0; i < phoneNum.length; i++) {
-			result = Phone2Words
+			result = TelephoneWords
 					.processOneNumber(result, phoneNum, i);
 		}
 		return result;
 		int[] phoneNumber = { 2, 3, 7, 8, 2, 8, 9 }; // best buy
 		String expectedResult = "BESTBUY";
 
-		ArrayList<String> result = Phone2Words
+		ArrayList<String> result = TelephoneWords
 				.telephoneWords(phoneNumber);
 
 		int i = 1;
 		}
 
 		char[] output = new char[phoneNumber.length];
-		Phone2Words.telephoneWordsRecursive(phoneNumber, 0, output);
+		TelephoneWords.telephoneWordsRecursive(phoneNumber, 0, output);
 	}
 
 }