[Based on an exercise at https://codeworkout.cs.vt.edu/]
Given an array of Strings, return a single String that is made up of all strings...
Search Results
Individual Exercises
A local grocery store has asked you to design a method to verify if their produce is okay to put on the shelves. The method takes an...
A string is a palindrome if it reads the same forward and backward, with case insensitivity. For example, the words "mom", "dad", "Mom",...
This method takes an array of integers as its parameters and returns nothing. The method moves each element in the array to the right by...
This method takes an array of integers as a parameter. It returns true if the elements in the array are unique, false otherwise. For...
This method takes an integer array as a parameter and returns true if the array includes an odd integer; otherwise, the method returns...
This method accepts two integer arrays as its parameters and returns a new array, which contains all of the elements of first parameter...
This method takes an integer array as a parameter and returns the minimum difference between adjacent values in the array. The difference...
This method takes a String object as a parameter and returns a compressed version of the object. The method compresses the String by...
This methods takes a String object as a parameter and returns an encrypted version of the object. The encryption is done in two steps:...
This method simulates flipping a fair coin. It takes an integer parameter, which specifies the number of times that the coin is to be...
This method simulates flipping a fair coin. The coin is flipped repeatedly until three consecutive heads are seen. The method takes an...
This method simulates flipping a fair coin. The coin is flipped repeatedly until three heads are seen. The method takes an integer...
this method accepts a String object as a parameter. It returns true if the String has all unique characters, false otherwise. For...
This method takes an ArrayList of Strings as a parameter and returns the longest String in the list. If the list is empty, it should...
This method takes an ArrayList of Strings as a parameter and returns the length of the longest String in the list. If the list is empty,...
This method takes an ArrayList of integers as a parameter and does not return anything. The method will expand the list with a mirrored...
This method takes an ArrayList of integers as a parameter and does not return anything. The method will remove all of the odd elements in...
This method takes an ArrayList of integers as a parameter and does not return anything. The method will repeat each odd element in the...
What loop would you use to increase the adult years once the age reaches 18?
For this question you writing code for named erin
. Change the if statement to a while loop so that erin
will continue turning until erin
...
For this question you can assume you have access to three jeroo variables. One named tom
, one named steve
, and one named jerry
.
Add in...
For this question you can assume you have access to one jeroo variable named lakin
. Add in the conditional for the following while loop....
For this question you can assume you have access to one jeroo variable named rose
. Add in the conditional for the following while loop....
For this question you can assume you have access to one jeroo variable named luan
. Add in the conditional for the following while loop....