Remove 'main', add tests in TurkishToLatinConversion (#5944)

This commit is contained in:
Hardik Pawar
2024-10-23 12:06:43 +05:30
committed by GitHub
parent d85f192421
commit 757d10c277
3 changed files with 36 additions and 15 deletions

View File

@ -1,7 +1,5 @@
package com.thealgorithms.conversions;
import java.util.Scanner;
/**
* Converts turkish character to latin character
*
@ -11,21 +9,12 @@ public final class TurkishToLatinConversion {
private TurkishToLatinConversion() {
}
/**
* Main method
*
* @param args Command line arguments
*/
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Input the string: ");
String b = sc.next();
System.out.println("Converted: " + convertTurkishToLatin(b));
sc.close();
}
/**
* This method converts a turkish character to latin character.
* Steps:
* 1. Define turkish characters and their corresponding latin characters
* 2. Replace all turkish characters with their corresponding latin characters
* 3. Return the converted string
*
* @param param String paramter
* @return String