For this question, you will be using the Book
and Shelf
classes from the reading assignment.
Sometimes, a library will get multiple...
For this question, you will be using the Book
and Shelf
classes from the reading assignment.
Sometimes, a library will get multiple...
For this question, you will be using the Book
and Shelf
classes described in the reading assignment.
Implement the following method so...
For this question, you will be using the Book
and Shelf
classes described in the reading assignment.
Implement the following method so...
The following method takes in a ist of integers and a value
representing some number appearing in the list, perhaps multiple times.
Using...
Using the Box
class described in the reading assignment, create an instance of Box
that can hold the value 4.2, then return that Box
.
...
Using the Box
class described in the reading assignment, create an instace of Box
that can hold the generic value passed in as a...
The following method takes in a list of objects, but the type of objects are specified by the generic type parameter T
. It also takes a...
The following method takes in a list of strings and a string value
. Implement the method so that it will return the index of the second...
The following method takes in a List of generic parameter type T
and a value of the same type. This method should return true
if there...
The following method takes in a list of generic objects and returns the number of items in the list. As written, however, the method will...
public class Person { private String name; public Person(String na) { this.name = na; } public String getName() { return name; } }
The...
The following question makes use of the generic Box
class discussed in the reading assignment.
public static class Box<T> { private...
For this question, create an array of Strings of length 10. You do not need to change any values in that array, simply create it and...
The following method takes in an int called size
. For this question, create an array of booleans of length size
. You do not need to...
The following method takes in an int called size
and a double called value
For this question, create an array of doubles of length size
....
The following method takes in an int called size
, a String called value
, and an int index
For this question, create an array of Strings...
The following method takes in an array of integers called numbers
. Implement the method so that it increases the value of each item in...
The following method should return the index of the specified value
within the integer array numbers
. However, it does not work properly....
The following method should return a string representation of the array in the parameter called numbers
. However, currently it returns a...
In the following code, create an array of integers and initialize it to contain the values from 10 to 20, inclusive.
To be clear, the...
The following method takes in an int
called size
and an int
called value
. Create an array of integers of size size
, and set every slot in...
Change the value at every even index in the given array to false
. For example, given the array [true, true, true, true, true]
, this...
We have a program that keeps track of the hours someone sleeps each night, with an array of seven integers that represent each day of the...
The function maximize
receives two integers and updates them so that they both hold the value of the greater of the two. It also helps...
Say that a "character clump" in a string is a series of 2 or more adjacent copies of the same character. Return the number of character...