Ready to create your first object? 

Based on class 0001, the object I created on paper was my spaceship. Here is the code of my spaceship.


/**
 * This is my spaceship.
 *
 * @author Jason Petty
 * @version 1.0
 */
public class SpaceShip
{
    // instance variables
    private String name;
    private int hitPoints;
    private int shieldEnergy;
    private int ammo;

    /**
     * Constructor for objects of class SpaceShip
     */
    public SpaceShip()
    {
        // initialise instance variables
       
    }

    /**
     * This is a method that allows the ship to shoot.
     */
    public void shoot()
    {
        // code to shoot
       
    }
    
     /**
     * This is a method that allows the ship to move left.
     */
    public void move_left()
    {
        // code to move left
       
    }
    
        /**
     * This is a method that allows the ship to move right.
     */
    public void move_right()
    {
        // code to move right
       
    }
    
        /**
     * This is a method that allows the ship to lay down a shield.
     */
    public void drop_shield()
    {
        // code to drop a shield
       
    }
}