简体   繁体   中英

How to implement the OO in Javascript using prototype framework?

please give the example to me. I want a class, which is a abstract class name "Person" , and two abstract class named "Male" and "Female", which extends "Person", and two concrete class named "Young man" which extends "Male" and "Young woman" which extends "Female". Also, I need a multiple inherited class which called "Unknown", and it extends both "Male" and "Female"... ...

Thx in advance... (Using the Javascript prototype framework is allowed.)

This should be more that enough:

http://www.prototypejs.org/learn/class-inheritance

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM