- 1

Can anyone help me with this...I m a beginner

Kabir (2021) develops a data encryption algorithm recently, with the following features: A data to be sent along across a network is taken as a single string. However, the minimum number of characters in a string has to be three (3) The string is then divided into two roughly equal substrings, A and B. Each of the substrings A and B are then encoded in a reverse order. To further encrypt the string data, vowels in the substrings are encoded as follows: Vowel Encoding Number a 1 e 5 i 3 o 2 u 4 To send the original string data from its source, the encrypted substrings A and B are concatenated with A coming after B. At the receiving end, Steps (ii) and (iii) are repeated on the sent encrypted string, in order to decrypt it. All the encoding numbers in Step (iv) are converted to their respective characters in the received string. Task: Implement a java / C# Program named Encrypt for the PQR’s encrypting algorithm.

6th May 2021, 12:10 AM
Nicholas O. Oha
Nicholas O. Oha - avatar
4 odpowiedzi
+ 2
Okay, that’s fine. The first thing to do is make sure you completly understand the requirements. This is an algorithm and you need to be able to do this even without programming. In this case, step 1 is to accept a string that’s at least 3 characters long. Let’s say: “I enjoy programming” Divide that string in half. First half is A, second half is B. In programming terms, you do that by calculating the length and dividing that by 2. Then assign the halves accordingly. Do that part in the language you’re trying to use. Show us that code. The we’ll worry about the next parts. When you got that done, reverse the strings. Once you’ve done that, you can do the encoding substitutions as described. Programming is about breaking down the steps and solving each step one at a time. If you have no idea how to do any of this, then take the course first and learn about the language first, then come back to the problem. Again, build the program step by step.
6th May 2021, 1:42 AM
Jerry Hobby
Jerry Hobby - avatar
+ 1
This sounds a lot like a homework assignment, which we won’t do for you. If you will write your attempt and explain where you are having trouble, we’ll be happy to help you fix the problem. But we won’t code the solution for you.
6th May 2021, 1:13 AM
Jerry Hobby
Jerry Hobby - avatar
+ 1
First think about the methods you need, like string encode(string text) and string decode(string text) that can solve a specific small subtask. Create some example strings and find their encoded strings for testing. That will probably also give you a good idea how to program those methods. The encoding steps in the description also provide guidance.
6th May 2021, 1:36 AM
Benjamin Jürgens
Benjamin Jürgens - avatar
0
Well it's to be practiced and I am like lost. No prior background
6th May 2021, 1:21 AM
Nicholas O. Oha
Nicholas O. Oha - avatar