[問題] Factory Pattern問題
問題:在Factory Pattern不同Sub Class(Circle,Square,Rectangle)中,
有不同的function功能(print(),put(),push()),
請問我要如何設計才能讓Super Class(Shape)存取這些function呢?
http://imgur.com/a/ps24S
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 106.1.121.132
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1481805702.A.B0D.html
推
12/15 23:35, , 1F
12/15 23:35, 1F
→
12/15 23:35, , 2F
12/15 23:35, 2F
→
12/15 23:36, , 3F
12/15 23:36, 3F
推
12/16 12:24, , 4F
12/16 12:24, 4F
→
12/16 12:24, , 5F
12/16 12:24, 5F
→
12/16 12:26, , 6F
12/16 12:26, 6F
推
12/16 13:40, , 7F
12/16 13:40, 7F