This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lesson4; | |
/** | |
* Created by anna on 27.10.15. | |
*/ | |
public class Tank1 { | |
private int direction = 1; | |
private int x = 128; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lesson4; | |
import javax.swing.*; | |
import java.awt.*; | |
/** | |
* Created by anna on 27.10.15. | |
*/ | |
public class ActionField extends JPanel{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lesson4; | |
/** | |
* Created by anna on 27.10.15. | |
*/ | |
public class BattleField { | |
private int BF_WIDTH = 576; | |
private int BF_HEIGHT = 576; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lesson4; | |
/** | |
* Created by anna on 27.10.15. | |
*/ | |
public class Bullet { | |
private int x = -100; | |
private int y = -100; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lesson4.gametank; | |
import java.awt.*; | |
/** | |
* Created by anna on 27.10.15. | |
*/ | |
public class ActionField { | |
BattleField bf; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lesson4; | |
public class Car { | |
private String name = "ref3"; | |
private String ownerName; | |
private String vehicleCategory; | |
private int capacity; | |
private int maxSpeed; | |
private boolean isFull; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lesson4; | |
public class RunTank { | |
public static void main(String[] args) { | |
RunTank runTank = new RunTank(); | |
runTank.printTankInfo(); | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lesson4; | |
public class Tank { | |
String color; | |
int crew; | |
int maxSpeed; | |
Tank() { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lesson4; | |
public class Bed { | |
String color; | |
String manufactureBy; | |
int bedLength; | |
int bedWidth; | |
int reccomendLoading; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GreetingService { | |
public static void main(String[] args) { | |
if (args.length > 0) { | |
System.out.println("Hello " + args[0]); | |
} | |
else { | |
System.out.println("Print 'java GreetingService ' and enter name "); | |
} |