I just have one more question. If all we need to inherit is the type of the component, how come we didn’t use an interface instead of an abstract class for the Beverage class?
ผมมีคำถามเพิ่มเติม หากทั้งหมดที่เราต้องการให้เป็นมรดกเป็น ประเภท ของส่วนประกอบที่ ได้อย่างไรมาเราก็ไม่ได้ใช้อินเทอร์เฟซแทนที่จะเป็นระดับ first class ที่เป็นนามธรรมสำหรับ Class เครื่องดื่ม