[JAVA] 22-07-06 인터페이스를 활용한 차 만들기 예제 ☑
·
STUDY/JAVA
Car package sec05.exam01_field_polymorphism; public class Car { //필드값 //인스턴스만들어줌 //인스턴스인 Tire를 인터페이스 Trie로 구현된 HankookTire에 연결해줌 public Tire frontLeftTire = new HankookTire(); public Tire frontRightTire = new HankookTire(); //제한자 차이 Tire backLeftTire = new HankookTire(); Tire backRightTire = new HankookTire(); //브레이크추가 Number01_Brake num1 = new Number01_Brake(); Number02_Brake num2 = new Number0..