Buonasera,
Purtroppo non riesco a capire questo errore ,sembra essere tutto in ordine
screenshot
Si tratta di una classe astratta con alcuni metodi non astratti. I metodi astratti sono stati implementati nella classe di test "NewClass"
Il file della classe Tile1 si chiama Tile1.java.
Edit:
non ho nessuna classe
Error
import static explorer.Game.TILE_HEIGHT;
import static explorer.Game.TILE_WIDTH;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public abstract class Tile1{
/* attributes */
private int posX;
private int posY;
private int width;
private int height;
public Rectangle bounds;
private BufferedImage tileSetBuffered;
private BufferedImage [] tileListImages;
public Tile1( int posX, int posY, int width, int height,File tileSetFile)
{
this.posX = posX;
this.posY = posY;
this.width = width;
this.height = height;
bounds = new Rectangle(posX, posY, width, height);
bounds.x = posX;
bounds.y = posY;
/* Gets Buffered Image of the TILESET File */
getBufferedImage(tileSetFile);
/* Gets sub-Images from tileSetBuffered */
getSubImages();
}
private void getBufferedImage( File file){
try {
tileSetBuffered = ImageIO.read(file);
}catch (IOException ex){
System.out.println("Game:getSubImages: " + ex);
}
}
private void getSubImages (){
int col;
int row;
int index = 0;
col = tileSetBuffered.getWidth()/TILE_WIDTH;
row = tileSetBuffered.getHeight()/TILE_HEIGHT;
tileListImages = new BufferedImage[col*row];
index = 0;
for(int i = 0; i < row; i++){
int y= i*TILE_HEIGHT;
for(int j = 0; j < col; j++){
int x = j*TILE_WIDTH;
tileListImages[index++] = tileSetBuffered.getSubimage(x, y, TILE_WIDTH, TILE_HEIGHT);
}
}
}
public abstract void update();
public abstract void updateBounds();
public abstract void updatePs();
}
Class NewClass
import java.io.File;
public class NewClass extends Tile1{
public NewClass(int posX, int posY, int width, int height, File tileSetFile) {
super(posX, posY, width, height, tileSetFile);
}
@Override
public void update() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void updateBounds() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void updatePs() {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
}