The method below takes in a Pixel object called p
as a parameter. In the body of the method below, declare and instantiate an ArrayList...
Search Results
Individual Exercises
The method below takes in two parameters: a Pixel object called p
and an ArrayList called arr
. For this method, if the ArrayList has less...
The method below takes in an ArrayList called arr, and returns that ArrayList. Before the return statement, remove the first item in the...
For this question you will be using Pixel objects and one Picture object, as described in Reading Activity 06. The following method uses...
For this question you will be using Pixel objects and one Picture object, as described in Reading Activity 06. In the body of this...
For this question you will be using Pixel objects and one Picture object, as described in Reading Activity 06. In the method below write...
For this question you will be using FoodItem
objects and one GroceryBag
object.
public class FoodItem { private double price; public...
For this question you will be using FoodItem
objects and one GroceryBag
object.
Here's what the FoodItem class looks like:
public class...
The method below takes in an ArrayList called arr
. You can assume this ArrayList will only ever hold integers.
This method needs to...
For this question you will be using FoodItem
objects and one GroceryBag
object.
public class FoodItem { private int price; private...
For this question you will be using Pixel objects and one Picture object:
Here's what the Pixel class looks like:
public class Pixel {...
For this question you will be using FoodItem
objects and one GroceryBag
object.
public class FoodItem { private int price; private...
For this question you will be using FoodItem
objects and one GroceryBag
object.
public class FoodItem { private int price; private...
For this question you will be using FoodItem
objects and one GroceryBag
object.
public class FoodItem { private double price; private...
For this question you will be working with the following two classes:
public class Television { private int currentChannelNumber; public...
For this code, we are adding a method to a class called Rabbit
. Much like Jeroo
s, a Rabbit
has a hop()
method which will cause the rabbit...
For this question, you will be working within the Person
class.
public class Person { public Car car; public Person(Car c) { this.car =...
For this question, you will be working within the Person
class. We will be using the Person
and Car
classes from the previous question...
For this question you will be writing a toString()
method within the following class.
public class Book { private String title; private...
The method below should take in a string as a parameter and return an int representing the number of lower case 'a's there are in the...
The method below takes a string as a parameter. The string contains a name in the form of "<firstname>,<lastname>". This...
For this question, declare a local variable and initialize it by creating a new ArrayList
for holding Pixel
objects (you can name the...
The method below takes in a Pixel object called p
as a parameter. In the body of the method below, declare local variable and create an ...
The method below takes in two parameters: a Pixel
object called p
and a List
called list
. For this method, if the list has less than 20...
For this question, a list of integers called list
is passed in as a parameter. Implement this method so that it creates an returns a new...