Location:
Search - SortStudent JA
Search list
Description: 继承和多态
实验目的:
1、 掌握继承和多态的概念与实现方法
2、 掌握如何从已有的类中派生子类并继承父类
3、 掌握方法的覆盖和重载
实验内容:
设计一个通用的排序算法,作为验证,自定义学生类、矩形类,可以利用该排序算法对学生按照ID以及Name进行排序;对矩形按照面积排序。
-Inheritance and polymorphism of the experiment was: 1, inheritance and polymorphism to master the concept and realization method 2, how to have the class from the derived subclass and inherit the parent category 3, to master methods of experimental heavy-duty coverage and content: the design of a common sorting algorithm, as verified, since the definition of student-type, rectangular type, you can use the sorting algorithm to students in accordance with the ID and Name sort of rectangular area in accordance with the order.
Platform: |
Size: 66560 |
Author: ruohana |
Hits: