Skip to content

Commit

Permalink
feat (jupyter & eclipse / binding & abstract)
Browse files Browse the repository at this point in the history
  • Loading branch information
santanche committed May 4, 2020
1 parent 6203c96 commit d06288b
Show file tree
Hide file tree
Showing 51 changed files with 677 additions and 561 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
{
"data": {
"text/plain": [
"com.twosigma.beaker.javash.bkr2ef61563.Poligono"
"com.twosigma.beaker.javash.bkrca4db7d0.Poligono"
]
},
"execution_count": 1,
Expand All @@ -108,27 +108,27 @@
}
],
"source": [
"class Poligono {\n",
" private int altura;\n",
" private int largura;\n",
"public class Poligono {\n",
" private int altura;\n",
" private int largura;\n",
"\n",
" \n",
" public Poligono(int altura, int largura) {\n",
" this.altura = altura;\n",
" this.largura = largura;\n",
" }\n",
" \n",
" int getAltura() {\n",
" return altura;\n",
" }\n",
" \n",
" int getLargura() {\n",
" return largura;\n",
" }\n",
" \n",
" float getArea() {\n",
" return 0;\n",
" }\n",
" \n",
" public Poligono(int altura, int largura) {\n",
" this.altura = altura;\n",
" this.largura = largura;\n",
" }\n",
" \n",
" public int getAltura() {\n",
" return altura;\n",
" }\n",
" \n",
" public int getLargura() {\n",
" return largura;\n",
" }\n",
" \n",
" public float getArea() {\n",
" return 0;\n",
" }\n",
"}"
]
},
Expand All @@ -140,7 +140,7 @@
{
"data": {
"text/plain": [
"com.twosigma.beaker.javash.bkr2ef61563.TrianguloRetangulo"
"com.twosigma.beaker.javash.bkrca4db7d0.TrianguloRetangulo"
]
},
"execution_count": 2,
Expand All @@ -149,14 +149,14 @@
}
],
"source": [
"class TrianguloRetangulo extends Poligono {\n",
" public TrianguloRetangulo(int altura, int largura) {\n",
" super(altura, largura);\n",
" }\n",
" \n",
" float getArea() {\n",
" return getAltura() * getLargura() / 2;\n",
" }\n",
"public class TrianguloRetangulo extends Poligono {\n",
" public TrianguloRetangulo(int altura, int largura) {\n",
" super(altura, largura);\n",
" }\n",
" \n",
" public float getArea() {\n",
" return getAltura() * getLargura() / 2;\n",
" }\n",
"}"
]
},
Expand All @@ -168,7 +168,7 @@
{
"data": {
"text/plain": [
"com.twosigma.beaker.javash.bkr2ef61563.Retangulo"
"com.twosigma.beaker.javash.bkrca4db7d0.Retangulo"
]
},
"execution_count": 3,
Expand All @@ -177,14 +177,14 @@
}
],
"source": [
"class Retangulo extends Poligono {\n",
" public Retangulo(int altura, int largura) {\n",
" super(altura, largura);\n",
" }\n",
" \n",
" float getArea() {\n",
" return getAltura() * getLargura();\n",
" }\n",
"public class Retangulo extends Poligono {\n",
" public Retangulo(int altura, int largura) {\n",
" super(altura, largura);\n",
" }\n",
" \n",
" public float getArea() {\n",
" return getAltura() * getLargura();\n",
" }\n",
"}"
]
},
Expand Down
13 changes: 13 additions & 0 deletions src/src/pt/c02oo/s10polimorfismo/s02poligono/AppPoligonoPoli.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package pt.c02oo.s10polimorfismo.s02poligono;

public class AppPoligonoPoli {

public static void main(String[] args) {
Poligono tr = new TrianguloRetangulo(6, 10);
Poligono rt = new Retangulo(6, 10);

System.out.println("Área do triangulo retângulo: " + tr.getArea());
System.out.println("Área do retângulo: " + rt.getArea());
}

}
24 changes: 24 additions & 0 deletions src/src/pt/c02oo/s10polimorfismo/s02poligono/Poligono.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package pt.c02oo.s10polimorfismo.s02poligono;

public class Poligono {
private int altura;
private int largura;


public Poligono(int altura, int largura) {
this.altura = altura;
this.largura = largura;
}

public int getAltura() {
return altura;
}

public int getLargura() {
return largura;
}

public float getArea() {
return 0;
}
}
11 changes: 11 additions & 0 deletions src/src/pt/c02oo/s10polimorfismo/s02poligono/Retangulo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package pt.c02oo.s10polimorfismo.s02poligono;

public class Retangulo extends Poligono {
public Retangulo(int altura, int largura) {
super(altura, largura);
}

public float getArea() {
return getAltura() * getLargura();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package pt.c02oo.s10polimorfismo.s02poligono;

public class TrianguloRetangulo extends Poligono {
public TrianguloRetangulo(int altura, int largura) {
super(altura, largura);
}

public float getArea() {
return getAltura() * getLargura() / 2;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pt.c02oo.s10polimorfismo.s02pessoa;
package pt.c02oo.s10polimorfismo.s03pessoa;

public class Alcebiades extends Alguem {
public String getNome() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pt.c02oo.s10polimorfismo.s02pessoa;
package pt.c02oo.s10polimorfismo.s03pessoa;

public class Alguem {
public String getNome() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pt.c02oo.s10polimorfismo.s02pessoa;
package pt.c02oo.s10polimorfismo.s03pessoa;

public class AppPessoa01
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pt.c02oo.s10polimorfismo.s02pessoa;
package pt.c02oo.s10polimorfismo.s03pessoa;

public class Melissa extends Alguem {
public String getNome() {
Expand Down
62 changes: 0 additions & 62 deletions src/src/pt/c02oo/s10polimorfismo/s03tempo/Data.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pt.c02oo.s10polimorfismo.s03tempo;
package pt.c02oo.s10polimorfismo.s04tempo;

import java.util.Scanner;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package pt.c02oo.s10polimorfismo.s03tempo;
package pt.c02oo.s10polimorfismo.s04tempo;

public class AppTempo01b
{
Expand Down
Loading

0 comments on commit d06288b

Please sign in to comment.