Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Define the missing method. Use this to distinguish the local member from the parameter name. Learn how our autograder works //===== Code from file
Define the missing method. Use "this to distinguish the local member from the parameter name. Learn how our autograder works //===== Code from file CablePlan.java public class Cable Plan { private int numDays; // FIXME: Define setNumDays() method, using "this" implicit parameter. public void setNumDays (int numDays) { /* Your solution goes here */ } public int getNumDays() { return numDays; } } // ===== Code from file CallCablePlan.java ===== import java.util.Scanner; public class CallCablePlan { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); CablePlan house1Plan = new CablePlan(); int userNum; userNum = scnr.nextInt(); house1Plan.setNumDays(userNum); System.out.println(house1Plan.getNumDays 0); } =====end } // end
Step by Step Solution
★★★★★
3.39 Rating (168 Votes )
There are 3 Steps involved in it
Step: 1
To define the missing setNumDays method in the CablePlan class and ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started