mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-06 00:54:32 +08:00
Remove 'main', add tests in TurkishToLatinConversion
(#5944)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user