- class Caculate{
- private String name;
- private double money;
- private double actual;
-
- public Caculate(String username,double money) {
- this.name=username;
- this.money=money;
- }
-
- public double HowMany(){
-
- double shouru = money;
- if(shouru <= 1500){
- System.out.print("不需要缴纳个人所得税");
- this.actual=shouru;
- }else if(1500 < shouru && shouru < 3000){
- this.actual = shouru*(1 - 0.05);
- }if(3000 <= shouru){
- this.actual=shouru-(shouru-3000)*0.1;
- }
- System.out.println("实际收入为:"+this.actual);
-
-
- return this.actual;
- }
- }
- public class PersonalFax {
- public static void main(String args[]){
- Caculate shiji = new Caculate("码农小江", 1000.2345);
- double shou =shiji.HowMany();
- System.out.printf("%.3f", shou);
-
- }
-
- }
相关文章:
-
2021-07-22
-
2022-01-16
-
2022-02-13
-
2022-12-23
-
2021-12-23
-
2021-12-23
-
2021-12-15
-
2022-12-23
猜你喜欢
-
2022-01-03
-
2021-04-14
-
2022-02-24
-
2021-12-23
-
2021-10-06
相关资源
-
下载
2023-01-01
-
下载
2023-02-22
-
下载
2023-02-09
-
下载
2023-02-04