Find Jobs
Hire Freelancers

Create, compile and test Java function to translate String letter by letter

$10-30 AUD

Imekamilika
Imechapishwa about 4 years ago

$10-30 AUD

Kulipwa wakati wa kufikishwa
I need you to create a function in Java translate_string(), which is doing "translation" of the string letter by letter. Function takes String as arg, and returns array of String[]: public static String[] translate_string(String string) Given existing function translate_letter(), which takes String as arg and returns array of String[] public static String[] translate_letter(String letter) and it translating each letter, you need to sequentially translate the whole string letter by letter into combination of output strings. Complexity is, that one character could be translated to multiple sets of characters, it is not one-to-one relationship between input string and output string, it is - one-to-many relationship, where one letter as input could produce multiple combinations (i.e. arrays) as output. N.B.: Term translation has nothing to do with actual translation from one language to another, it is just substitution of one character to set of other characters. Below is exact code id simplified version of function translate_letter() (no modification is required): //------------------------------------------------------------ // translate letters - return array of diff combinations public static String[] translate_letter(String s) { ArrayList<String> o = new ArrayList<>(1); if ( [login to view URL]("a") ) { // if a [login to view URL]("a1"); } else { if ( [login to view URL]("b") ) { // if b [login to view URL]("b1"); [login to view URL]("b2"); } else { if ( [login to view URL]("c") ) { // if c [login to view URL]("c1"); [login to view URL]("c2"); [login to view URL]("c3"); } else { if ( [login to view URL]("d") ) { // if d [login to view URL]("d1"); [login to view URL]("d2"); [login to view URL]("d3"); [login to view URL]("d4"); } else { [login to view URL](s); // s = def add (if nothing above matches) } // end if d } // end if c } // end if b } // end if a //Convert ArrayList o to string array[] String[] array = [login to view URL](new String[[login to view URL]()]); return array; } // end translate_letter() //------------------------------------------------------------ So, how to translate? Let's have a look at simple version of translate - when translate_letter() return just string. So, letter "a" will be translated to "a1", letter "b" will be translated to "b1", "c" - to "c1". Input string "a" will be translated as "a1", simple. Input string "ab" will be translated as "a1b1", simple. Input string "abc" will be translated as "a1b1c1", simple. I don't need to create this simple version - it is nothing to do here. What I need you to write - is complicated version of translate_string(), when function translate_letter() returns multiple combinations, i.e. - array of output combinations. For example (according to the code of translate_letter() above, letter "a" will be translated to "a1", simple. But letter "b" will be translated by translate_letter() to 2 combinations: "b1" and "b2", and output is String[] array = {"b1", "b2" } So, string "a" will be translated by translate_string() as array of just 1 element R[] = { "a1" } String "ab" will be translated as array of 2 elements R[] = { "a1b1", "a1b2" } String "abc" will be translated as: R[] = { "a1b1c1", "a1b1c2", "a1b1c3", "a1b2c1", "a1b2c2", "a1b2c3" } String "db" will be translated as: R[] = { "d1b1", "d2b1", "d3b1", "d4b1" } Note, that actual sequence of individual You can use any data structure, supported by Java 11 and below - Array, 2-dimensional array, ArrayList, Vector, Hash, Map, Tree, Trie, etc, as soon as it is doing the correct translation. Preferable - use ArrayList as data structure, but it could be any, but code needs to be documented to explain what all major steps are doing.
Kitambulisho cha mradi: 24492821

Kuhusu mradi

20 mapendekezo
Mradi wa mbali
Inatumika 4 yrs ago

Unatafuta kupata pesa?

Faida za kutoa zabuni kwenye Freelancer

Weka bajeti yako na muda uliopangwa
Pata malipo kwa kazi yako
Eleza pendekezo lako
Ni bure kujiandikisha na kutoa zabuni kwa kazi
Imetolewa kwa:
Picha ya Mtumiaji
I can do this.
$50 AUD ndani ya siku 1
5.0 (6 hakiki)
3.2
3.2
20 wafanyakazi huru wana zabuni kwa wastani $32 AUD kwa kazi hii
Picha ya Mtumiaji
HI..I am proficient in core Java OO programming and can clearly understood the algorithm behind the implementation of translate_string(String s) using given translator_letter() as per posted explanations and can help you write the function and its sample usage in a program.
$70 AUD ndani ya siku 1
4.9 (218 hakiki)
6.6
6.6
Picha ya Mtumiaji
Hello, warm greetings! I am a Java developer working on Java technology since 7+ years having hands on windows and web development experience. I would like to help in your application development. It would be better if you can share more details about it if you are interested. Please message me to discuss more about the requirements. looking for your positive response. Thanks Namit
$40 AUD ndani ya siku 7
4.9 (59 hakiki)
5.4
5.4
Picha ya Mtumiaji
Hello, I am an independent, experienced java expert. I can help with this task with a quick turn-around. Looking to hearing from you. Kind regards Rina B.
$30 AUD ndani ya siku 1
5.0 (9 hakiki)
3.7
3.7
Picha ya Mtumiaji
Hello, ⭐⭐⭐⭐⭐ i am interested in this project , can begin now waiting your answer on chat Regards ⭐⭐⭐⭐⭐
$30 AUD ndani ya siku 1
5.0 (11 hakiki)
3.8
3.8
Picha ya Mtumiaji
I can do this project for you. Let's discuss more details in private. Looking forward to working with you!
$30 AUD ndani ya siku 4
5.0 (16 hakiki)
3.7
3.7
Picha ya Mtumiaji
I checked your project carefully. I have a great interest in your project. I have lots of experience in your project. I'm sure of completing your project in the shortest time with a high quality. If you hire me, then your project will be completed more successfully
$10 AUD ndani ya siku 1
4.8 (21 hakiki)
4.1
4.1
Picha ya Mtumiaji
Greetings Sir, I am Muhammad Faisal and i am a professional Java Developer having almost 5 years of experience and we provide you quality work within your budget and time duration so, lets get started ? Thanks
$20 AUD ndani ya siku 7
4.9 (17 hakiki)
3.5
3.5
Picha ya Mtumiaji
Do you need the resulting strings in any order? Is there any worst-case running time constraint? I can do it straight away. It will take me just a few hours. If you do have some examples (to use for unit tests), that would be great.
$20 AUD ndani ya siku 7
5.0 (7 hakiki)
3.6
3.6
Picha ya Mtumiaji
Hello Sir/Madam I'm Sun Certified Java Programmer. I have development experience in Java Technologies, OOP, Data Structures, Database Driven applications, APIs, Files and Data Transformation, ETL and various frameworks. I can help implement awesome Java desktop (Console, Swing, JavaFX), Web (JEE, Spring) and Android (Java, Kotlin) application. Contact me with details to get started. I assure you an excellent solution of your project within the time frame and exactly according to the requirements. Thanks @CodingHelpLine
$25 AUD ndani ya siku 1
5.0 (15 hakiki)
3.0
3.0
Picha ya Mtumiaji
Can be done in a day
$25 AUD ndani ya siku 1
5.0 (3 hakiki)
2.4
2.4
Picha ya Mtumiaji
hi.... having expertise in Java with 5+ years of experience, I assure you to complete your project within 2 days time. ping me to discuss further
$83 AUD ndani ya siku 2
0.0 (0 hakiki)
0.0
0.0
Picha ya Mtumiaji
Hi In fact, I think I am quite suitable for the compilation of this demo. I can write reasonable functions using Java, and I can do a very good job in code specification and comments. In terms of data structure design, I think I can also efficiently implement this function.
$15 AUD ndani ya siku 7
0.0 (0 hakiki)
0.0
0.0
Picha ya Mtumiaji
Hey! I can have it done quickly, to be honest it looks like an University assignment. Hope the price is OK for you, thanks in advance :)
$20 AUD ndani ya siku 1
0.0 (0 hakiki)
0.0
0.0
Picha ya Mtumiaji
I am having 7. 5 years of experience on java development. I can help you on this requirement. Thank You
$30 AUD ndani ya siku 7
0.0 (0 hakiki)
0.0
0.0
Picha ya Mtumiaji
I have sufficient experience and am an expert in writing Java codes that solve problems. I am versed and versatile in using ArrayLists to solve logical problems like this. Give me a chance to prove myself.
$25 AUD ndani ya siku 4
0.0 (0 hakiki)
0.0
0.0

Kuhusu mteja

Bedera ya AUSTRALIA
Glenfield, Australia
5.0
6
Njia ya malipo imethibitishwa
Mwanachama tangu Okt 31, 2016

Uthibitishaji wa Mteja

Asante! Tumekutumia kiungo cha kudai mkopo wako bila malipo kwa barua pepe.
Hitilafu fulani imetokea wakati wa kutuma barua pepe yako. Tafadhali jaribu tena.
Watumiaji Waliosajiliwa Jumla ya Kazi Zilizochapishwa
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Onyesho la kukagua linapakia
Ruhusa imetolewa kwa Uwekaji wa Kijiografia.
Muda wako wa kuingia umeisha na umetoka nje. Tafadhali ingia tena.