Quay lại Roadmap/Kotlin Roadmap/
Đang tải...
Hướng dẫn thử thách
1 / 153

Abstract Class

### Giai đoạn: Nền Tảng & Khái Niệm Cốt Lõi **Abstract Class** An abstract class in Kotlin is a class that cannot be instantiated directly. It's designed to be a blueprint for other classes. Abstract classes can contain both abstract members (methods and properties without implementation) and concrete members (with implementation). Subclasses (derived classes) must implement the abstract members, providing their specific behavior, unless the subclass itself is also declared abstract. This enforces a certain structure and behavior across a family of related classes. ### Khái niệm cốt lõi: 1. **An abstract class in Kotlin is a class that cannot be instantiated directly** 2. **It's designed to be a blueprint for other classes** 3. **This enforces a certain structure and behavior across a family of related classes** ### Tài liệu tham khảo chính thống: - [Abstract classes](https://kotlinlang.org/docs/classes.html#abstract-classes) (official) - [Kotlin Abstract Class](https://www.programiz.com/kotlin-programming/abstract-class) (article) - [Kotlin Newbie to Pro - ABSTRACT CLASSES](https://www.youtube.com/watch?v=ju-LDSDwGC8) (video)
Nhiệm vụ của bạn
Viết giải pháp của bạn cho bài học **Abstract Class** vào trình soạn thảo bên cạnh. Bấm **Chạy Thử Nghiệm** (hoặc nhấn `Ctrl+Enter`) để thực thi và ghi nhận hoàn thành kỹ năng trên Roadmap. ### Kỹ năng cần đạt: - `Abstract` - `Class` - `Engineering`
Vượt qua bài kiểm tra hiện tại để mở khóa bài tiếp theo.
main.kt
UTF-8 • Tab Size: 2Kiểm tra bài:⌘↵
Test Output
Thử thách này không có bài test tự động. Hãy quan sát kết quả trực tiếp ở khung Preview.