Question: Write a Java program to implement a simple text based RPG (Role Playing Game). This program will exercise the use of inheritance and polymorphism. You

 Write a Java program to implement a simple text based RPG(Role Playing Game). This program will exercise the use of inheritance andpolymorphism. You will need an abstract class call Actor. The pseudo code

Write a Java program to implement a simple text based RPG (Role Playing Game). This program will exercise the use of inheritance and polymorphism. You will need an abstract class call Actor. The pseudo code for class Actor will be provided down below. You will have two child classes Player and Chicken that inherit from Actor. The program will implement a class Map as a 9x9 matrix of char. The Player should begin at the center of the map and be represented as P. You should randomly place the Chicken, represented as C on the Map. An empty slot can be represented as " ". Following is the example starting output: ! !! ! ! ! ! ! III I II !!O!!!!! ! !! !! !! ! !! ! ! ! ! 1 1 1 1 1 1 1 1 I 1 I I III ! !! !! !! ! ! ! 1 !! ! ! ! up: w | down:s | left:a | right:d | quit:9 your move: The Player should be able to move around the Map using wasd" buttons for moving up, down, left, right. Tying "q" will quit the program. If the player attempts to move off the Map, the player should not be able to move off the map (Consider border check!). The Chicken will also able to move after the player is moved. The chicken also can only move up, down, left right direction RANDOMLY (w/o any console input). Also consider border check on the Chicken

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!