whatsapp

Connect on Whatsapp : +1 206 673 2541, Uninterrupted Access 24x7, 100% Confidential. Connect Now

Coding using Java Assignment | Professional Writing Services

public class ArraySkills {

public static void main(String[] args) {

// ***********************
// For each item below you must code the solution using a plain
// Java array. You may not use any of the methods found in the
// Arrays class or the Collections classes. Manually perform
// all operations without relying on system libraries to do the work.
//

// ***********************
// Use this array for all operations
String[] myData;

// 1. Instantiate the given array to hold 10 Strings.

// 2. Add your name to the Array at index 0 and a friend’s name to the
// Array at index 4

// 3. Move your friend’s name to index 0 (overwriting your name) in the
// array and “delete” their name from index 4

// 4. Fill up all of the remaining indeces in the array with more names

// 5. Swap the values at index 5 and index 1. Put the value at index 5
// in index 1 and the value at index 1 in index 5.

// 6. Print the array from beginning to end.

// 7. Shuffle the array of strings. In other words, randomize the
// contents of the array like you might a deck of cards. It’s OK
// to use a Random object or the Math.random() method here.

// 8. Find and print the longest and shortest Strings in the array.
// It’s fine to use Math class methods here.

// 9. Add up the total number of characters in all of the strings in
// the array and print the answer

// 10. Prompt the user for a String and then perform a linear search
// of the array to see if that string is or is not in the array.
// Print if it is or is not found.

// 11. Remove the item at index 4 of the array by shifting everything
// after it one spot over. This is similar to how everybody waiting
// in a line steps up one step if somebody in front of them leaves
// the line. This means your array should have one empty index at
// the end after the shift (delete the duplicate item at the end).

// 12. Create a new array that is twice as big as the current array and
// copy all of the items from the old array to the new array. When
// complete, assign the new bigger array to the myData variable so
// the old array gets garbage collected..

// 13. Prompt the user to enter 2 numbers within the range of the array’s
// length. If the first is larger than the second print backwards
// from that index to the first. If the second is larger than the
// first, print forward in the array from the first index to the second.
}

}

Solution:

Looking for help with your homework?
Grab a 30% Discount and Get your paper done!

30% OFF
Turnitin Report
Formatting
Title Page
Citation
Place an Order

Calculate your paper price
Pages (550 words)
Approximate price: -