Page 1 of 1

Instructions: Declare an interface named with a single method The method thas a single parameter of type named minutes b

Posted: Tue Jul 12, 2022 8:21 am
by answerhappygod
Instructions Declare An Interface Named With A Single Method The Method Thas A Single Parameter Of Type Named Minutes B 1
Instructions Declare An Interface Named With A Single Method The Method Thas A Single Parameter Of Type Named Minutes B 1 (30.57 KiB) Viewed 35 times
Instructions:
Declare an interface named Tool with a single method apply. The method has a single
parameter of type (int named minutes but does not return any value.
Implement an abstract class named (Dritl). The class has a boolean variable and
implements two methods turnon and turnoff. Both have no parameters and do not return
any values.
Implement a class named PowerDrill. The class inherits from Drill and implements the
[Tool) interface. The (apply method outputs a message "drilling for (X} minutes" where (X, is
the minutes argument that is passed to the method, e.g. "drilling for 5 minutes".
Instructions: Declare an interface named with a single method The method thas a single parameter of type named minutes but does not retum any value parameter of type named minutes but does not return any value. Implement an abstract class named The class has a implements two methods Both tave no parameters and do not return any values. Implement a class named . The class inherits from (interface. The method outputs a message "driling for ∣X∣ minutes" where ∣X∣ is the minutes argument that is passed to the method, eg "drilling for 5 minutes". Solution public vold 1 public Drill public this, is On= true: 1 public this.i5On = talse: 1 1 publii PowerBrill Tooll Systemout printini"drilling for " + minutes +∗ " minutest: 1 1