Create a program that will encrypt any inputed word using a Ceaser cipher

User Generated

Nyfnu123

Programming

Description

Create a program that will encrypt any inputed word using a Ceaser cipher, where the amount of shift is also inputed by the user. You must use an array. Then create a modification that encodes using a different method.

Upload the java files required to get the program to run. Provide written documentation demonstrating your two coding methods and explain the second one in detail.

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hi Buddy,Please find attached are the answers to your questions and the outline. Let me know if you need any edits or have any questions.Cheers 😃

Array and ArrayList Homework
1. Differences between an array and ArrayList and their usage
The differences will be discussed regarding the distinguishing factors among then bulleted below
which explanations when each is application:


Resizable – Arrays are usually static in size meaning they have a fixed length and
attempts to add more items results to the error message (Array out of bound).
Each ArrayList size grows as items will be added to the ArrayList
If the number of items is predefined, then, an array can be unlike an ArrayList which
grows with addition of new items



Primitives – ArrayList only have objects as datatypes while arrays can have primitive
data types like integer, character, float, double
If the data types stored are of known data type, Arrays will, therefore, be used, unlike an
ArrayList which is highly dependent on what will be added.



Length – The length of an ArrayList will be provided by size() while that of Array will be
provided by length.



Adding element – Adding elements in an ArrayList can be done by using add() while
adding elements in an Array one must define the index and item e.g.
exampleArrayObject[0] = “man.”
Therefore, adding objects in an ArrayList is fast and easier compared to Array



Multi-dimension – An Array can be multi-dimensional, unlike an ArrayList. Usage of an
Arrays is highly recommended when this aspect is so be desired.



Performance – Performance of either of the two will be highly dependant on the specific
function.

2. An array program that contains all classes
public static String[] preDefinedSubjects = new String[]
{"Chemistry","Physics","Biology","English", "Math"};
As indicated in the program below
Add subject programmatically : addSubjectArray();
3. ...


Anonymous
Great study resource, helped me a lot.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags