Implement the classes and interfaces

Assignment Help JAVA Programming
Reference no: EM131602761

Polymorphism

After you release the revised Super Happy Fun Cute Creatures World Traveler from Homework 3, the game gains worldwide popularity. Kids and adults from Europe to Asia to North America are playing it, and you even get fan mail from one random scientist down in Antarctica.

But a game company's work is never done! You decide it's time to break into the niche market of space combat simulators. The basic idea behind your sim is that you control a spaceship that can fire different types of weapons. Each weapon has its own attack damage and load time. (Generally speaking, longer loading weapons should give you higher damage, and vice versa.)

1. Implement the following classes and interfaces:

a. An interface Drawable that contains a single method, draw(). This interface will be implemented by any classes representing game objects that you want to draw on the screen. This makes it so the game engine (which you don't need to write for this assignment...) can treat every object you want to show on the screen as type Drawable, and it can simply call draw() on each of those objects to renderit.
b. A class Spaceship that implements Drawable. For now, the draw() method can just display some text - make this as simple or elaborate as youwant!
c. An abstract class Weapon that contains instance variables for damage and load time. Weapon should also contain an abstract method fire(), and it should implement a Comparable interface by providing a compareTo(Comparable c) method based on the load time. Finally, Weapon should implement Drawable with the abstract methoddraw().
d. A Laser subclass of Weapon. Laser must implement the fire() and draw() methods inheritedfrom
Weapon. Both methods can just display some text - be as simple or elaborate as you want!
e. A SingularityCannon subclass of Weapon. SingularityCannon must implement the fire() and draw() methods inherited from Weapon. Both methods can just display some text - be as simple or elaborate as youwant!

Include some way to specify the damage and load time of your Weapon objects. This could be via setter methods, constructors, randomly assigned values in some range, or some combination thereof.

Attachment:- Inheritance.zip

Reference no: EM131602761

Questions Cloud

What is probability that the next claim the company process : What is the probability that the next claim the company processes will be fraudulent? Please state the probability as a decimal value.
Write a paper of your impression of jelly bellys operations : Write paper of your impression of Jelly Belly's operations. Discuss problem or inefficiency that you notice and share your suggestion to improve it's operation.
Define the sexual dysfunctions and paraphilias : the sexual dysfunctions and paraphilias. In addition, it better differentiated diagnostic criteria for children versus adolescents and adults
Provide an opportunity for you to review an area of interest : Provide an opportunity for you to review an area of interest and apply the concepts you have learned in this course to a patient situation.
Implement the classes and interfaces : You decide it's time to break into the niche market of space combat simulators. The basic idea behind your sim is that you control a spaceship that can fire dif
Important requirements for an msds : Explain the most important requirements for an MSDS to an organization's Environmental Health and Safety (EHS) programs and protocols
Aspects of production material : identify the primary Federal framework governing some aspects of production material? (This is mainly for the environment in reverse logistics)
Explain what staffing is and why it is important : Explain what staffing is and why it is important. State what assessments will be used and why. Discuss the types of interviewing techniques that will be used.
Explain what role gnosticism played in the bible : How would you summarize the evidence for the role of the Spirit in the Bible. Explain what role Gnosticism played in the Bible.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd