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.
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. ...
Review
Review
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Similar Content
Related Tags
The President is Missing
by James Patterson, Bill Clinton
Mockingjay
by Suzanne Collins
Treasure Island
by Robert Louis
The Fault in Our Stars
by John Green
Underground A Human History of the Worlds Beneath our Feet
by Will Hunt
The Power of Habit - Why We Do What We Do in Life and Business
by Charles Duhigg
The Subtle Art of Not Giving a F*ck
by Mark Manson
12 Rules for Life
by Jordan Peterson
Orphan Train
by Christina Baker Kline