Advertisement
PanzerFaustNL

some enheritance idea

May 17th, 2020
695
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [class]
  2. #figure
  3. #private
  4. lenx
  5. leny
  6. #public
  7. ' in fact properties
  8. #lenx
  9. #leny
  10. [method]
  11. #Area[]
  12. Area = lenx * leny
  13. ' other thingies
  14. [class]:[#figure]
  15. #square
  16. #lenx = 2
  17. #leny = 2
  18. print #Area[]
Advertisement
RAW Paste Data Copied
Advertisement