ENع
الدرس 28 · Designing code

Objects and classes

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

A class is a blueprint and objects are the things you build from it, each with its own data. Step through a small BankAccount class in Python: build two accounts with __init__, call methods on them, see why the balance is changed only through methods, then make a Savings subclass that reuses and overrides code, and a Bank that has accounts instead of being one.

12 دقيقة10 خطوات5 أسئلةIntermediate
شكل 28 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.