From d4ddfc88bc8026b8bfa7d7b13b3237877a850eb0 Mon Sep 17 00:00:00 2001 From: JEONGYOUNGGYU Date: Fri, 27 Oct 2023 14:53:01 +0900 Subject: [PATCH] =?UTF-8?q?basic=20:=20class=EC=88=98=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/.idea/.gitignore | 3 ++ src/.idea/misc.xml | 6 +++ src/.idea/modules.xml | 8 ++++ src/.idea/vcs.xml | 6 +++ .../production/spartaSpringBasic/Main.class | Bin 0 -> 1462 bytes .../spartaSpringBasic/base/Case1.class | Bin 0 -> 352 bytes .../spartaSpringBasic/younggyu/Car.class | Bin 0 -> 1677 bytes .../spartaSpringBasic/younggyu/Case1.class | Bin 0 -> 1136 bytes src/spartaSpringBasic.iml | 11 +++++ src/src/Main.java | 24 ++++++++-- src/src/younggyu/Car.java | 45 ++++++++++++++++++ src/src/younggyu/Computer.java | 5 ++ 12 files changed, 105 insertions(+), 3 deletions(-) create mode 100644 src/.idea/.gitignore create mode 100644 src/.idea/misc.xml create mode 100644 src/.idea/modules.xml create mode 100644 src/.idea/vcs.xml create mode 100644 src/out/production/spartaSpringBasic/Main.class create mode 100644 src/out/production/spartaSpringBasic/base/Case1.class create mode 100644 src/out/production/spartaSpringBasic/younggyu/Car.class create mode 100644 src/out/production/spartaSpringBasic/younggyu/Case1.class create mode 100644 src/spartaSpringBasic.iml create mode 100644 src/src/younggyu/Car.java create mode 100644 src/src/younggyu/Computer.java diff --git a/src/.idea/.gitignore b/src/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/src/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/src/.idea/misc.xml b/src/.idea/misc.xml new file mode 100644 index 0000000..694f698 --- /dev/null +++ b/src/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/.idea/modules.xml b/src/.idea/modules.xml new file mode 100644 index 0000000..209385b --- /dev/null +++ b/src/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/.idea/vcs.xml b/src/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/src/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/out/production/spartaSpringBasic/Main.class b/src/out/production/spartaSpringBasic/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..86969b0e0624644609634efd2aee93ea9bfa5f17 GIT binary patch literal 1462 zcmZuxOH&hB6#i~V=%i^70tE3f;tLZZ#u=YO5Or`=w0UR{#Yb5;p^c46hiW?3WS1%} z%TaeTE~sKG7M8l01wKkdt1Q>9{S~DB11!XIJHaFtsZ`%{&pqcm-+A2o`P=)C0FL0A z3>Ru7xD|L%%g{Kzq zTQVepQ^%m>GFc;;%w;3}-1MTJLH_#aQQ=9x!=8U3L&iE0tC68KsFtI}EK@g<(a@L| zeuny`S9yExv3=)n;p9aN!P;}Pg}YDfhqLyBr!oR)ldxVvJ2o&hm2n0POG|1dgLIpx zvfA(shCpy2R1v9U5%ppdgKud*Z{Pd3@N8Z%`$aI@!l16ftOB9LwL-IsS)uxoP#v~n zn}qEOc3>w%L%DdOZd6u2G4WF|ilvW+E(_mX3W5kRcy&uNxs{>Z0>M&3P7el3`e+@( z*e#)3!5%~y{N+fiCRCQ2e0oUxOT-Nd{4jo1@Ei6qxD7|$vWi_X1W_Lj;Gl#<3J&A< zsws)(rY$W^XqhZwwiXMZXCfoiPK#=w@pM#_HmaZ(M;O)>{(oaXctM?|#ugslXQ&QX zDw~X>I40q^f&?nWH?OB8^|oBzS6!o4VMSly2*$K24WH z70yxePCFoh;FYyzfa;Ur)VKz<@^T0_ZYBw)c?~bhk9>+V(pUs_+ATEXDaC2L>4wo@ z#8W(R%Mk}pA8 ze1J5*0H68+^0;4FK*OLTHTj#Hu>20K{*4RRJQUu&hz=JnhPzAaB03p*-0ki~bTP~z zD5Sj%pCI>mUSWT`=Pi2PqOTc$DapCHByL@5ICL-ceB1r`MrfhJOr+T&?1lY;E#}(3{xGHctd^G)@B? z5yFf&CY}o15&UVrG=xE7EAzZ9Gvi)4E2MLt)HxR^JF9%(^qV)kAw&u<$=6#mAsy&Gq1C(f@LO6rD`I&M?*qd>r+Kukg+ndXp?9yp+hGj+Dv>{{#D zh}~9Fc>?I zXV>dHUa7)ehD6P=9J1MJ2WDBird==VNHg^Q`OSWN?@8<6H-*!0U_gN+)?99{r!a^i z4Z{XTFv>8{L0GhGTe#aA*+88(Rs=_g9p6d!*`dC>?+GPW;;R?g(7T**V$F6aC z+mstLYf5g*Cc|_gLKwz>b|)G@=%jcj4HOk`-|dCDx$2jdrO$7zFbsEroLnWj6=z*A zWU8huZh2d4!d>BO7VTuKPK{fu+%?rY+>FZ&lk}yl(Q7L+q)fZv$x3i})h<+L)kk*z z&3(yhbZY=M+w%_$yfP>JhYJ_S_LN#R2?vjO-E47qb_RFjnmGSC@YA zk)~)IgGOT?;)L3ZbI2f#9E}&zk1O=(T&KSy0X9l_omRwxH^`g$3f>GA?2}J|{*8AO zTvGz36n8HE0`5WL9wP2xVjiKFZIt-WQ)Y5L_l*GclzTknCMLW^Dpb_t>KQ|iKU3L> zlcpPZJ5*L8%jjRC_zc=1O=3`iC;iO}K8XrOr8EeT;hodN)8wuGrRi`+0X)Y9@PCwi z1SK7!=y=!XP}h_9F#uho^gl&GrJov?#y~}!#81;IhWGG3S)Klt>H8QJTBT_A3FfhY F+&@(!k{bX3 literal 0 HcmV?d00001 diff --git a/src/out/production/spartaSpringBasic/younggyu/Case1.class b/src/out/production/spartaSpringBasic/younggyu/Case1.class new file mode 100644 index 0000000000000000000000000000000000000000..4ed0022482f4bf1e7e5f660af2dd63dc5b74f37f GIT binary patch literal 1136 zcmZuwTTc@~6#k}NI&E1>DR)r0d1(=;3W@^a1q6$QVyaDiT*_D%+udfni}GmVU+~oj zL(;@Ic_>5@6JPx!KEN+9-p*`WED3FLX3v>3-}%mWX1@RV@)f`xB!lq4%b}=ff{!7* zscmWTyk_L$sr5~fwHbV~x}n>14Blug!{KLWbCVof&&ShQ%`k)&KoHFws)`nbPN1Z> zOSUL5cyxoIGwGhx&3M8nI(FK&gjSddf+H;Jw=wiYPfdws{AefKqxbKQ%5Mh`KOG#F zKO9wdNWCtp zh$2S5>BxG=eXkMQx-@=VW>6N)*G3RmFwPNIaTV7X+Ur6#WD}*LJe!wFpGKcVoS;cO zTl3=v!7imz3mj7np>5MKa=C3MKChJop)2#|1~F}wYOXqkbzwc#*7FpJB+aar&uEq| z{aR45U+N_qPVywo3_~EN6-3(BENW08kunr=O2TrdPfauosV*92Semh67N{-*OHfm# z>K!}IZ@hR^#8-0XE6M%8ytSD#v{3o%s}-&2lI0-4hC5zOV+f{A$I6ODT{anXRT!6G z7{X0@AoAw{lTU=~E%M^DGFqEP_rN~8+qcQeZ3<$VtXlh?!7O=<9@`vQdH4sslmk3D z0Dr!Vz#dvxB9Yax3Oe@DvyXGrN`J3X!SF|fc5yK>TESQu!`0YMHFn*Nx!aTOr?33? znvYc!HA^P{B6(a~!ybV)`-~l?Yj83ee8*Aus2~QHKK1|>)?m?0CP^B)v u?$ZfIXp5M~0%;MV^&xp)EKz0`ntmh1!8soN!T?8a`%eU=V#~Da!Q+1fRseti literal 0 HcmV?d00001 diff --git a/src/spartaSpringBasic.iml b/src/spartaSpringBasic.iml new file mode 100644 index 0000000..c90834f --- /dev/null +++ b/src/spartaSpringBasic.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/src/Main.java b/src/src/Main.java index 9983b50..2cb1b24 100644 --- a/src/src/Main.java +++ b/src/src/Main.java @@ -1,10 +1,28 @@ -import base.Case1; +import younggyu.Car; +import younggyu.Case1; + +import java.util.ArrayList; +import java.util.List; public class Main { public static void main(String[] args) { - Case1 case1 = new Case1(); + List carList = new ArrayList<>(); + + + Car blueCar = new Car("파란 차"); + Car blackCar = new Car("검정색 차"); + + for(Integer i = 0; i < 10; i++){ + blueCar.가속하기(); + } + + + carList.add(blueCar); + carList.add(blackCar); - case1.gameStart(3); + for(Car car : carList){ + System.out.println(car.무슨색차니() +"색 차의 현재 속력은 : " + car.현재속력은()); + } } } \ No newline at end of file diff --git a/src/src/younggyu/Car.java b/src/src/younggyu/Car.java new file mode 100644 index 0000000..77913a3 --- /dev/null +++ b/src/src/younggyu/Car.java @@ -0,0 +1,45 @@ +package younggyu; + +public class Car { + static Integer WHEEL_COUNT = 4; + private String color; + private String brand; + private Integer maxSpeed; + private Integer currentSpeed; + private String fuel; + + public Car(String inputColor){ + this.color = inputColor; + this.brand = "테슬라"; + this.maxSpeed = 250; + this.fuel = "전기"; + currentSpeed = 0; + } + + public Car(String inputColor, String inputBrand, Integer maxSpeed, String fuel){ + this.color = inputColor; + this.brand = inputBrand; + this.maxSpeed = maxSpeed; + this.fuel = fuel; + currentSpeed = 0; + } + + public String 무슨색차니(){ + return this.color; + } + + public String 무슨브랜드와무슨색을가지고있니(){ + return "브랜드는 " + this.brand + " 색은 " + this.color; + } + + public void 가속하기() { + this.currentSpeed += 1; + } + public void 감속하기() { + this.currentSpeed -= 1; + } + public Integer 현재속력은(){ + return this.currentSpeed; + } + +} diff --git a/src/src/younggyu/Computer.java b/src/src/younggyu/Computer.java new file mode 100644 index 0000000..d6481bc --- /dev/null +++ b/src/src/younggyu/Computer.java @@ -0,0 +1,5 @@ +package younggyu; + +public class Computer { + +}