Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA We will play a game of Improved Artillery. In this game, you will have two tanks. Each tank will start a random distance apart

JAVA

We will play a game of Improved Artillery. In this game, you will have two tanks. Each tank will start a random distance apart. Each tank will take turns firing at the other until one has been eliminated. You will need to create classes for the tank, the game and the main. The tank class should have a method to fire and to take damage as well as a method to report the hit points left. It does not have to move. The game class should contain two instances of the tank class as well as any other variables needed to play the game. The game class will call the fire method from one tank and pass it on to the other tank as damage. You will also need a method in the game class to decide if one tank has been eliminated. You will need additional methods in the game class to play a round and to play the game.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions