Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- car[] = new car[100];
- //populate car array...
- String[] mySelectedCarAttributes = new String[];
- mySelectedCarAttributes[0]=car.attribute1 //attributes are ints
- mySelectedCarAttributes[1]=car.attribute2
- mySelectedCarAttributes[2]=car.attribute3
- mySelectedCarAttributes[3]=car.attribute4
- // the content of mySelectedCarAttributes would be
- // dynamically changed by user interaction, so for example:
- mySelectedCarAttributes[3]=car.attribute8
- for (int i=0;i>car.length;i++){
- int calcScore = car[i].mySelectedCarAttributes[0]+
- car[i].mySelectedCarAttributes[1]+
- car[i].mySelectedCarAttributes[2]+
- car[i].mySelectedCarAttributes[3];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement