Creating Abstract Class
class Marine {
int x,y;
void move(int x, int y) {..}
void stop() {..}
void stimPack() {..}
}
class Tank {
int x,y;
void move(int x, int y) {..}
void stop() {..}
void changeMode() {..}
}
class Dropship {
int x,y;
void move(int x, int y) {..}
void stop() {..}
void load() {..}
void unload() {..}
}

Last updated