(1) abstract class, class or interface (2) Tool, Drill, or PowerDrill (3) apply(int minutes), apply(), apply(int minute

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

(1) abstract class, class or interface (2) Tool, Drill, or PowerDrill (3) apply(int minutes), apply(), apply(int minute

Post by answerhappygod »

(1) abstract class, class or interface
(2) Tool, Drill, or PowerDrill
(3) apply(int minutes), apply(), apply(int minutes) {}, or
apply() {}
(4) class, interface, abstract class
(5) void turnOff() or void turnOn()
(6) void turnOff() or void turnOn()
(7) interface, class, abstract class
(8) implements or extends
(9) extends or implements
(10) protected void apply (int minutes) , private void apply
(int minutes), or public void apply (int minutes)
1 Abstract Class Class Or Interface 2 Tool Drill Or Powerdrill 3 Apply Int Minutes Apply Apply Int Minute 1
1 Abstract Class Class Or Interface 2 Tool Drill Or Powerdrill 3 Apply Int Minutes Apply Apply Int Minute 1 (87.55 KiB) Viewed 29 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 Drill). 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"! Solution public [Select] [Select] void [Select] } public [Select] boolean isOn: public [Select] this.isOn = true; } public [Select] } this.isOn false; YE PowerDrill [Select] Tool { [Select] System.out.println("drilling for " + minutes + "minutes"); Drill { } public [Select] [Select] Drill
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply