question archive CHALLENGE ACTIVITY 7)11

CHALLENGE ACTIVITY 7)11

Subject:Computer SciencePrice:2.85 Bought3

CHALLENGE ACTIVITY 7)11.2: The this implicit parameter. O Define the missing method. Use "this" to distinguish the local member from the parameter name. 1 // ===== Code from file CablePlan.java ===== public class CablePlan { private int numDays; 1 test passed DILONI // FIXME: Define setNumDays() method, using "this" implicit parameter. public void setNumDays(int numDays) { All tests passed /* Your solution goes here */ public int getNumDays() { return numDays; 15 } 16 // ===== end ===== 17 18 // ===== Code from file CallCablePlan.java ===== 19 import java.util.Scanner; 20 Run Feedback?

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

/ Replace line 8 with below code
this.numDays = numDays;