Skip to content

Commit

Permalink
constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
KatsuMouley committed Mar 13, 2024
1 parent f117c06 commit 6f5d31e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Binary file added constructors/human.class
Binary file not shown.
4 changes: 1 addition & 3 deletions constructors/human.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package constructors;

public class human {
String name;
int age;
Expand All @@ -18,7 +16,7 @@ void IMC() {
if (IdealWeight <= 18.5) {
System.out.println(this.name +" esta abaixo do peso");
} else if(18.6 <= IdealWeight & IdealWeight <= 24.9){
System.out.println(this.name +" esta no eso Ideal");
System.out.println(this.name +" esta no peso Ideal");
}else if(25 <= IdealWeight & IdealWeight <= 29.9){
System.out.println(this.name +" esta acima do peso");
}else if(30 <= IdealWeight & IdealWeight <= 34.9){
Expand Down
Binary file added constructors/main.class
Binary file not shown.
6 changes: 2 additions & 4 deletions constructors/main.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package constructors;

public class main{
public static void main(String[] args){
human humanbeing1 = new human("Jack", 19, 70, 1.7);
human humanbeing2 = new human("Vitor", 23, 90, 2.1);
human humanbeing3 = new human("Dextorks", 49, 120, 1.8);
human humanbeing2 = new human("Vitor", 23, 100, 1.9);
human humanbeing3 = new human("Dextorks", 49, 100, 1.8);
humanbeing1.IMC();
humanbeing2.IMC();
humanbeing3.IMC();
Expand Down

0 comments on commit 6f5d31e

Please sign in to comment.