From 8ea96996d44975bf7822d44a495648e4b3a91637 Mon Sep 17 00:00:00 2001 From: trochas Date: Fri, 18 Oct 2024 17:32:47 +0200 Subject: [PATCH] correction PartTypeImpl --- .../impl/{PartType.java => PartTypeImpl.java} | 4 +- src/fr/test/test.java | 39 ++++++++++--------- 2 files changed, 22 insertions(+), 21 deletions(-) rename src/fr/impl/{PartType.java => PartTypeImpl.java} (70%) diff --git a/src/fr/impl/PartType.java b/src/fr/impl/PartTypeImpl.java similarity index 70% rename from src/fr/impl/PartType.java rename to src/fr/impl/PartTypeImpl.java index 8392103..47469ec 100644 --- a/src/fr/impl/PartType.java +++ b/src/fr/impl/PartTypeImpl.java @@ -1,10 +1,10 @@ package src.fr.impl; -public class PartType implements src.fr.api.PartType { +public class PartTypeImpl implements src.fr.api.PartType { private String name; private Category category; - public PartType(String name, Category category ) { + public PartTypeImpl(String name, Category category ) { this.name = name; this.category = category; } diff --git a/src/fr/test/test.java b/src/fr/test/test.java index 149e3c1..0ed2dc1 100644 --- a/src/fr/test/test.java +++ b/src/fr/test/test.java @@ -8,6 +8,7 @@ import static org.junit.Assert.*; import org.junit.Test; import src.fr.impl.*; +import src.fr.api.PartType; public class test { public static void main(String[] args){ @@ -17,27 +18,27 @@ public class test { Category Interior= new Category("Interior"); //PartType - PartType EG100= new PartType("EG100", Engine); - PartType EG133= new PartType("EG133", Engine); - PartType EG210= new PartType("EG210", Engine); - PartType ED110= new PartType("ED110", Engine); - PartType ED180= new PartType("ED180", Engine); - PartType EH120= new PartType("EH120", Engine); + PartType EG100= new PartTypeImpl("EG100", Engine); + PartType EG133= new PartTypeImpl("EG133", Engine); + PartType EG210= new PartTypeImpl("EG210", Engine); + PartType ED110= new PartTypeImpl("ED110", Engine); + PartType ED180= new PartTypeImpl("ED180", Engine); + PartType EH120= new PartTypeImpl("EH120", Engine); - PartType TM5= new PartType("TM5", Transmission); - PartType TM6= new PartType("TM6", Transmission); - PartType TA5= new PartType("TA5", Transmission); - PartType TS6= new PartType("TS6", Transmission); - PartType TSF7= new PartType("TSF7", Transmission); - PartType TC120= new PartType("TC120", Transmission); + PartType TM5= new PartTypeImpl("TM5", Transmission); + PartType TM6= new PartTypeImpl("TM6", Transmission); + PartType TA5= new PartTypeImpl("TA5", Transmission); + PartType TS6= new PartTypeImpl("TS6", Transmission); + PartType TSF7= new PartTypeImpl("TSF7", Transmission); + PartType TC120= new PartTypeImpl("TC120", Transmission); - PartType XC= new PartType("XC", Exterior); - PartType XM= new PartType("XM", Exterior); - PartType XS= new PartType("XS", Exterior); + PartType XC= new PartTypeImpl("XC", Exterior); + PartType XM= new PartTypeImpl("XM", Exterior); + PartType XS= new PartTypeImpl("XS", Exterior); - PartType IN= new PartType("IN", Interior); - PartType IH= new PartType("IH", Interior); - PartType IS= new PartType("IS", Interior); + PartType IN= new PartTypeImpl("IN", Interior); + PartType IH= new PartTypeImpl("IH", Interior); + PartType IS= new PartTypeImpl("IS", Interior); CompatibilityManager cm = new CompatibilityManager(); @@ -72,7 +73,7 @@ public class test { Set ISRequirement = new HashSet(); ISRequirement.add(XS); - cm.addRequirements(EH120, (HashSet) EH120Requirement); + cm.addRequirements(EH120, EH120Requirement); }