答案 0 :(得分:0)
你可以创建一个元类,它使用类的属性作为其值,并对其进行分类。
例如,使用您的两个类:
MetaClass
Name | Attributes
-------------------------------------
class 1 | temperature, humidite, vent
class 2 | nom, prenom, age
或另一种方式:
MetaClass
Name | Temperature | Humidite | Vent | Nom | Prenom | Age
------------------------------------------------------------------
class 1 | True | True | True | False | False | False
class 2 | False | False | False | True | True | True
制作这个元课程的细节取决于你的课程实施。