April 2019
Intermediate to advanced
360 pages
9h 17m
English
The SystemAccelerator class is presented here in two parts. The first part establishes the class variables, the constructor method, an accessor method that returns the speed, and an isEnabled() method that returns the value of the enabled variable:
public class SystemAccelerator { // class variables private WidgetProductionSystem mediator; private boolean enabled; private int speed; // constructor public SystemAccelerator(WidgetProductionSystem mediator) { this.mediator = mediator; enabled = false; speed = 0; mediator.mediateSystemAcceleration(this); } // accessor public int getAcceleratorSpeed() { return speed; } public boolean isEnabled() { return enabled; }
The second part of the SystemAccelerator class contains ...
Read now
Unlock full access