Skip to content

Instantly share code, notes, and snippets.

@edinak1
Created December 19, 2016 21:05
Show Gist options
  • Save edinak1/804a375e8a6a3ba4febf9619c47fa276 to your computer and use it in GitHub Desktop.
Save edinak1/804a375e8a6a3ba4febf9619c47fa276 to your computer and use it in GitHub Desktop.
package tank;
import tank.Tanki.Tank;
 
public class Launcher {
public static void main(String[] args) {
Tank[] tank= new Tank[5];
tank[0]= new Tank("red",5,60);
tank[1]= new Tank("blue",7,80);
tank[2]= new Tank("yellow",2,40);
tank[3]= new Tank("green",5,70);
tank[4]= new Tank("red",4,50);
for(int i=0;i<5;i++){
System.out.println("Tank"+(i+1)+": "+"color: "+tank[i].color +" crew: "+ tank[i].crew + " maxSpeed: "+tank[i].maxSpeed);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment