L
lalalala
Hi,
I am working on my inventory program and I have almost completed,
although when I am displaying the summary of my inventory data table,
which is ordered in colums
barcode/Style/Colour/Size. I fetch and store all the data in access,
but now i wanted to group everything by Style, in alphabetical order,
then group colours in a certain Style together, not necessarely in
alphabetical order, then order each style of specefic colour by Size (S
M L XL).
I recall there being an algorithm that could help me sort something
like that from an ArrayList, without having to make a unique algortihm
for the task from scratch.
This is the algorithm I have and "a" is an ArrayList.
for (int i =0;i<a.size();i++){
temp = (String)a.get ;
style = db.getStyle(temp);
size = db.getSize(temp);
colour = db.getColour(temp);
System.out.println((i+1)+".
"+temp+"\t\t"+style+"\t"+colour+"\t"+size);
}
Again Thank you for any help in advance, it is greatly appreciated.
Nadav
I am working on my inventory program and I have almost completed,
although when I am displaying the summary of my inventory data table,
which is ordered in colums
barcode/Style/Colour/Size. I fetch and store all the data in access,
but now i wanted to group everything by Style, in alphabetical order,
then group colours in a certain Style together, not necessarely in
alphabetical order, then order each style of specefic colour by Size (S
M L XL).
I recall there being an algorithm that could help me sort something
like that from an ArrayList, without having to make a unique algortihm
for the task from scratch.
This is the algorithm I have and "a" is an ArrayList.
for (int i =0;i<a.size();i++){
temp = (String)a.get ;
style = db.getStyle(temp);
size = db.getSize(temp);
colour = db.getColour(temp);
System.out.println((i+1)+".
"+temp+"\t\t"+style+"\t"+colour+"\t"+size);
}
Again Thank you for any help in advance, it is greatly appreciated.
Nadav