From c593a9a9ff94a9f26a34cde796ba713b11889302 Mon Sep 17 00:00:00 2001 From: BillerPlay Date: Thu, 19 Feb 2026 06:03:11 -0800 Subject: [PATCH 1/2] "Task is finished" --- Tasks/pom.xml | 17 ++++++ .../src/main/java/com/ironhack/Employee.java | 52 +++++++++++++++++++ Tasks/src/main/java/com/ironhack/Intern.java | 21 ++++++++ 3 files changed, 90 insertions(+) create mode 100644 Tasks/pom.xml create mode 100644 Tasks/src/main/java/com/ironhack/Employee.java create mode 100644 Tasks/src/main/java/com/ironhack/Intern.java diff --git a/Tasks/pom.xml b/Tasks/pom.xml new file mode 100644 index 0000000..331d20e --- /dev/null +++ b/Tasks/pom.xml @@ -0,0 +1,17 @@ + + + 4.0.0 + + com.ironhack + Tasks + 1.0-SNAPSHOT + + + 17 + 17 + UTF-8 + + + \ No newline at end of file diff --git a/Tasks/src/main/java/com/ironhack/Employee.java b/Tasks/src/main/java/com/ironhack/Employee.java new file mode 100644 index 0000000..8dc06d0 --- /dev/null +++ b/Tasks/src/main/java/com/ironhack/Employee.java @@ -0,0 +1,52 @@ +package com.ironhack; + +public class Employee { + protected String name; + protected String email; + protected int age; + protected double salary; + + public Employee(String name, String email, int age, double salary) { + this.name = name; + this.email = email; + this.age = age; + this.salary = salary; + } + public Employee(String name, String email, int age) { + this.name = name; + this.email = email; + this.age = age; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + + public double getSalary() { + return salary; + } + + public void setSalary(double salary) { + this.salary = salary; + } +} diff --git a/Tasks/src/main/java/com/ironhack/Intern.java b/Tasks/src/main/java/com/ironhack/Intern.java new file mode 100644 index 0000000..45c6bf2 --- /dev/null +++ b/Tasks/src/main/java/com/ironhack/Intern.java @@ -0,0 +1,21 @@ +package com.ironhack; + +public class Intern extends Employee{ + private static final double SALARY_LIMIT=20000; + + + public Intern(String name, String email, int age, double salary) { + super(name, email, age); + if(salary Date: Thu, 19 Feb 2026 06:08:40 -0800 Subject: [PATCH 2/2] "Task is finished" --- .idea/.gitignore | 10 ++++++ .idea/compiler.xml | 13 ++++++++ .idea/encodings.xml | 7 +++++ .idea/jarRepositories.xml | 20 ++++++++++++ .idea/lab-java-standard-input-and-classes.iml | 9 ++++++ .idea/misc.xml | 14 +++++++++ .idea/modules.xml | 8 +++++ .idea/vcs.xml | 6 ++++ Tasks/src/main/java/com/ironhack/Main.java | 29 ++++++++++++++++++ .../classes/com/ironhack/Employee.class | Bin 0 -> 1401 bytes .../target/classes/com/ironhack/Intern.class | Bin 0 -> 735 bytes Tasks/target/classes/com/ironhack/Main.class | Bin 0 -> 2498 bytes result.txt | 10 ++++++ 13 files changed, 126 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/compiler.xml create mode 100644 .idea/encodings.xml create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/lab-java-standard-input-and-classes.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 Tasks/src/main/java/com/ironhack/Main.java create mode 100644 Tasks/target/classes/com/ironhack/Employee.class create mode 100644 Tasks/target/classes/com/ironhack/Intern.class create mode 100644 Tasks/target/classes/com/ironhack/Main.class create mode 100644 result.txt diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..1287549 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..f1fc7ef --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/lab-java-standard-input-and-classes.iml b/.idea/lab-java-standard-input-and-classes.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/lab-java-standard-input-and-classes.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..d163847 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,14 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..398d0f7 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Tasks/src/main/java/com/ironhack/Main.java b/Tasks/src/main/java/com/ironhack/Main.java new file mode 100644 index 0000000..ecbc40e --- /dev/null +++ b/Tasks/src/main/java/com/ironhack/Main.java @@ -0,0 +1,29 @@ +package com.ironhack; + +import java.io.FileWriter; +import java.io.IOException; +import java.util.Scanner; + +//TIP To Run code, press or +// click the icon in the gutter. +public class Main { + public static void main(String[] args) throws IOException { + Employee[] employees = new Employee[10]; + employees[0] = new Employee("John Doe", "john.doe@example.com", 30, 60000.0); + employees[1] = new Employee("Jane Smith", "jane.smith@example.com", 28, 55000.0); + employees[2] = new Employee("Peter Jones", "peter.jones@example.com", 35, 75000.0); + employees[3] = new Employee("Mary Williams", "mary.williams@example.com", 42, 80000.0); + employees[4] = new Employee("David Brown", "david.brown@example.com", 25, 50000.0); + employees[5] = new Employee("Laura Johnson", "laura.johnson@example.com", 31, 62000.0); + employees[6] = new Employee("Michael Davis", "michael.davis@example.com", 38, 70000.0); + employees[7] = new Employee("Sarah Miller", "sarah.miller@example.com", 29, 58000.0); + employees[8] = new Employee("James Wilson", "james.wilson@example.com", 45, 90000.0); + employees[9] = new Employee("Karen Moore", "karen.moore@example.com", 33, 65000.0); + try ( + FileWriter writer = new FileWriter("result.txt", false)) { + for(Employee employee:employees){ + writer.write("Name: "+employee.getName()+", email: "+employee.getEmail()+", age"+employee.getAge()+", salary: "+employee.getSalary()+"\n"); + } + } + } +} \ No newline at end of file diff --git a/Tasks/target/classes/com/ironhack/Employee.class b/Tasks/target/classes/com/ironhack/Employee.class new file mode 100644 index 0000000000000000000000000000000000000000..3ddbd73579a112df7a3562902667444a7f4dc142 GIT binary patch literal 1401 zcma)*-)<675XQd)%Tf>uEn8Y!Tea18S!zktyDEvXH6dy01%~@AZs^v9H9$>z=L4Cj ziNwSUAHat)eskDTg(WdfdS>U$pWpdr`1Sk8PXNzR%OZhf8b%H&mEbMwi#ab+ukc*q{v^->_8@k`_w(b#W48C0c(q+(kBO`PY#7=7Mvf}`2RM) zJ|YQ|=eqM9%BhZ!cJ@ceJDVdEoi$?w>nm>)SeF1gEeQ3zDA(*@^{u5D$`{2H7Ua&KwZYMih96-RMz&D^mP4rO0k9 z$R6w&MK-ud(;yB(s&hbOlmb$LGXY7^8jr^MJOy$P3sS{?lw9Yo$+nr!-aorM9?fHd PJedO`+bJNAbjO1~Q2n_f literal 0 HcmV?d00001 diff --git a/Tasks/target/classes/com/ironhack/Intern.class b/Tasks/target/classes/com/ironhack/Intern.class new file mode 100644 index 0000000000000000000000000000000000000000..cc4327a4b59cd6b6a2c059bdd3fb976b64a6509d GIT binary patch literal 735 zcma)3O>fgc6r7hhahy7Cnxt*`C{RFZlA`9qt$?UnkSw_za22U1v<+5jYOgEDLFzx? z#M(mE==Hoe>a7|^N>7G>UqvcC6Bxa{{wUXF3v7SK+j)8T%5(SK1A*)b8oP;}W=dxx z70oEE|9^^zN$B0=HCqL{JH06-I)xny^G%IyjwQuivGMbYowGSy1^(Hv5K2mBTgROq8J0W8FwH*2vIR%nz+MX z@(Mm3oVhrkm3hwDxD-_zY+PXRwt<8 literal 0 HcmV?d00001 diff --git a/Tasks/target/classes/com/ironhack/Main.class b/Tasks/target/classes/com/ironhack/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..cf9f865ec26770d4c2d1b421e9bee1ccba895029 GIT binary patch literal 2498 zcmaJ@Npl-T6#hDvG-G*;Cu7;M$)=FRc$FYfA=uf7m$Dtn4w11*!q%1=Yvj?47>zd| zBtY21z8)zqIj4$ps**~$Qe1t69{?0f0Yw$L5MIwHiG>ZWa?kYF{k`}4y|3Tso4+q# z18@MJMzH}k3PKvfh%o2{KF^aDw`Y>$(*=?B7$W;k+w=}H)Uj}nk90MI4l-9Z4(J%Mh^d+BHut13UujrBSS}f z>bB>M=bH9R-&$m3pkq=+BSUnQ+ajJRnqFQ-6GL->=83YLSG)T0Ti=z6R))G`!V_+M z)Uicb#b$<0B?%-75~!yAK7Lm6RBUIcPjh!EK4n^#$%{nX!O&VHD6vq1s;PgxUh%k_ zJPz=AGZ#PNIt#XnyUAlt0*Pq}RMWmMRA^n~F~#RxPJ!m_vO~lk@@PqjLiM3)>MuhT z>b){pGn?naic8NF?0quW07^*T|2pSyn<~@?7_eCdAFc`j4OeZ;HT4KsIsfH?!k|1($>KuH!TTHX?PST=!y{d&>Q zIV$yPx%8HxC5a;f%#kt$(HC)}Np5v=2b z3VhQ8?PxjmpFZj{9<|CeFZriZa9Y6`671k&R+K!GDzD&`o4F_dBjdMLXjjIWbF)H< zo&3ohCS;AMS08a4uk5+Jlonpz$(0)-cr%K(a9+XNQe^Ki?7Ce})1G%`MKWlvf$oNQ z)^nsbKU-bJ%ErLxFt>A-DDO%+&g@)iou0fZ^Hs!&rIJ`@`|2zPUzontGOn2D=a!Wr z@%E{Bk71|0o4s+?9T)QE`EQ)ATX($d-z@^@)1!^pws89`PQs*oe#o$U&EeNOlY);K zw*CKBQb~{i?0`dGO!>C~ba4=&@fn&W>B;CB?z{wc(O-6Hl*>RZ$~0=h26&kBv3V?z z5h9blT51|#ZF=-7lvG#E6(}c+TBA zDB?rgjJVzz!(Be4_|Pt+O>d2%-G@{k>NL9b?J*>LNDr9z7<=@#814_SfV$V%r*Dm+ zH^2h!e&e9t6T{&EtM%<2F$VM2qOr;l@h$GM>JGrm^5z*Bk0-4J~7~=c|j9uob4U zMwl$dTG(c4Pc@L)9))bMb(D1tt*A#g?!X~5;5c*$Y{Vk1pGPA;M+{%0314FqR?vbU z=;uKMEli_d1&wHCyRpTuSSLcXwv~8GWOIe=Jd5XKxmX*X$7%8vVR5{GGgR5LG~0*B z4Sa`)f)^FMq+pmvMgsT?$sq;i4JvYI)tU)LsB)dyFB3aN&vSH=SLuBNUW5E0p%V56 S{lAO%X%?lo5AYE_LF+&CPJulD literal 0 HcmV?d00001 diff --git a/result.txt b/result.txt new file mode 100644 index 0000000..b6973eb --- /dev/null +++ b/result.txt @@ -0,0 +1,10 @@ +Name: John Doe, email: john.doe@example.com, age30, salary: 60000.0 +Name: Jane Smith, email: jane.smith@example.com, age28, salary: 55000.0 +Name: Peter Jones, email: peter.jones@example.com, age35, salary: 75000.0 +Name: Mary Williams, email: mary.williams@example.com, age42, salary: 80000.0 +Name: David Brown, email: david.brown@example.com, age25, salary: 50000.0 +Name: Laura Johnson, email: laura.johnson@example.com, age31, salary: 62000.0 +Name: Michael Davis, email: michael.davis@example.com, age38, salary: 70000.0 +Name: Sarah Miller, email: sarah.miller@example.com, age29, salary: 58000.0 +Name: James Wilson, email: james.wilson@example.com, age45, salary: 90000.0 +Name: Karen Moore, email: karen.moore@example.com, age33, salary: 65000.0