Write My Paper Button

WhatsApp Widget
Skip to content
Home » Exercise 5 & 6

Exercise 5 & 6

  • by

see attached

Exercise 5

Assessment Description

The following exercise assesses your ability to do the following:

· Use and manipulate String objects in a programming solution.

Write a Java program that implements the encryption flowchart, or pseudocode, from Exercise 4. Use the logic in your flowchart as a guide. Write a program that reads text from a file. For each word in the file, output the original word and its encrypted equivalent in all-caps.

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

1. Design a flowchart, or pseudocode, for the following program:
Write a program that reads text from a file. Create a 2-dimensional character array that is rows * columns. Fill the array as follows:
– On even numbered rows, fill the row from the leftmost column to the rightmost.
– On odd numbered rows, fill the row from the rightmost column to the leftmost.
– Fill any unused spaces in the 2D array with the ‘*’ character. If you have more characters than space, ignore the excess characters.

1. Extract the characters from your array in column-major order (pull from column 0 first, then column 1, etc.). Build a new string as you extract the characters. Display the new string.

2. Create a 3- to 5-minute video in which you explain your variable choices and any calculations in your programs. Execute (run) the program in your video. Address any challenges encountered and new information learned while completing the assignment. Do not include the flowchart as part of the video. Your video should not exceed 5 minutes.

Submit the following in the digital classroom as a single zip file, as directed by your instructor:

· Your flowchart, or pseudocode (.png file).

· All your project code and test files.

· A Loom video link; ensure that this video is private so only your instructor can see the video.

While APA style is not required for the body of this assignment, solid academic writing is expected, and documentation of sources should be presented using APA formatting guidelines, which can be found in the APA Style Guide, located in the Student Success Center.

This assignment uses a rubric. Please review the rubric prior to beginning the assignment to become familiar with the expectations for successful completion.

You are not required to submit this assignment to LopesWrite.