java 考试题 请求各位大神帮个忙 能答多少 答多少 人多力量大 谢谢大家了。!!
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/07/11 01:06:55
java 考试题 请求各位大神帮个忙 能答多少 答多少 人多力量大 谢谢大家了。!!
1) Write a method that receives two int parameters and returns the smaller
of the two values. Call your method getSmaller.
2) Write a method that receives two String objects and returns true if the
two Strings start with the same character (ignoring case) and false
otherwise.
3) Using the Die class, write a method that will use two Die, roll them
100 times and return the number of times that the sum of the two is
7 or 11.
For questions 4 and 5, write the requested portions of a class called Employee.
4) An Employee will have a name, social security number, position, and
hourly wages. Define the instance data for this class.
5) Write a method that is passed the int value of the number of hours worked
for the week as a parameter, and returns the pay for the Employee,
including overtime, which is 1.5 * hourly wages for each hour over 40.
1) Write a method that receives two int parameters and returns the smaller
of the two values. Call your method getSmaller.
2) Write a method that receives two String objects and returns true if the
two Strings start with the same character (ignoring case) and false
otherwise.
3) Using the Die class, write a method that will use two Die, roll them
100 times and return the number of times that the sum of the two is
7 or 11.
For questions 4 and 5, write the requested portions of a class called Employee.
4) An Employee will have a name, social security number, position, and
hourly wages. Define the instance data for this class.
5) Write a method that is passed the int value of the number of hours worked
for the week as a parameter, and returns the pay for the Employee,
including overtime, which is 1.5 * hourly wages for each hour over 40.
![java 考试题 请求各位大神帮个忙 能答多少 答多少 人多力量大 谢谢大家了。!!](/uploads/image/z/6355480-40-0.jpg?t=java+%E8%80%83%E8%AF%95%E9%A2%98+%E8%AF%B7%E6%B1%82%E5%90%84%E4%BD%8D%E5%A4%A7%E7%A5%9E%E5%B8%AE%E4%B8%AA%E5%BF%99+%E8%83%BD%E7%AD%94%E5%A4%9A%E5%B0%91+%E7%AD%94%E5%A4%9A%E5%B0%91+%E4%BA%BA%E5%A4%9A%E5%8A%9B%E9%87%8F%E5%A4%A7+%E8%B0%A2%E8%B0%A2%E5%A4%A7%E5%AE%B6%E4%BA%86%E3%80%82%EF%BC%81%EF%BC%81)
前两题,后面的继续给你写
public int getSmaller(int a,int b){
if(a40){
wages=(hour-40)*e.getHourlyWages()+40*e.getHourlyWages();
}else{
wages=40*e.getHourlyWages();
}
return wages;
}
第三题我再看看是什么意思
public int getSmaller(int a,int b){
if(a40){
wages=(hour-40)*e.getHourlyWages()+40*e.getHourlyWages();
}else{
wages=40*e.getHourlyWages();
}
return wages;
}
第三题我再看看是什么意思
java 考试题 请求各位大神帮个忙 能答多少 答多少 人多力量大 谢谢大家了。!!
俗话说,人多力量大,各位帮帮忙啊,谢谢!
熊猫能活多少岁?拜托了各位 谢谢
蝴蝶能活多少天?谢谢了,大神帮忙啊
地球能活多少岁?谢谢了,大神帮忙啊
地球上最多能承受多少人?拜托了各位 谢谢
人平均年龄能活多少岁?谢谢了,大神帮忙啊
〈爱朝阳〉的作文国旗下演讲,题目是爱朝阳,大家帮个忙,一个人写2、3句就行,人多力量大!拜托了!要快一点哦~~谢谢大家!
日本地震死多少人了?拜托各位大神
随风附水污一回,多少英雄叹此生.是什么意思求大家帮忙谢谢了,大神帮忙啊
语文高手来帮下忙吧写八段话,每段里面有五个成语,写不了八段也可以写一两段,毕竟人多力量大,谢谢大家了~~~~~~~~亲们
就是这个样子,真的谢谢了.能有多少就多少谢谢大家了 真的急用