Given two Point
s 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 Point
s a
and b
return true
if a
is the left of b
. Returns false
otherwise.
Given two Point
s 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 ...
Recursive procedure that returns the number of H in a string of heads (H) or tails (T) outcomes. This must be a recursive routine. You...
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...