I have a Game
class and in that class exists a KeyInputHandler
class. I believe this is a "has a" relationship but I am not 100% sure. If this is indeed a "has a" relationship it would be composition and I know what symbols to use, but if it is something else then I could use some advice.
EDIT:
This is the structure of the two classes I am concerned with.
//Import stuff
public class Game extends Canvas { //The Game class
public Game (){ //Game constructor
}
//Other methods and stuff will go here
private class KeyInputHandler extends KeyAdapter {
//This is the only other class in my Game, and
//you can see it is enclosed in the Game class
}
public static void main(String[] args) {
Game game = new Game(); // Creates a new game
}
}