1700466835
1700466836
public class Project implements IProject{
1700466837
1700466838
//项目名称
1700466839
1700466840
private String name=””;
1700466841
1700466842
//项目成员数量
1700466843
1700466844
private int num=0;
1700466845
1700466846
//项目费用
1700466847
1700466848
private int cost=0;
1700466849
1700466850
//定义一个构造函数,把所有老板需要看到的信息存储起来
1700466851
1700466852
public Project(String name,int num,int cost){
1700466853
1700466854
//赋值到类的成员变量中
1700466855
1700466856
this.name=name;
1700466857
1700466858
this.num=num;
1700466859
1700466860
this.cost=cost;
1700466861
1700466862
}
1700466863
1700466864
//得到项目的信息
1700466865
1700466866
public String getProjectInfo(){
1700466867
1700466868
String info=””;
1700466869
1700466870
//获得项目的名称
1700466871
1700466872
info=info+“项目名称是:”+this.name;
1700466873
1700466874
//获得项目人数
1700466875
1700466876
info=info+”\t项目人数:”+this.num;
1700466877
1700466878
//项目费用
1700466879
1700466880
info=info+”\t项目费用:”+this.cost;
1700466881
1700466882
return info;
1700466883
1700466884
}
[
上一页 ]
[ :1.700466835e+09 ]
[
下一页 ]