Hi so i have created this table for a sales person.
class SalesSystem
{
//Sales Person One
public void SalesPersonOne()
{
int i=0;
System.out.println("Sales Person 1");
String newLineMark = System.getProperty("line.separator");
String leftAlignFormat = "| %-7s | %-9d | %-9d | %-9d | %-9d | %-9d | " + newLineMark;
System.out.format("+---------+-----------+-----------+-----------+-----------+-----------+" + newLineMark);
System.out.format("| Day | Product 1 | Product 2 | Product 3 | Product 4 | Product 5 |" + newLineMark);
System.out.format("+---------+-----------+-----------+-----------+-----------+-----------+" + newLineMark);
for (int Day=1; Day<31; Day++)
{
System.out.printf(leftAlignFormat,"Day "+ Day, i, i, i, i, i);
}
System.out.format ("+---------+-----------+-----------+-----------+-----------+-----------+" + newLineMark);
}
}
And i want to fill product 1,2,3,4,5 with numbers from an array over the 30 days. How can i do this?
Thanks in advance