File tree Expand file tree Collapse file tree 3 files changed +42
-8
lines changed
java-custom-validation/src/main/java/com/froyo
java-ejercicios/src/main/java/mathbook Expand file tree Collapse file tree 3 files changed +42
-8
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ public static void main(String[] args) {
1313 TripDTO tripDTO2 = new TripDTO ("inTerjet" );
1414 TripDTO tripDTO3 = new TripDTO ("taca" );
1515
16- logger . info ( tripDTO1 . toString () );
17- logger . info ( tripDTO2 . toString () );
18- logger . info ( tripDTO3 . toString () );
16+ System . out . println ( tripDTO1 );
17+ System . out . println ( tripDTO2 );
18+ System . out . println ( tripDTO3 );
1919
2020 }
2121
Original file line number Diff line number Diff line change 1+ package mathbook ;
2+
3+ public class AppMathBook {
4+
5+ public static void main (String [] args ) {
6+ System .out .println ("001: " + checkMayorMenorIgual (2d /3d ,1d /4d ));
7+ System .out .println ("002: " + checkMayorMenorIgual (3d /5d ,7d /8d ));
8+ System .out .println ("003: " + checkMayorMenorIgual (-1d /6d ,-1d /2d ));
9+ System .out .println ("004: " + checkMayorMenorIgual (7d /9d ,21d /27d ));
10+ System .out .println ("005: " + checkMayorMenorIgual (11d /4d ,12d /5d ));
11+ System .out .println ("006: " + checkMayorMenorIgual (6d /4d ,18d /12d ));
12+
13+ System .out .println ("007: " + checkMayorMenorIgual (-7d /7d ,0d ));
14+ System .out .println ("008: " + checkMayorMenorIgual (-5d /10d ,13d /26d ));
15+ System .out .println ("009: " + checkMayorMenorIgual (5d /2d ,1d ));
16+ System .out .println ("010: " + checkMayorMenorIgual (17d /6d ,3d ));
17+ System .out .println ("011: " + checkMayorMenorIgual (-3d ,-39 /13d ));
18+ System .out .println ("012: " + checkMayorMenorIgual (4d /3d ,4d /9d ));
19+
20+ }
21+
22+ private static String checkMayorMenorIgual (double a , double b ) {
23+ if (a < b ){
24+ return "a: " +a +" ((<)) b: " +b ;
25+ }else if (a == b ){
26+ return "a: " +a +" ((=)) b: " +b ;
27+ } else if (a > b ){
28+ return "a: " +a +" ((>)) b: " +b ;
29+ } else {
30+ return "ERROR" ;
31+ }
32+ }
33+
34+ }
Original file line number Diff line number Diff line change 1313 <description >Java Practice</description >
1414
1515 <modules >
16- <!-- < module>java-custom-validation</module> -- >
16+ <module >java-custom-validation</module >
1717 <module >java-design-patterns</module >
18- <!-- < module>java-ejercicios</module> -- >
19- <!-- < module>java-filemanager</module> -- >
18+ <module >java-ejercicios</module >
19+ <module >java-filemanager</module >
2020 <module >java-generics</module >
21- <!-- < module>java-java9</module> -- >
22- <!-- < module>java-junit5</module> -- >
21+ <module >java-java9</module >
22+ <module >java-junit5</module >
2323 <module >java-java17</module >
2424 </modules >
2525
You can’t perform that action at this time.
0 commit comments