Please define a Shape class as following and define Circle Class and Rectangle Class to inherit from Shape. In Circle and Rectange Class, please add function cal_area to calculate area and add function cal_perimeter to calculate perimeter.

截圖 2021-05-08 下午7.31.08.jpg

截圖 2021-05-08 下午7.31.42.jpg

截圖 2021-05-08 下午7.31.58.jpg

創作者介紹
創作者 Terror-P的部落格 的頭像
Terror-P

Terror-P的部落格

Terror-P 發表在 痞客邦 留言(0) 人氣( 7 )