CST105 Exercise 5&6 - Write a Java program that implements

Question # 00849174 Posted By: wildcraft Updated on: 12/29/2023 09:35 PM Due on: 12/30/2023
Subject Computer Science Topic General Computer Science Tutorials:
Question
Dot Image

CST105

Exercise 5 & 6

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.

 

Exercise 6

Assessment Description

The following exercise assesses your ability to do the following:

· Use and manipulate string objects in a programming solution.

· Process arrays using loops.

· Utilize arrays to manage collections of data.

· Model tables and grids using 2-dimensional arrays.

Write a Java program that implements the 2D array from Exercise 5. Use the logic in your flowchart, or pseudocode, as a guide the input file should be called input.in.

Here is an example for a 4 * 8 grid and the input string.

And the rest is rust and stardust

       0     1     2     3     4     5     6     7

0      A    n     d             t     h     e    

1            s      i             t     s     e      r

2      r     u     s     t             a     n     d

3      s     u     d     r      a     t     s Output string: 

A rsnsuudisd  trtt ahsateens rd Your program should work for any input file and any size grid.

1. Make sure your program  only outputs the encrypted string. Check your solution to ensure that the output string is correct.

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.

Dot Image
Tutorials for this Question
  1. Tutorial # 00844641 Posted By: wildcraft Posted on: 12/29/2023 09:36 PM
    Puchased By: 2
    Tutorial Preview
    The solution of CST105 Exercise 5&6 - Write a Java program that implements...
    Attachments
    CST105_Exercise_56_-_Write_a_Java_program_that_implements.ZIP (18.96 KB)

Great! We have found the solution of this question!

Whatsapp Lisa