diff --git a/projects/Assignments/homework2/YamashitaDeMouraMulticastEntity.java b/projects/Assignments/homework2/YamashitaDeMouraMulticastEntity.java new file mode 100644 index 0000000000000000000000000000000000000000..9010c954063c7b17f1bef974bd396cce54b7f48d --- /dev/null +++ b/projects/Assignments/homework2/YamashitaDeMouraMulticastEntity.java @@ -0,0 +1,100 @@ +//package homework2; + +/** + * MV3500 + * + * Entity + * + * @author Douglas Yamashita de Moura + * @version 20180227 + * + */ +public class YamashitaDeMouraMulticastEntity { + + private String name; + private float x; + private float y; + private float z; + private float speed; + + public YamashitaDeMouraMulticastEntity (String name, float x, float y, float z, float speed) { + this.name = name; + this.x = x; + this.y = y; + this.z = z; + this.speed = speed; + } + + /** + * @return the x + */ + public float getX() { + return x; + } + + /** + * @param x the x to set + */ + public void setX(float x) { + this.x = x; + } + + /** + * @return the y + */ + public float getY() { + return y; + } + + /** + * @param y the y to set + */ + public void setY(float y) { + this.y = y; + } + + /** + * @return the z + */ + public float getZ() { + return z; + } + + /** + * @param z the z to set + */ + public void setZ(float z) { + this.z = z; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the velocity + */ + public float getVelocity() { + return speed; + } + + /** + * @param velocity the velocity to set + */ + public void setVelocity(float velocity) { + this.speed = velocity; + } + + + +} diff --git a/projects/Assignments/homework2/YamashitaDeMouraMulticastSender.java b/projects/Assignments/homework2/YamashitaDeMouraMulticastSender.java index 725621ddb603e6c7aa43e7e1e328a681897e1dc2..7eeb7ca416e079fe3a61f856b039342256cdfda7 100644 --- a/projects/Assignments/homework2/YamashitaDeMouraMulticastSender.java +++ b/projects/Assignments/homework2/YamashitaDeMouraMulticastSender.java @@ -21,8 +21,8 @@ public class YamashitaDeMouraMulticastSender { public static void main(String[] args) { - YamashitaDeMouraEntity entityA = new YamashitaDeMouraEntity("Alpha", 0, 0, 0, 2); - YamashitaDeMouraEntity entityB = new YamashitaDeMouraEntity("Bravo", 0, 0, 0, 3); + YamashitaDeMouraMulticastEntity entityA = new YamashitaDeMouraMulticastEntity("Alpha", 0, 0, 0, 2); + YamashitaDeMouraMulticastEntity entityB = new YamashitaDeMouraMulticastEntity("Bravo", 0, 0, 0, 3); try {