Question: In java object oriented programming you must design and implement tests for all of your bots. These tests should test all qualities of each type

In java object oriented programming you must design and implement tests for all of your bots. These tests should test all qualities of each
type of bot. You will make a main Test class and static methods for each of your tests. You will
demonstrate your understanding of polymorphism through this testing process. Remember:
polymorphism is the ability to put an object of a descendent type into an ancestor type variable. E.g.
you may put a FlexibleBot in a Bot.
Checklist of tests:
1.Make a minimum of one bot of each type in your hierarchy. If you made 4different bot classes,
you will make objects for each of those types. Make an ArrayList or type bot to put all of
the bots into. Pass that list to the Map.
2.Make an ArrayList of the interface type to demonstrate your knowledge of
polymorphism.
3.Demonstrate moving all bots using a traversal over the list to demonstrate polymorphism.
4.Demonstrate the use of downcasting to call methods that dont exist in Bot class.
5.Test the FlexibleBots following qualities: These are required
a.Test to see if a bot will move all the way to another Entity and stop.
b.Test to see if the bot will turn when it cant move
c.Test to see if the bot will move all the way to the edge of the map
d.Test to see what the bot does when the speed is greater than the distance to the closest
bot
e.Test to see what the bot does when the speed is greater than the distance to the edge
f.Test to see what happens when the bot is surrounded and cant move
g.Test Speed up and speed down.
h.Test teleport()
i.Test counterturn()
6.For each bot that you created, make a new method to perform tests of all new methods. See the
following examples. You must make at least 4tests for each bot.
a.KillBot: test to see what happens when there are no bots in its path
b.KillBot: test to see what happens when there are multiple bots in its path
c.KillBot: test to see what happens when there is only one bot in its path
d.ReproducingBot: Test to see what happens when it is surrounded
e.ReproducingBot: Test to see what happens when there is only one space to move after
generating bots. Will it wall itself in?
f.These are only suggestions; you must come up with test ideas on your own.

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 Programming Questions!