Given two Points a and b return a rectangle. You must compute the top-left corner of the rectangle and the desired width and height for...
Search Results
Searching for: coding
Individual Exercises
Given a rectangle r, return true if the rectangle is a square. That is, if the width of r equals the height then the rectangle is a...
Given two Points a and b return true if a is the left of b. Returns false otherwise.
Given two Points a and b return true if a is the right of b. Returns false otherwise.
Write a method that reverses the contents of the given string array contents returning an ArrayList<String> with the resutts. If...
Complete the function getElementAt() so that it returns the element nth in the ArrayList contents. Make sure that the parameter nth is a...
Complete the function countStrLongerThan() so that it returns the count of Strings in the ArrayList<String> names that are longer...
Complete the function removeStrLongerThan() so that it removes from strings in the ArrayList<String> names that are longer than ...
Description
Recursive procedure that returns the number of H in a string of heads (H) or tails (T) outcomes. This must be a recursive...
Write a method replaceSpaceUnderscore that replaces all spaces with _ (underscores) in the String sentence.
Complete the method countTimesContains that returns the number of times the array words contains the word stored in searchW. Remember to...
Write a method searchInLastN that implements a linear search but only looks for values in the last positions, determined by the parameter...
Given an array of ints, return the POSITION (i.e., the index) of smallest value in the array. Assume the array has only posivitive...
Given an array of ints, return the first value in the array. You may assume the array has at least one value.
Given an array of ints, return the last value in the array. You may assume the array has at least one value.
Given an array of ints, return true if all values in the array are even values. This routine should return false if at least one value is...