文件名称:ch3
-
所属分类:
- 标签属性:
- 上传时间:2016-03-23
-
文件大小:2.98kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
计人员类
问题描述:在一个公司中,有若干名普通员工(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
ch3/.project
ch3/com/test/Student.class
ch3/com/test/Student.java
ch3/com/test/Test.class
ch3/com/test/Test.java
ch3/com/test
ch3/com
ch3
ch3/.project
ch3/com/test/Student.class
ch3/com/test/Student.java
ch3/com/test/Test.class
ch3/com/test/Test.java
ch3/com/test
ch3/com
ch3
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.