Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Could you tell me what\'s wrong with that? Could you help me to revise that MAAg

ID: 3818789 • Letter: C

Question

Could you tell me what's wrong with that? Could you help me to revise that

MAAgityi ava Project 100 deaProjects/Project 1001 Da Project1001. src) C uselessCalculate Project c Look java x c price java x v D Project1001 /ldeaProjects/Projec dea out Created by Zhongbojun on 2017/4/16. Src import java math Look 5 public class. uselessCalculate price public int calculate int a,int L) price goodPrice new price int n 0; good Price. IPE(a); 10 return a D Project 1001.imal Look bad Price se new LookOi External Libraries int N badPrice ay 13 15 16 18 19 20 21 6: TODO Terminal Platform and Plugin Update IntellUIDEA is ready to update. (8 minutes ago Platform and Plugin Updates intellij IDEA is ready to update. 19-2 LF: UTF-8

Explanation / Answer

Erro is because of return statement must be at the end of any function. Replace your function with this code :

public int calculate(int a,int l) {
     price goodPrice = new price();
     int n =0;
     n = goodPrice.IPE(a);

     Look badPrice = new Look();
     int N = 0;
     N = badPrice.day();

    return a;

     }
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote