定义一个在校人的基类,分别派生出教师和学生,然后放入列表中,实现多态。
#!/usr/bin/python
#Filename:inherit.py
class SchoolMember:
'''Represents any school member.'''
def __init__(self, name, age):
self.name = nam...
分类:
编程语言 时间:
2015-06-16 21:20:30
阅读次数:
114
Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two endpoints of line i is at (i, ai)
and (i, 0). Fin...
分类:
其他好文 时间:
2015-06-16 09:23:26
阅读次数:
138
java.nio.channels 中的接口和类。A channel represents an open connection to an entity such as a hardware device, a file, a network socket, or a program compon...
分类:
其他好文 时间:
2015-06-15 21:43:22
阅读次数:
130
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two ...
分类:
其他好文 时间:
2015-06-15 09:36:47
阅读次数:
78
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which represents the number 123.Find the total sum of al...
分类:
其他好文 时间:
2015-06-12 14:55:41
阅读次数:
100
转载须注明出处:http://blog.csdn.net/minimicall?viewmode=contents,htt://cloudtrade.top
Balance:现金。
代码:
package org.cryptocoinpartners.schema;
/**
* A Balance represents an amount of money in a given asse...
分类:
其他好文 时间:
2015-06-09 17:19:48
阅读次数:
129
Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two endpoints of line i is at (i, ai) and (i,
0). Fin...
分类:
其他好文 时间:
2015-06-09 13:53:19
阅读次数:
104
题目:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two en...
分类:
其他好文 时间:
2015-06-06 07:56:30
阅读次数:
145
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Determine if yo...
分类:
其他好文 时间:
2015-06-05 15:48:10
阅读次数:
129
How MATLAB Represents Pixel ColorsBy Steve Eddins, MathWorksWhat colors do these pixel values represent?252 249 246 243 237255 255 250 246 243253 ...
分类:
其他好文 时间:
2015-06-05 06:07:33
阅读次数:
82