Question: I have a problem which I have no idea how to solve. 

```
               thisPizza = pizzaPick.nextInt();

               if((thisPizza > 0) && (thisPizza < pizza.length))
               {
                orderList[pizzaCount++] = thisPizza;
                sizeMethod();
                System.out.println("\nSubtotal: $" + moneyCounter + "\n");
               }

```

Now, what happens in my program, is that it prompts the user to input which pizza they want, and then at the end, it prints it out. It also asks for the size of the pizza... If they input 1, it'll be large, if they input 2, it'll be small... What I need is so that at the end, it prints out the order (Like in this 'for' statement)

```
    for (int i = 1; i < pizzaCount; i++)
    {
     System.out.println (pizza[orderList[i]]);
    }

```

But then also prints out the size of the pizza (i.e. small or large) depending on which size they chose for each pizza.. So if they chose 1, it would be small, and if they chose 2 it would be large... So the final outcome would be something like:

2- Ham - Large

1- Cheese - Small

10- Italian - Small

3- Bacon - Large

5- Vegetarian - Large

I've already got it working to print out the pizzas, I just need it to print out the size of each, next to it. Thanks!!

Answer: 
Create a class for your Pizza, then you can handle your output and properties very well (see this sample code). Then for the output just use `System.out.println(myPizzaObject.toString());`: 

```
class Pizza {
    String name;
    int size;
    String sizeName;
    ...
    public Pizza(String name, int size) {
        this.name = name;
        this.size = size;
        parseSizeName(this.size);
    }

    private parseSizeName(int size) {
        switch (size) {
            case 1:
                this.sizeName = "Large"; break;
            case 2:
                this.sizeName = "Small"; break;
        }
    }

    public String toString() {
        return "Name: " + this.name + ", Size: " + this.sizeName;
    }

```
Could you just call a method in your `println`statment to get the size of the pizza and return a string with the size. eg.

```
System.out.println (pizza[orderList[i]] + pizzaSize(i))

private String pizzaSize(int i)
{
String large = "large";
String small = "small";

if(sizeArray[i] == 1)
return large;

else if (sizeArray[i] == 2)
return small;
}

```

Sorry if the codes not perfect i'm only learning to but my two cents worth anyway