Question: Design a flowchart in java for the following program: For each word in the file, output the original word and its encrypted equivalent in all

Design a flowchart in java for the following program:
For each word in the file, output the original word and its encrypted equivalent in all-caps. The output should be in a tabular format, as shown below. The output should be written to a file called results.out.
Here are the rules for our encryption algorithm:
- If a word has n letters, where n is an even number, move the first n/2 letters to the end of the word. For example, before becomes orebef
- If a word has n letters, where n is an odd number, move the first (n+1)/2 letters to the end of the word. For example: kitchen becomes henkitc
Here is a sample run of the program for the following input file. Your program should work with any file, not just the sample shown here.
Life is either a daring adventure or nothing at all
Program output
Life feLi
is si
either hereit
a a
daring ingdar
adventure tureadven
or ro
nothing ingnoth
at ta
all lal

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!