April 9th, 2013, 09:17 AM
Help with java class, subclass
I need help with my work. I'm no good at programming and we started learning java last week, yet we got a hard task to do and i have no idea how to do it. If you could help me with it I would be very grateful.
- implement a class 'motor' with fields 'currentSpeed', 'currentDirection', 'id' and methods 'turnLeft()', 'turnRight()'
- implement basic user interface for controlling the engine
- implement at least two subclasses for different/various electric motors (i.e. a stepperMotor, DCMotor, etc.)
- implement subclass-specific (hardware-dependant) methods
- implement output to see how it works
- implement input for choosing,initializing,operating the motors
Inputs (user can
- coosing a motor subclass
- initializing a motor
- determining state of a motor
- using the motor (left/right)
Outputs (we will see
- all public variables/fields that change value
- internal behaviour of hardware-dependant methods (i.e. logic value of the pins connected to motors)
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.