Question: I want this code to increment the values assignId and assignSales by 1 and 5000 each loop, but start out at 111 and 25000. I can't just change the values though can I? here is the code:

```
package Salesperson;

public class DemoSalesperson2 
{

    public static void main(String[] args) 
    {
        int assignId = 111;
        double assignSales = 25000;
        Salesperson salesperson1 = new Salesperson(assignId, assignSales);
        Salesperson[] salesperson = new Salesperson[10];

        for(int i = 0; i < salesperson.length; i++)

            System.out.println("Salesperson " + i + " has ID #" + salesperson1.getId() + " and annual sales of $" + salesperson1.getSales());
            Salesperson salesperson2 = new Salesperson(assignId + 1, assignSales + 5000);
    }
}

```

Answer: 
If I understand what you are trying to do, then you meant to populate `salesperson` (an array):

1. I would rename it `salespeople`.
2. I would calculate the `id` (id = assignId + i) and `sales` (sales = assignSales + 5000i).
3. I would prefer formatted IO.

Something like

```
int assignId = 111;
double assignSales = 25000;
Salesperson[] salespeople = new Salesperson[10];
for (int i = 0; i < salespeople.length; i++) {
    salespeople[i] = new Salesperson(assignId + i, assignSales + (5000 * i));
    System.out.printf("Salesperson %d has ID #%d and annual sales of $%.02f%n",
            i, salespeople[i].getId(), salespeople[i].getSales());
}

```

Which outputs:

```
Salesperson 0 has ID #111 and annual sales of $25000.00
Salesperson 1 has ID #112 and annual sales of $30000.00
...
Salesperson 9 has ID #120 and annual sales of $70000.00

```
You need to use brackets when enclosing more than one line in a for loop, if statement etc. Also you need to increment the values themselves instead of simply adding to the base value you have them at. assignId += 1 is the same as doing assignId = assignId + 1. if you don't do the += in your case it will always give same number to your Salesperson objects which is 112 for assignId and 3000 for your assignSales. Youre also always printing out the same values becuase you use the same Salesperson object, you should probably use salesperson2 object and print out the contents AFTER you have created it. 

```
//for each iteration we need to increment assignId and assignSales
for(int i = 0; i < salesperson.length; i++)
{
    //increment the variables themselves before passing to the objects
    assignId += 1;
    assignSales += 5000;
    Salesperson salesperson2 = new Salesperson(assignId, assignSales);
    System.out.println("Salesperson " + i + " has ID #" + salesperson2.getId() + " and annual sales of $" + salesperson2.getSales());

}//need second bracket to include more than one line in for loop

```