文件名称:ch3
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2016-03-24
- 文件大小:
- 3kb
- 下载次数:
- 0次
- 提 供 者:
- M***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
计人员类
问题描述:在一个公司中,有若干名普通员工(Employees)。对该类人员的属性进行分析,并设计类,满足以下条件:1)所有属性声明为私有的,并创建相应的get,set方法;2)在类中增加构造方法,利用构造方法,产生相应类的对象,而不需要在测试类中为每个对象的相应属性进行赋值;3)雇员的ID由static属性的SID自动生成,不需要我们手动赋值;4)添加方法为员工加薪。普通员工的加薪公式为:薪水+薪水*比例。
然后,在测试类Test中,产生3个普通员工,并对他们进行初始化,最后在控制台输出3个普通员工。
-
Staff class
Problem Descr iption: in a company, there are a number of ordinary employees (Employees). On the properties of the staff analysis, and design class, meet the following conditions: 1) all of the property declaration is private, and create corresponding get, set 2) in the class increase construction method, by constructing method, produce the corresponding class of objects without the need for in the test class for each object of the corresponding attribute assignment 3) employee ID by the SID of the static property of the automatic generation, do not need we manually assigned (4) adding method to pay employees. General staff salary formula: salary+ salary* ratio.
Then, in the test class Test, 3 ordinary employees, and they are initialized, and finally in the console output of 3 ordinary employees.
问题描述:在一个公司中,有若干名普通员工(Employees)。对该类人员的属性进行分析,并设计类,满足以下条件:1)所有属性声明为私有的,并创建相应的get,set方法;2)在类中增加构造方法,利用构造方法,产生相应类的对象,而不需要在测试类中为每个对象的相应属性进行赋值;3)雇员的ID由static属性的SID自动生成,不需要我们手动赋值;4)添加方法为员工加薪。普通员工的加薪公式为:薪水+薪水*比例。
然后,在测试类Test中,产生3个普通员工,并对他们进行初始化,最后在控制台输出3个普通员工。
-
Staff class
Problem Descr iption: in a company, there are a number of ordinary employees (Employees). On the properties of the staff analysis, and design class, meet the following conditions: 1) all of the property declaration is private, and create corresponding get, set 2) in the class increase construction method, by constructing method, produce the corresponding class of objects without the need for in the test class for each object of the corresponding attribute assignment 3) employee ID by the SID of the static property of the automatic generation, do not need we manually assigned (4) adding method to pay employees. General staff salary formula: salary+ salary* ratio.
Then, in the test class Test, 3 ordinary employees, and they are initialized, and finally in the console output of 3 ordinary employees.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ch3\.classpath
...\.project
...\com\test\Student.class
...\...\....\Student.java
...\...\....\Test.class
...\...\....\Test.java
...\...\test
...\com
ch3