Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @author Lucas Pereira Torres de Araújo, 384364
- * Universidade Federal do Ceará - Tecnicas de Programacao I, 2017.1
- */
- public class Ponto {
- float px;
- float py;
- Ponto(float x, float y) {
- this.px = x;
- this.py = y;
- }
- void moverPonto(float dx, float dy) {
- this.px += dx;
- this.py += dy;
- }
- String imprimirPonto() {
- return "("+this.px+", "+this.py+")";
- }
- }
- /**
- * @author Lucas Pereira Torres de Araújo, 384364
- * Universidade Federal do Ceará - Tecnicas de Programacao I, 2017.1
- */
- public interface Figura {
- void mover(float dx, float dy);
- double calcularArea();
- String desenhar();
- }
- /**
- * @author Lucas Pereira Torres de Araújo, 384364
- * Universidade Federal do Ceará - Tecnicas de Programacao I, 2017.1
- */
- public interface Colorida {
- String desenhar(String cor);
- void setCor(String cor);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement