Advertisement
Guest User

Untitled

a guest
Mar 29th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. car[] = new car[100];
  2. //populate car array...
  3. String[] mySelectedCarAttributes = new String[];
  4. mySelectedCarAttributes[0]=car.attribute1 //attributes are ints
  5. mySelectedCarAttributes[1]=car.attribute2
  6. mySelectedCarAttributes[2]=car.attribute3
  7. mySelectedCarAttributes[3]=car.attribute4
  8.  
  9. // the content of mySelectedCarAttributes would be
  10. // dynamically changed by user interaction, so for example:
  11. mySelectedCarAttributes[3]=car.attribute8
  12.  
  13. for (int i=0;i>car.length;i++){
  14. int calcScore = car[i].mySelectedCarAttributes[0]+
  15. car[i].mySelectedCarAttributes[1]+
  16. car[i].mySelectedCarAttributes[2]+
  17. car[i].mySelectedCarAttributes[3];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement