Part of my coursework is to create a moving alien. i have completed this 99.9% for some reason when it bounces at a certain point the alien vanishes from the screen. please help me this is the last thing i need to do.
Here is my two pieces of code (save the first one as Alien and the second as DemoAlien:
class Alien {
int bodyXLoc;
int bodyYLoc;
int bodyWidth;
int bodyHeight;
int eyeWidth;
int eyeHeight;
int eyeXLoc;
int eyeYLoc;
int eyeballWidth;
int eyeballHeight;
int eyeballXloc;
int eyeballYloc;
int earleftWidth;
int earleftHeight;
int earleftXloc;
int earleftYloc;
int earrightWidth;
int earrightHeight;
int earrightXloc;
int earrightYloc;
int mouthXloc;
int mouthYloc;
int mouthHeight;
int mouthWidth;
int noseXloc;
int noseYloc;
int noseHeight;
int noseWidth;
int eyebrowXloc;
int eyebrowYloc;
int eyebrowHeight;
int eyebrowWidth;
int speedXLoc;
int speedYLoc;
Alien(int tempX, int tempY, int tempWidth, int tempHeight, int tempXSpeed, int tempYSpeed) {
bodyXLoc = tempX;
bodyYLoc = tempY;
bodyWidth = tempWidth;
bodyHeight = tempHeight;
speedXLoc = tempXSpeed;
speedYLoc = tempYSpeed;
i am creating an alien as part of my uni coursework. it is to move etc. i have finished the latest step and for some reason it will not work it is supposed to move and bounce off the screen.