League Invaders Pt.1

Runner Class and Window

*NOTE*

For every class you create, you should automatically make a constructor. If you don't know what that means, refer to level 1.

1. Create a new class called LeagueInvaders. This will be the class that controls the entire program using the classes that you will later create. This is sometimes called a RUNNER class.

2. Add a main method to this class. THIS SHOULD BE THE ONLY MAIN METHOD IN YOUR PROGRAM!

3. First we need a window to display our game. Create member variable in your class for a JFrame.

4. We need to keep track of the size of our window. Create two final int variables for the width and the height of your game. Set the width to 500 and the height to 800.

5. In your constructor, initialize the JFrame.

6. Create a void method called setup().

7. In the setup method, add the code necessary to make your game window show up. Do not forget to use setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

8. Create a LeagueInvaders object in your main method and use your object to call the setup method. Does your window show up?