源码简介: |
(1)定义类,模拟现实中的学生、老师、课程等概念及这些概念之间的关系,如学生选课,教师授课等。(2)定义至少一个带有参数的构造函数。(3)分别通过调用默认的构造函数和带有参数的构造函数创建类的若干实例对象。(4)调用对象的属性和方法,输出必要的信息。-(1) the definition of class, simulates real-life students, teachers, curriculum concepts and the relationship between these concepts, such as student elective Lectures. (2) define at least one constructor with parameters. (3) several instances of a class object is created by calling the default constructor and a constructor with parameters. (4) call the object' s properties and methods, output the necessary information.
|