SHARE
TWEET

Untitled

a guest Mar 19th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.awt.*;
  2. public abstract class PacManCharacter {
  3.    private int xPos,yPos;
  4.    public PacManCharacter() {
  5.       xPos=0;
  6.       yPos=0;
  7.    }
  8.    public PacManCharacter(int xPos,int yPos) {
  9.       this.xPos=xPos;
  10.       this.yPos=yPos;
  11.    }
  12.    public void setX(int xPos) {
  13.       this.xPos=xPos;
  14.    }
  15.    public void setY(int yPos) {
  16.       this.yPos=yPos;    
  17.    }
  18.    public int getX() {
  19.       return xPos;
  20.    }
  21.    public int getY() {
  22.       return xPos;
  23.    }
  24.    public abstract void paintCharacter(Graphics window);
  25. }
  26.      
  27. PacManGhost.java:7: error: constructor PacManCharacter in class PacManCharacter cannot be applied to given types;
  28.       super(xPos,yPos);
  29.       ^
  30.   required: no arguments
  31.   found: int,int
  32.   reason: actual and formal argument lists differ in length
  33. 1 error
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top