继承映射
2016-08-11 16:20:28 0 举报
继承映射是一种面向对象编程中的概念,它允许子类继承父类的属性和方法。这种映射关系使得子类可以直接访问和使用父类的公共成员,而无需重新编写代码。通过继承映射,子类可以重写或扩展父类的方法,以实现特定的功能或行为。这种机制提供了一种代码重用和模块化的方式,减少了冗余代码的编写和维护成本。同时,继承映射也支持多态性,即子类可以根据需要表现出不同的行为,提高了代码的灵活性和可扩展性。总之,继承映射是面向对象编程中重要的特性之一,它为程序员提供了一种高效、简洁和灵活的方式来组织和管理代码。
作者其他创作
大纲/内容
t_student_1
+ id : int+ name : varchar(20)+ score : int
Teacher
+ title : String
fk
t_student_3
+ id : int+ score :int
t_person_3
+ id : int+ name : varchar(20)
设计二:
+ id : int+ title : varchar(20)
t_teacher_2
+ id : int+ name : varchar(20)+ title : String
Person
+ id : int+ name : String
设计三:
Student
+ score : int
t_person_1
+ id : int+ name : varchar(20)+ score : int+ title : String + discriminator : varchar(50)
设计一:
0 条评论
下一页