Lesson 70 - Strings - Part 12 - Encode-Decode and Pattern Programs - Programming Logic 16

Опубликовано: 01 Январь 1970
на канале: JavaJourneyWithMadhavi
11
2

In this video, Encode, Decode program and Pattern program using Strings are explained in Java Environment

Link to the Book - Essentials of Computer Applications:
https://www.amazon.in/Essentials-Comp...

Practice Exercise

1. Write a program to decode the string by reading encoded string along with the number.
2. Rot13 (Rotate 13 positions) program is an encryption algorithm where letters are shifted 13 positions either backward or forward. The characters from a-m are shifted forward and the n-z are shifted backward. Write a program with two methods encode () and decode () using the ROT 13 logic
For example, “abc” is encoded as “nop” and “nop” is decoded as “abc”.
3. Write a program to accept a string. Count and output the number of double letter sequences in the string along with the words.
Input: She was feeding the little rabbit with an apple.
Double letter Sequence: 4
4. Read a Sentence and a word to find the frequency. Display the Frequency of the word in the given sentence.
5. Read a sentence and display the longest word(s) excluding ‘,’ or ’.‘.
Input: This is a book.
Output: This, book