-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
Upload Cloth&Top&Shirt
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="JAVA_MODULE" version="4"> | ||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
</component> | ||
</module> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
public abstract class Cloth { | ||
private String name; | ||
private String material; | ||
private String color; | ||
private char size; | ||
private int season; | ||
private boolean cleanliness; | ||
|
||
public Cloth(String name, String material, String color, Character size, Integer season, Boolean cleanliness) { | ||
this.name = name; | ||
this.material = material; | ||
this.color = color; | ||
this.size = size; | ||
this.season = season; | ||
this.cleanliness = cleanliness; | ||
} | ||
|
||
public void displayClothInfo() { | ||
System.out.println("Name: " + name); | ||
System.out.println("Material: " + material); | ||
System.out.println("Color: " + color); | ||
System.out.println("Size: " + size); | ||
System.out.println("Season: " + season); | ||
System.out.println("Cleanliness: " + cleanliness); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
public class Main { | ||
public static void main(String[] args) { | ||
// 명령어 구현 안 한 그저 확인용 코드... | ||
Shirt shirt = new Shirt("Basic Shirt", "Cotton", "White", 'M', 1, true, "Long", "Round"); | ||
shirt.displayClothInfo(); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
public class Shirt extends Top { | ||
private String collarShape; | ||
|
||
public Shirt(String name, String material, String color, Character size, Integer season, Boolean cleanliness, String sleeveLength, String collarShape) { | ||
super(name, material, color, size, season, cleanliness, sleeveLength); | ||
this.collarShape = collarShape; | ||
} | ||
|
||
@Override | ||
public void displayClothInfo() { | ||
super.displayClothInfo(); | ||
System.out.println("Sleeve Length: " + this.getSleeveLength()); | ||
System.out.println("Collar Shape: " + collarShape); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
public abstract class Top extends Cloth { | ||
private String sleeveLength; | ||
|
||
public Top(String name, String material, String color, Character size, Integer season, Boolean cleanliness, String sleeveLength) { | ||
super(name, material, color, size, season, cleanliness); | ||
this.sleeveLength = sleeveLength; | ||
} | ||
|
||
public String getSleeveLength() { | ||
return sleeveLength; | ||
} | ||
} |