From 80626f158b8de7086b06399c33cacd221bd48dd8 Mon Sep 17 00:00:00 2001 From: hlimahevia Date: Sun, 12 Apr 2026 22:04:15 +0200 Subject: [PATCH 1/3] Lab semana 3 --- README.md | 8 +++ src/com/ironhack/lab/Main.java | 67 +++++++++++++++++++ .../lab/exercise1/BigDecimalOperations.java | 19 ++++++ src/com/ironhack/lab/exercise2/Car.java | 52 ++++++++++++++ src/com/ironhack/lab/exercise2/Sedan.java | 8 +++ src/com/ironhack/lab/exercise2/Truck.java | 22 ++++++ .../lab/exercise2/UtilityVehicle.java | 23 +++++++ src/com/ironhack/lab/exercise3/Movie.java | 19 ++++++ src/com/ironhack/lab/exercise3/TvSeries.java | 19 ++++++ src/com/ironhack/lab/exercise3/Video.java | 30 +++++++++ .../ironhack/lab/exercise4/IntArrayList.java | 38 +++++++++++ src/com/ironhack/lab/exercise4/IntList.java | 6 ++ src/com/ironhack/lab/exercise4/IntVector.java | 38 +++++++++++ 13 files changed, 349 insertions(+) create mode 100644 src/com/ironhack/lab/Main.java create mode 100644 src/com/ironhack/lab/exercise1/BigDecimalOperations.java create mode 100644 src/com/ironhack/lab/exercise2/Car.java create mode 100644 src/com/ironhack/lab/exercise2/Sedan.java create mode 100644 src/com/ironhack/lab/exercise2/Truck.java create mode 100644 src/com/ironhack/lab/exercise2/UtilityVehicle.java create mode 100644 src/com/ironhack/lab/exercise3/Movie.java create mode 100644 src/com/ironhack/lab/exercise3/TvSeries.java create mode 100644 src/com/ironhack/lab/exercise3/Video.java create mode 100644 src/com/ironhack/lab/exercise4/IntArrayList.java create mode 100644 src/com/ironhack/lab/exercise4/IntList.java create mode 100644 src/com/ironhack/lab/exercise4/IntVector.java diff --git a/README.md b/README.md index ce069b6..a31b90c 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,14 @@ Once you finish the assignment, submit a URL link to your repository or your pul 4. `IntVector` should store numbers in an array with a length of 20 by default. When the `add` method is called, you must first determine if the array is full. If it is, create a new array that is double the size of the current array, move all elements over to the new array and add the new element. (For example, an array of length 10 would be increased to 20.) 5. In your `README.md`, include an example of when `IntArrayList` would be more efficient and when `IntVector` would be more efficient. +## IntArrayList vs IntVector Efficiency + +- IntArrayList +- Esta opcion es más eficiente cuando es importante el uso de la memoria y no se espera un crecimiento muy frecuente de la lista + +- IntVector +- Por otro lado, esta opcion es más práctica cuando se piensa añadir elementos con frecuencia +
## FAQs diff --git a/src/com/ironhack/lab/Main.java b/src/com/ironhack/lab/Main.java new file mode 100644 index 0000000..1d7fd03 --- /dev/null +++ b/src/com/ironhack/lab/Main.java @@ -0,0 +1,67 @@ +package com.ironhack.lab; + +import com.ironhack.lab.exercise1.BigDecimalOperations; +import com.ironhack.lab.exercise2.Sedan; +import com.ironhack.lab.exercise2.Truck; +import com.ironhack.lab.exercise2.UtilityVehicle; +import com.ironhack.lab.exercise3.TvSeries; +import com.ironhack.lab.exercise3.Movie; +import com.ironhack.lab.exercise4.IntArrayList; +import com.ironhack.lab.exercise4.IntVector; + +import java.math.BigDecimal; + +public class Main { + public static void main(String[] args){ + System.out.println("Iniciando lab sem 3"); + + //Creando un Bigdecimal + BigDecimal value = new BigDecimal("2.4532"); + + + System.out.println("The value in exercise 1 is: " + BigDecimalOperations.roundBigDecimalToDouble(value)); + System.out.println("The value in exercise 2 is: " + BigDecimalOperations.negateAndRound (value)); + + System.out.println("=== Car Inventory Test ==="); + + // Sedan + Sedan sedan = new Sedan("VIN001", "Toyota", "Corolla", 30000); + System.out.println(sedan.getInfo()); + + // UtilityVehicle + UtilityVehicle uv = new UtilityVehicle("VIN002", "Jeep", "Wrangler", 40000, true); + System.out.println(uv.getInfo()); + + // Truck + Truck truck = new Truck("VIN003", "Ford", "F-150", 50000, 3500.5); + System.out.println(truck.getInfo()); + + System.out.println("=== Video Test ==="); + + TvSeries series = new TvSeries("Breaking Bad", 50, 62); + Movie movie = new Movie("Inception", 148, 8.8); + + System.out.println(series.getInfo()); + System.out.println(movie.getInfo()); + + System.out.println("=== IntList Test ==="); + + IntArrayList arrayList = new IntArrayList(); + arrayList.add(10); + arrayList.add(20); + arrayList.add(30); + + System.out.println("IntArrayList element at index 0: " + arrayList.get(0)); + System.out.println("IntArrayList element at index 1: " + arrayList.get(1)); + System.out.println("IntArrayList element at index 2: " + arrayList.get(2)); + + IntVector vector = new IntVector(); + vector.add(100); + vector.add(200); + vector.add(300); + + System.out.println("IntVector element at index 0: " + vector.get(0)); + System.out.println("IntVector element at index 1: " + vector.get(1)); + System.out.println("IntVector element at index 2: " + vector.get(2)); + } +} diff --git a/src/com/ironhack/lab/exercise1/BigDecimalOperations.java b/src/com/ironhack/lab/exercise1/BigDecimalOperations.java new file mode 100644 index 0000000..48ef708 --- /dev/null +++ b/src/com/ironhack/lab/exercise1/BigDecimalOperations.java @@ -0,0 +1,19 @@ +package com.ironhack.lab.exercise1; + +import java.math.BigDecimal; +import java.math.RoundingMode; + +public class BigDecimalOperations { + + //Ejercicio 1 redondear un Bigdecimal y convertirlo en bouble + public static double roundBigDecimalToDouble(BigDecimal number){ + BigDecimal roundToTwoDecimals = number.setScale(2, RoundingMode.HALF_UP); + return roundToTwoDecimals.doubleValue(); + } + + //Ejercicio 2 Invertir signo y redondear la decima más cercana + public static BigDecimal negateAndRound(BigDecimal number){ + BigDecimal invertedNumber = number.negate(); + return invertedNumber.setScale(1, RoundingMode.HALF_UP ); + } +} diff --git a/src/com/ironhack/lab/exercise2/Car.java b/src/com/ironhack/lab/exercise2/Car.java new file mode 100644 index 0000000..0f379e8 --- /dev/null +++ b/src/com/ironhack/lab/exercise2/Car.java @@ -0,0 +1,52 @@ +package com.ironhack.lab.exercise2; + + //Clase abstracta para los modelos de coche + public abstract class Car{ + private String vinNumber; + private String make; + private String model; + private int mileage; + + //Cpnstructor de la clase abtracta Car + + public Car(String vinNumber, String make, String model, int mileage) { + this.vinNumber = vinNumber; + this.make = make; + this.model = model; + this.mileage = mileage; + } + + //Metodo getInfo + public String getInfo() { + return "VIN Number: " + vinNumber + + ", Make: " + make + + ", Model: " + model + + ", Mileage: " + mileage; + } + //Getters de la clase + + public String getVinNumber() { + return vinNumber; + } + + public String getMake() { + return make; + } + + public String getModel() { + return model; + } + + public int getMileage() { + return mileage; + } + + //toString() + + @Override + public String toString() { + return getInfo(); + } + } + + diff --git a/src/com/ironhack/lab/exercise2/Sedan.java b/src/com/ironhack/lab/exercise2/Sedan.java new file mode 100644 index 0000000..777295b --- /dev/null +++ b/src/com/ironhack/lab/exercise2/Sedan.java @@ -0,0 +1,8 @@ +package com.ironhack.lab.exercise2; + +public class Sedan extends Car { + + public Sedan(String vinNumber, String make, String model, int mileage) { + super(vinNumber, make, model, mileage); + } +} diff --git a/src/com/ironhack/lab/exercise2/Truck.java b/src/com/ironhack/lab/exercise2/Truck.java new file mode 100644 index 0000000..9415f8d --- /dev/null +++ b/src/com/ironhack/lab/exercise2/Truck.java @@ -0,0 +1,22 @@ +package com.ironhack.lab.exercise2; + +public class Truck extends Car { + private double towingCapacity; + + //Constructor + + public Truck(String vinNumber, String make, String model, int mileage, double towingCapacity) { + super(vinNumber, make, model, mileage); + this.towingCapacity = towingCapacity; + } + + //Getters de la clase + public double getTowingCapacity() { + return towingCapacity; + } + + @Override + public String getInfo() { + return super.getInfo() + ", Towing Capacity: " + towingCapacity; + } +} diff --git a/src/com/ironhack/lab/exercise2/UtilityVehicle.java b/src/com/ironhack/lab/exercise2/UtilityVehicle.java new file mode 100644 index 0000000..fa296bd --- /dev/null +++ b/src/com/ironhack/lab/exercise2/UtilityVehicle.java @@ -0,0 +1,23 @@ +package com.ironhack.lab.exercise2; + +public class UtilityVehicle extends Car { + private boolean fourWheelDrive; + + //Constructor + + public UtilityVehicle(String vinNumber, String make, String model, int mileage, boolean fourWheelDrive) { + super(vinNumber, make, model, mileage); + this.fourWheelDrive = fourWheelDrive; + } + + //Getters de la clase + + public boolean isFourWheelDrive() { + return fourWheelDrive; + } + + @Override + public String getInfo() { + return super.getInfo() + ", Four Wheel Drive: " + fourWheelDrive; + } +} diff --git a/src/com/ironhack/lab/exercise3/Movie.java b/src/com/ironhack/lab/exercise3/Movie.java new file mode 100644 index 0000000..e59d665 --- /dev/null +++ b/src/com/ironhack/lab/exercise3/Movie.java @@ -0,0 +1,19 @@ +package com.ironhack.lab.exercise3; + +public class Movie extends Video{ + private double rating; + + public Movie(String title, int duration, double rating) { + super(title, duration); + this.rating = rating; + } + + public double getRating() { + return rating; + } + + @Override + public String getInfo() { + return super.getInfo() + ", Rating: " + rating; + } +} diff --git a/src/com/ironhack/lab/exercise3/TvSeries.java b/src/com/ironhack/lab/exercise3/TvSeries.java new file mode 100644 index 0000000..8200df6 --- /dev/null +++ b/src/com/ironhack/lab/exercise3/TvSeries.java @@ -0,0 +1,19 @@ +package com.ironhack.lab.exercise3; + +public class TvSeries extends Video { + private int episodes; + + public TvSeries(String title, int duration, int episodes) { + super(title, duration); + this.episodes = episodes; + } + + public int getEpisodes() { + return episodes; + } + + @Override + public String getInfo() { + return super.getInfo() + ", Episodes: " + episodes; + } +} diff --git a/src/com/ironhack/lab/exercise3/Video.java b/src/com/ironhack/lab/exercise3/Video.java new file mode 100644 index 0000000..7723775 --- /dev/null +++ b/src/com/ironhack/lab/exercise3/Video.java @@ -0,0 +1,30 @@ +package com.ironhack.lab.exercise3; + +public abstract class Video { + private String title; + private int duration; + + public Video(String title, int duration) { + this.title = title; + this.duration = duration; + } + + //Metodo getInfo + public String getInfo() { + return "Title: " + title + + ", Duration: " + duration; + } + + public String getTitle() { + return title; + } + + public int getDuration() { + return duration; + } + + @Override + public String toString() { + return getInfo(); + } +} diff --git a/src/com/ironhack/lab/exercise4/IntArrayList.java b/src/com/ironhack/lab/exercise4/IntArrayList.java new file mode 100644 index 0000000..fa41f35 --- /dev/null +++ b/src/com/ironhack/lab/exercise4/IntArrayList.java @@ -0,0 +1,38 @@ +package com.ironhack.lab.exercise4; + +public class IntArrayList implements IntList { + + private int[] data; + private int size; + + public IntArrayList() { + this.data = new int[10]; + this.size = 0; + } + + @Override + public void add(int number) { + if (size == data.length) { + int newLength = data.length + data.length / 2; + int[] newData = new int[newLength]; + + for (int i = 0; i < data.length; i++) { + newData[i] = data[i]; + } + + data = newData; + } + + data[size] = number; + size++; + } + + @Override + public int get(int id) { + if (id < 0 || id >= size) { + throw new IndexOutOfBoundsException("Invalid index: " + id); + } + + return data[id]; + } +} \ No newline at end of file diff --git a/src/com/ironhack/lab/exercise4/IntList.java b/src/com/ironhack/lab/exercise4/IntList.java new file mode 100644 index 0000000..3f96329 --- /dev/null +++ b/src/com/ironhack/lab/exercise4/IntList.java @@ -0,0 +1,6 @@ +package com.ironhack.lab.exercise4; + +public interface IntList { + void add(int number); + int get(int id); +} \ No newline at end of file diff --git a/src/com/ironhack/lab/exercise4/IntVector.java b/src/com/ironhack/lab/exercise4/IntVector.java new file mode 100644 index 0000000..bb26093 --- /dev/null +++ b/src/com/ironhack/lab/exercise4/IntVector.java @@ -0,0 +1,38 @@ +package com.ironhack.lab.exercise4; + +public class IntVector implements IntList { + + private int[] data; + private int size; + + public IntVector() { + this.data = new int[20]; + this.size = 0; + } + + @Override + public void add(int number) { + if (size == data.length) { + int newLength = data.length * 2; + int[] newData = new int[newLength]; + + for (int i = 0; i < data.length; i++) { + newData[i] = data[i]; + } + + data = newData; + } + + data[size] = number; + size++; + } + + @Override + public int get(int id) { + if (id < 0 || id >= size) { + throw new IndexOutOfBoundsException("Invalid index: " + id); + } + + return data[id]; + } +} \ No newline at end of file From a3afd86772d81270652e05608c7402cd68d672b0 Mon Sep 17 00:00:00 2001 From: hlimahevia Date: Sun, 12 Apr 2026 22:06:09 +0200 Subject: [PATCH 2/3] Lab semana 3 --- .idea/.gitignore | 10 ++++++++++ .../lab-java-interfaces-and-abstract-classes.iml | 11 +++++++++++ .idea/misc.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ .../com/ironhack/lab/Main.class | Bin 0 -> 3655 bytes .../lab/exercise1/BigDecimalOperations.class | Bin 0 -> 949 bytes .../com/ironhack/lab/exercise2/Car.class | Bin 0 -> 1583 bytes .../com/ironhack/lab/exercise2/Sedan.class | Bin 0 -> 474 bytes .../com/ironhack/lab/exercise2/Truck.class | Bin 0 -> 1263 bytes .../ironhack/lab/exercise2/UtilityVehicle.class | Bin 0 -> 1290 bytes .../com/ironhack/lab/exercise3/Movie.class | Bin 0 -> 1126 bytes .../com/ironhack/lab/exercise3/TvSeries.class | Bin 0 -> 1137 bytes .../com/ironhack/lab/exercise3/Video.class | Bin 0 -> 1247 bytes .../ironhack/lab/exercise4/IntArrayList.class | Bin 0 -> 1403 bytes .../com/ironhack/lab/exercise4/IntList.class | Bin 0 -> 164 bytes .../com/ironhack/lab/exercise4/IntVector.class | Bin 0 -> 1388 bytes 17 files changed, 41 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/lab-java-interfaces-and-abstract-classes.iml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/Main.class create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise1/BigDecimalOperations.class create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise2/Car.class create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise2/Sedan.class create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise2/Truck.class create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise2/UtilityVehicle.class create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise3/Movie.class create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise3/TvSeries.class create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise3/Video.class create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise4/IntArrayList.class create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise4/IntList.class create mode 100644 out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise4/IntVector.class 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/lab-java-interfaces-and-abstract-classes.iml b/.idea/lab-java-interfaces-and-abstract-classes.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/.idea/lab-java-interfaces-and-abstract-classes.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..901b2f1 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..ff55171 --- /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/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/Main.class b/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..63bcfd027b3d930c3d8d16c3f08e9a56bad84fb3 GIT binary patch literal 3655 zcmbtWTX-8s75>MTwd+MB&c<<2A?dbF8mqa;mXo%~apPF7TeWgxYE`Lexs0WWwDD@! zS*=XeQc6lw%Dq=eOS!eQ1xgDoAR7nDCEPw9c;e%=Z@lrw$0HwSc4cfwmwX@SVMcrA zod29N=Q8Kd|6Y9u!0q^>hAwm~2u09?Fhk!NzQp4ew~O(U^JhffV+bELZPUArp?ffv z>xGJ51zH5}L1YvAY^~ynGI2Ro655gRflMbp$!rLM^$WL*q*k{yvgl?V_1CN zsED#LqM;Al6zCCbM?bN&5N1#oC6r|o`d|R>+ez4_T^x<&6bvx*`=Vv;mEsd-aZ=>X zGPhK`kNij+I(%d#p2)e_yBe(*d4*OFc{)_ryMt3$1d^w0$ss;T$~eb-mHk> z4NxZ+h08tDu`3KaU8ian*41R4NvAq*35ICHz$@$+jZNxw?bkA4L4!Gf&&p8 z#G%cB^zW0ddx=|Baq=|7jT^5!NQ==H=ILMsW{*^iFkCY>HfE%_YozTZ zVSA2SGqR%M8AMiagu!SVm_&S56u7P877A}JePU>6Sj7kFf7Yov9#=6+ZloO7u`I6P zFveuuDU*{M9cozDY+N%X9m`3W@d%D%f}o4SOWUU%%DTZ8_n}~tA=bh8dp*-Ky;@F` z%)BL3Os#p5P;nz2l%@mZXc+GW(^A zY1_+~l>6%iu*9&ht&@l2Byikyc}+@bsG?ggwFn->L)43Tfm{y_`gvQ$!x4N6j}V#i zHXx^UYX9eD%|0rdPP#=F>*&UL9U+`o@HoSs&bH*}$#7f^7o;HG5RoT?OASP+|^O{A_2~+g`_dQAqT%%;1jbjVveTUcQ!P)YIB4*qo5kswF=o z=ta1SP>?w!q0Kr~H!r44`H=R?tT-g!bb6yE9LKA8E?=A$Udbs?VgHa}SGFV!KTw8g z8*A5Y3>#)8X)qOUwq;4IvHY0sU}GH_!V+bAi45)$WpmDV`lT^1gj9+N@CEii+D_QWrrdsxAC4Y!A?ImYH#Dljm7)hqM zEae)*#f=@Z!5Bo~PMYE@QQ4DmoQ3M*Xmg2epllM%))qwz_Kj88V$Ntlq_}0xnx3Fs ziKJ~?xG9TQDx#v`G9`bLPpwQ<@Oy^comnY&1HW(`zC>+O{<>(yp*fk>uh3VVc1C;8 zP0L_!`NvPvDvyCJc#76Yz<{Um41M+DSv*G+67D)HCux8^^fnazy>)E8gdKDG&SgY1 zMA^TB_pg#-&_VFIcLlLkQrV#B318&!oPM)@tDf9e9a_fGX<|K4$1(pXHK*UM-=U}V zyF<&!oS>tFb)58%X6E#J^sJuK@9W3hGVV`?=rkItkS{>(T>kqcwv`JZ|yN*w; z;?rv$MHMoD2%lLe5Ihkc^9h%5fdD_7RHJHNp^hh_>Nfl-*cti!goIQH@^h>B{C^Qt zf+WHh)(HejgfIGp^^iRZgTm8CA=wTc19b5_F@h*YY2wac7jkr7BN68Jkw|AQvQf8u7=L(}O1Ze{zBWJ5HO-h!j-7{=Hg zIL7Y7I5TmaJ%|ZET^?IugLoGBECV7@&)`0-^91* zWqu8R#kcVt%FGqA1 literal 0 HcmV?d00001 diff --git a/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise1/BigDecimalOperations.class b/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise1/BigDecimalOperations.class new file mode 100644 index 0000000000000000000000000000000000000000..8806edfa56c4253a61ce91c033a4e8554e9d5e45 GIT binary patch literal 949 zcmb7@TW=CU6vzLkK)1k3X{{8z+j?2Rbi;FvNfn7Et8FauYKCP3Q(?y}yVY;ygMDuS_lJUo+r zL|A{M0u?ND{2)M_%vkn-fCaTW)h$ zLIs-^sy4Q;P1woIo~UtG`f4VogpIk3PJJNXm<%0&ipEF!+BJ1bZgt`l5e&s-JiU?Ti?+@_%`Kg!TobJ=mTxX15h zC?chUIU)Zv>Bpw00{JSQ4Q1FDoCaar(_Gd-gvy*Rl=*0)*s0_FXPiUAZfFLOCDGU2 zq+mkBS>Byy*VLWl#FJcZ!+9p$zV3g}7enC$D`~rqf>APd!ojK-tFRRnoXaqhqqHf6 z(y5L^U-pz~P9v)$YvzG@A-IEU{AA6S1DQw5@&=z=UWwO2>l^3`Z`N>=rMWip7E3!d zz-@*AMeJdpHO9HeFaxc$3SVI@aLH>gaQPE!Qi}OYfD-$Z6H+a;#$DWFeUa0+&pYDX h133RM7ufaM`4s&5FJ_f}x0Wyq%xWe~LM!oU{{{*d-&g5x*!g#ztae!3Riv@M*e??b7Wo*fYCUZWa3|s$AT&Gf0=;jQ`nq~;EdI!9rlP6s>Rj${$rOAEY8FE@0T{T;~x*25# zg;dus8zL{UOO<1YNlR9nAtB8_Wu}%_>C`d3e$nZ^d19$zhXTk?Enbs7rFZkfG#%Tq z`0=iATIQi0Ly4hSukK~N3v6XsF)PVDLvneRM@4org8K<<;6W6dvab&rmM$NRW}KRB zQSx+nt={3PV_Ihnp9X8)5AMva?4_D%woi`Bqdgt)`~^HXI~G3S?*`(%`6v%| zzn`MQb$wrRgsgbgFoadnxorzOiYE-qBX{zX8pRe(*VUmkn%=!ai}W%BG!G&A(p-`i zkTd13G)nGD14L^SG*`Gq-z@DuQe2qUxx#m_!b%U(La~Rj!fFqx!c?e-%vU-MU{S^( zLSKbA#t_Fi{gTKaMU9%kZ93WXGT{!EXeZ;P66RV`i_|wK2OB}xl6pdPPUF;9^W5D7 z(}gYx>5`5v$><_;jv3$!p*$rKH|vzk>M>0BS*f}g*-8{8*~2p1FnE3d9KHbG^#zX& zgBN|l_k6*rVeqmqIEQ?{2!paSpNH<8_XQVxn7`r1F!Q<(IEWROqKH*mW29l7{%d$d Ny98N}@f2mu{svgRLxKPR literal 0 HcmV?d00001 diff --git a/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise2/Sedan.class b/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise2/Sedan.class new file mode 100644 index 0000000000000000000000000000000000000000..be311bc7f7815f2cb526925b62b45e069997c275 GIT binary patch literal 474 zcma)2%TB{E5S&f(prKGGlp_L8ydxn_6mh9QsuXbv>KP}sQq#nd+_d7iI3aQ11NbP! zy5)uh_+Zb>j%V%t_ zf338tZwOb1@spSf_UJrHYNK@C`;Rg>8U|P)?ETUykt3lAZoe8yLOWJk-p|TZng@{< ztaRck6U9&%W%;-0)?+m#9K?SG_Xy3o(#u2}_TwMix)c*`rc*GE|sAIv9txH$D8uVJiYx0&u zmbtpJxpTxl8Jr_yTz4b|w^sjGk;)9IQ|X3^f!J7g$aRoBL!w6!I8?TtbOdjch1D2l zsff)>WsVh!Rfcp!4Ln;M5}OXgmh1-V47q1YXZdDa&b=x;}=_PTWbR0Df7 zY*$lh*uuQ9N&_=RkC@R)BSR=gIDrLPZ_r5-HfYb4wzhW`;^$zcrNlQFU&uCvMOrg- z14z-ArjeP!5}gi^q&0_S+@w7~w{V*j19XQ_;4z04Lc!e}?jn!)5Ct(Lh`EZjC<2Sv z!OcYJD~wMBLbu7GF*|f;hJ?r+4FE}o;XfIsLqV3#aV-$Iz%20jlFIyuN+wc?;ogw7 Xjt$zUNv}ZveeBXHO~}GSJi_uXgqk!4 literal 0 HcmV?d00001 diff --git a/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise2/UtilityVehicle.class b/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise2/UtilityVehicle.class new file mode 100644 index 0000000000000000000000000000000000000000..43213f54df7053f8881db74b4134107d7bea60f2 GIT binary patch literal 1290 zcma)5TTc@~6#j-@mX@`xKta4-r_|X6Nnjzn@AwZuxNWdOZuMM z;da+@c*_!Bgm240Y*|(AGbCS0SE?O`?PC3y_c>wQwza2x>9#93vD8Y96ef`}kTx*| zlc97?%uh->Qk^wKN7{~H$Q*g6{y|3w=Z!D>WMEBQLB>QDIR>LGRLwo|7-oy5(QKxv z=4lf%m}Qvn@vf+PuFchfR2`B6#a$IJtd6OyIfjj)G6p#sb<|R8mKqH4s&_~gWb4uu zA5MEM;qUX7E^@l=+1zPxUur!v##KjBa%=S)cdNpX>Pt7I)~qA*q8xM=7!o~7#i9Q7 zq$7A+_qE25lfmwlcE^gPCPR9U%(mDiFvHB{8Ext)}O`?=W8EXdC^>{WImj5R!-M-fq(HjdVw##kh`DYAYhbIsL!+`I& zd+3N@x$b%0)069;<|W7dvlB4}{&}cF92xo?XC>*T>QHJTiB(!$Ul+STX6I|dn@cjx) heuyO#vBdCrfLg{1-IK&pr2h#vNlTMt;TfJ|;UAy(KHdNT literal 0 HcmV?d00001 diff --git a/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise3/Movie.class b/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise3/Movie.class new file mode 100644 index 0000000000000000000000000000000000000000..a5d5264f96f47f1fc2752104652f5cba62e898cf GIT binary patch literal 1126 zcmaKr-A)rh6vzKVKejC^g^D1GSg}Z3koDunSmTAQ#3n@(A@xFUrrVJYU1rGcl*pU- z7HXm);lc;-p^Rrg602>v*qL)?&iu}q|D65x`{E~nmv~gb3{n=-HZsUElwE!7NMEY~ zcZZJ0dye=dd{+kIvD1}(p&7Ezq>|=2!&0?##7{XzsY7Sq_);A<+O=*TIpi%AY|O&G zoVce?r68iu4IO4+t+1Rq8%4}BSck&2)kjLXSglQ_D$xZ>Hm+ikVfmO3MN=!6n|IO- z$O;TsCScf{QeGt{Dzn&;O1vH&_k@4IdmgQnI@;x4m-{mGlf|?d zNJ_lkxkSq7;tht3ktPOBD9MoPk3wOzB4OGLd6MI8B2=ncYcUk|^~iU{t_%@{h`AGT z80KGSZ35%-lRaSux*z1Q!RR%%%Q4|;nH96xETD>-g?gys7DMH45mKG%p-5ge7Iv4r zM*C+BpT~tt0^>BVxaxZ%sC2X*j!qhrZ#K5_&%uMU6EP+H{aE~)-jQ%kWBln7M3Z~o zzBGdLwA)Gvzv=NH5P^jqhK-3kO)J&H1BSKBL#a>Wd*Kds_zZO)qmg=?tQ6T9T%&P` zybt7OXtwKHtLI?#+7DRY$e+P7jdQdMSjZA(7I|DJuZ}d0Hdb(h=Fqx{RicH~Ev!Y^ zqW>w%bQ|R)lS4aURHptN))zA36xrlxh_>T^1WjFx`Q-4E2u20f&v7LLTwnqC`X6N> iDln$ZC6p9N5awFPU7B;myGLII+vF9nPzuN ze9%Ng!h=7+A7#ALU9{SU_^>ng&YpYjy=U(H_<8Xiz#bmvF@cnWw2KU~3`Jj`crw(g z!~L!o@Rlb&h|rgjc;p?*w$KdOr&3AtjA60VIOeCEQ0mBQnoz2vYQ20oi5w;!NJ_lf_>bhO$%r&AYY18h9+(@k$rbvyw-%6!Q1$zOp7XFV|n{&ooex^*mkQym_MgrdfS zpec=QJDj8+gdLjDAnXf4oRz(JN+rZ9;c9g4e zPiv6rHtr;uJlZWPQ~3(#6B%)eY!Ygz-58Ki(=20_PHdTv32lQ5m2*s6f(y(6pZ{T* j8x$C`6cUyciUZUd?$VwkmQDKBu}xl{tR3v)0hWIOfKd;p literal 0 HcmV?d00001 diff --git a/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise3/Video.class b/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise3/Video.class new file mode 100644 index 0000000000000000000000000000000000000000..b0150966dbd027137fcf7a50b921acf81a3030d9 GIT binary patch literal 1247 zcmah|Ur!T35dUpyd*wJNmVctC1wl$dPQ?dfjSp6dO{zXXYK%|Y>q?g%x8!b1+G5DoRfp0jHl-(C_Yc~_ z-{tK%G39W##eEs-gTt)uN(ynQ`M(0yD0PZyH!ji`iOn%WtfRzAD7ui`41{7#XQzbRIzSgBP{Y=hUJU5 zk=~K&2|K2Y>%Pq$t^8w#Ps!p83}e2R-0Qd^SZ*rS>mSyJA0ct_m*ej7p-3@*pRkV` zv6g(U0YsgXC135-!xOI+V z(@kiX3sEjRPbHjlgRp4su}Cgqrb*}V&vcMvo=bIJN@4znnaj)zDb6Ff9Z@V}h4uo) SP@(@0Hc2x{vT+|O>YxN7=C8G$tI3X5|fY;(=;ZbBrb_*o2HaNB}hS7HTV!}gt#!Vr}hwM*4iDX zNzeTem3nD=>7|!SMMxCUdw&L}{)P4cJhOI*tDqcqKHhmhp67XI_OF*up98pot7&*h z1@JQ%!mz-^Be^F_ZE2dN>h>d5w*tdgw9)o+fz;A+Z4@II4Uo=Y3>ks*^>DYOqtLWu zeTQM&CAF`jx{lRasch`ED3S*i9W#sHkX8zK56UjZi44XuL2InPRRW?MASbYJSiEc+ zYQNgG)vvFIUDJqf?AKMt>d@o}dn$uzoD!JXl{;!PG<9k3Y1`r|w$j*GV0x*%Tsh3P zWg~5x8);199Y^%E^Ei6GTnmsFID0&)KA+97LFD5VZPcCa?zW2V%I!8Sxk^}NDGV_^-V>YrfmrXTz`=WI&6~S0@*Fg9^96l zq-5Z_lWHobJX4gZyk@%eR@jZ|>ZW!`CkH#U>eOQYuZN+HZ6rIlm2HKMcmx+|Et@^r z){S}X+H!ebj1S|ZG(N^!fKOaA)&&+1<<@2|+)<^T>b?Hllyw_M2Lj&@>fU$kmAWNO zqpjk_N*L~RI~zyaGhq2&;N63cdW-vm0sr1z-Wa?S{S=$B-QLnxQSnUK7!_@{WgM$G zz-I#Ij&OP#)Bp^gJKmMgsK*NhUVje)vm8D5ig=+t_Zm2-Xy-HJc!s-Mi64+FK7lAs zq@Sf9BPgaGBl}wt^Df66e2ya=N14f8@G;EMl3@;a`X1&v3sybb&-#MCL$uY3zaz^p zc>W_UC37+iwI5zR^DKQQweC;*iREWZt@M`D{%Z9*U;Ogw@8XJs!eD;ce6@I=lmD=f zECq+GNHid?44KUm*Bnmb159C^^A*hC8m(U{XeSC?>^#81BlA)h^j literal 0 HcmV?d00001 diff --git a/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise4/IntList.class b/out/production/lab-java-interfaces-and-abstract-classes/com/ironhack/lab/exercise4/IntList.class new file mode 100644 index 0000000000000000000000000000000000000000..77f6bc5d6626b304cfcc35b8524d4617fe9bfa50 GIT binary patch literal 164 zcmXYqF$%&!6h!C8nAK?E8LYH%8?T_SAXo_Yo6RR~j0tR_cs2_U;Gx97U^#DwH=pn8 z4Pb|vLPA)&?xua{+KY8p-Pl6&lY{d;Z?$QMgYO50l(4An!%E*)`dHNL2ExdeB_Umz s^;ts2f?_a){M6lpYxd6g_V|$t2D=A0{DyDNRVAiQB|L)3n9V1!)kL46YPpgxK`O^RORr-dHo^ zG<4k`QK_4@n{K+PRD?tk-S;>22lOw%g7&-_D@hd;jpp4uckaiz=ic|%+ZV3@Y~p4f z4ssq`A43=xn0zAlWTh)jyVBTxqFRZ-@C|Kr@`XTdX}LLy5sZ4s`xt{Su-FQBD>@2I zN49ntwp~&CDr)IityO9!X)-|=3Alkwq=56NX5+_wOkk4MSbwVoM9o7{VBxTG%>-({ z(N7wWZ-spm#GCsq)k}0}io`taV+N-MW_RU|+6YZcCJ%Jdp%y37B(cEEQf;|@m~AVG zv}srKn8F#`Wr)^d6q%I8tkG;cC^5#QQy>+X(t^4kNTG>o5LopEKt}=$o^f~ zOY3=dF1fa{Fqxu8+BMVVx59qZQn$5*IesvkRm&5{ek%-TDb|Ba1#KbVJW(x) zSH+9cU&#PYwu`%io79qx~g_-89zJ-Q8p6dSVJ-O`C7-G0p&6>W579IM#F z=K`0G_4F>N9vFP#WLMsvtS`)S@f`@9N`_c2E)SoPu{>)-SpqV22l?jJw+S&K1A>`%ihrf?ycmLa9-HNa21xz?6f< zR3;9vBcDA@+slSixJ2y= literal 0 HcmV?d00001 From 99ba2f8c764a35ea2dd986e73d24309ee6462fe8 Mon Sep 17 00:00:00 2001 From: hlimahevia Date: Sun, 12 Apr 2026 22:10:15 +0200 Subject: [PATCH 3/3] Complete lab week 3 exercises --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a31b90c..e33ad0f 100644 --- a/README.md +++ b/README.md @@ -70,10 +70,10 @@ Once you finish the assignment, submit a URL link to your repository or your pul ## IntArrayList vs IntVector Efficiency -- IntArrayList +- IntArrayList: - Esta opcion es más eficiente cuando es importante el uso de la memoria y no se espera un crecimiento muy frecuente de la lista -- IntVector +- IntVector: - Por otro lado, esta opcion es más práctica cuando se piensa añadir elementos con frecuencia