Jav程序设计_第三版_辛运帏_课后答案
import java.util.*; class MyDate{ private int year; private int month; private int day;public MyDate(int y,int m,int d){//构造函数,构造方法 year=y; month=m; day=d;
}//end public MyDate(int y,int m,int d) public int getYear(){//返回年 return year; }//end getYear()
public int getMonth(){//返回月 return month; }//end getMonth()
public int getDay(){//返回日 return day; }//end getDay() }//end class MyDate class Employee{
private String name; private double salary; private MyDate hireDay;
public Employee(String n,double s,MyDate d){ name=n; salary=s; hireDay=d;
}//end public Employee(String n,double s,MyDate d) public void print(){
System.out.println("名字:"+name+"\n工资:"+salary+"\n雇佣年份:"+hireYear()+"\n"); }//end print()
public void raiseSalary(double byPercent){ salary*=1+byPercent/100; }//end
public int hireYear(){
return hireDay.getYear(); }
完整课后答案请下载附件, 回复本帖子即可查看解压密码
**** Hidden Message *****
**** Hidden Message ***** 感谢上传!up主辛苦了! 密码是什么 你好,密码是什么?
谢谢! 赞赞赞hhhhh谢谢谢谢 654f6gfdgfdg 高帮葵花他他他恶心啧啧啧UK不哇哇哇 佳佳加油,佳佳加油佳,佳加油 求密码赞赞攒攒赞赞赞
页:
[1]