Index
All Classes and Interfaces|All Packages
A
- actionLoop(String) - Method in class GroceryTrip
-
Loop that uses and sets the action parameter each iteration.
- addAction() - Method in class GroceryTrip
-
Gets user input and adds grocery depending on provided String.
- addGrocery(Grocery) - Method in class GroceryList
-
Adds the given Grocery parameter to the grocList.
- aisle - Variable in class Grocery
C
E
- equals(Object) - Method in class Grocery
-
Checks both the name and price of both Grocery objects provided, and returns True if both values are equal.
G
- getAction() - Method in class GroceryTrip
-
Gets the Scanner object's next line.
- getAisle() - Method in class Grocery
-
Getter for the *aisle* value of our Grocery object.
- getAisleAction() - Method in class GroceryTrip
-
Prints all groceries within a certain user-specified aisle.
- getAisleGroceries(int) - Method in class GroceryList
-
Loops through the grocList and checks each Grocery object's aisle against the aisle parameter provided.
- getCalories() - Method in class Grocery
-
Getter for the *calories* value of our Grocery object.
- getGrocList() - Method in class GroceryList
- getName() - Method in class Grocery
-
Getter for the *name* value of our Grocery object.
- getPrice() - Method in class Grocery
-
Getter for the *price* value of our Grocery object.
- getTotals() - Method in class GroceryList
-
Gets the summation of all prices and calories contained in the GroceryList's Grocery objects.
- Grocery - Class in Unnamed Package
-
The Grocery class, which comprises the objects added to the next class GroceryList.
- Grocery(String) - Constructor for class Grocery
-
Constructor for Grocery objects that takes in a parameter of a String in the format of "name-price-aisle-calories" for example: "Bay's Chips-3.59-12-200".
- GroceryList - Class in Unnamed Package
-
Used to hold and modify our list of Grocery objects.
- GroceryList() - Constructor for class GroceryList
- GroceryMain - Class in Unnamed Package
-
Main function class to run the app.
- GroceryMain() - Constructor for class GroceryMain
- GroceryTrip - Class in Unnamed Package
-
This class creates a Scanner and GroceryList object to make an "App" for the GroceryList.
- GroceryTrip() - Constructor for class GroceryTrip
- grocList - Variable in class GroceryList
- grocList - Variable in class GroceryTrip
M
- main(String[]) - Static method in class GroceryMain
-
"Main" function that begins and directs the execution line.
N
P
- price - Variable in class Grocery
- printAction() - Method in class GroceryTrip
-
Prints entire Grocery List.
- printOptions() - Method in class GroceryTrip
-
Welcomes and prints options for GroceryTrip user.
R
- removeAction() - Method in class GroceryTrip
-
Gets user input and removes grocery depending on provided String.
- removeGrocery(String) - Method in class GroceryList
-
Loops through the grocList until the given grocName is found then it is removed from the list.
S
- scnr - Variable in class GroceryTrip
T
- toString() - Method in class Grocery
-
Creates and returns a String representation of the current Grocery object for ease of printing and testing.
- toString() - Method in class GroceryList
-
Loops through the grocList ArrayList and appends the toString() of each Grocery object to the strList variable.
- totalAction() - Method in class GroceryTrip
-
Prints the totals associated with the Grocery List.
All Classes and Interfaces|All Packages