Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Assignment 5 This assignment will focus on the use of loops, String methods and character values. Assignment 5 Submission Follow the directions below to

Java Assignment 5

This assignment will focus on the use of loops, String methods and character values.

Assignment 5 Submission

Follow the directions below to submit Assignment 5:

Create a Java program.

The class name for the program should be 'EncryptText'.

In the main method you should perform the following:

1.You should read a string from the keyboard using the Scanner class object.

2. You should then encrypt the text by reading each character from the string and adding 1 to the character resulting in a shift of the letter entered.

3. You should output the string entered and the resulting encrypted string.

Pseudo flowchart for additional code to be added to the program:

1. After the input string is entered from the keyboard add the following logic.

2. Create a string to hold the lowercase version of the input string.

3. Create a result string to hold the encrypted characters.

4. Loop through each character of the lower case string.

5. The code should read each character of the input string and add 1 to the character so that the character is shifted one position higher in the character sequence.

6. For instance if the input character is an 'a' then the character should be shifted to a 'b'. A 'b' would become a 'c', a 'c' would become a 'd', etc.

7. After you add 1 to the character you should concatenate the character to a result string.

8. Output the string input and the result string.

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

Step: 3

blur-text-image

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

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago