Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

manageremployee relationship deteriorating over time;

Answered: 1 week ago