Dangerousmonster which inherits the monster

Assignment Help JAVA Programming
Reference no: EM13163668

For the below descriptions your task is to draw a UML class diagram showing the various interfaces and classes

  1. An interface - Monster with a method menace() with return type as void

  2. An interface - DangerousMonster which inherits the Monster interface and has a method called destroy() with void return type.
    (Note: Just like a class can inherit from another class, an interface can inherit from another interface using the "extends" keyword.

  3. An interface - Lethal with a method - Kill( ) with void return type.

  4. A class DragonZilla which implements DangerousMonster. This class does not have any methods of it's own but provides implementation for the methods from DangerousMonster. The implementation of these methods simply prints meaning full statements that includes the name of the class and method using System.out.println() eg. "DragonZilla can be menace to children"

  5. An interface - Vampire that extends DangerousMonster and Lethal interfaces. This method has it's own method - drinkBlood( ) with return type as void.
    (Note: An interface can inherit from multiple interfaces but a class can inherit from at most one Class.)

  6. A class VeryBadVampire that implements Vampire interface. The methods that are inherited would simply provide an implementation that will print the name of the class and name of the method just like in step d.

  7. A class HorrorShow with the following implementation.

public class HorrorShow

{

public static void u(Monster b)

{

b.menace();

}

public static void v(DangerousMonster d)

{

d.menace();

d.destroy();

}

public static void w(Lethal l)

{

l.kill();

}

public static void main(String[] args)

{

DangerousMonster barney = new DragonZilla();

u(barney);

v(barney);

Vampire vlad = new VeryBadVampire();

u(vlad);

v(vlad);

w(vlad);

                        }

}

Reference no: EM13163668

Questions Cloud

The sport of gymnastics requires both impressive : The sport of gymnastics requires both impressive physical strength and extensive training for balance. The iron cross is an exercise performed on two suspended rings
Write an isr and startup code for a system that lights up le : Write an ISR and startup code for a system that lights up LED0 on the PSoC Eval1 board (assuming that a wire is connecting P1[0]) to indicate "Low Voltage"
Automated emails from google apps spreadsheet ? : How to send automated emails from google apps spreadsheet ?
Investigate the weaknesses that arise in elgamal encryption : investigate the weaknesses that arise in Elgamal encryption if a public key of small order is used. We look at the following example. Assume Bob uses the group Z
Dangerousmonster which inherits the monster : An interface - DangerousMonster which inherits the Monster interface and has a method called destroy() with void return type.(Note: Just like a class can inherit from another class, an interface can inherit from another interface using the "extends..
Create a website that would allow users to enter and submit : Create a Website that would allow users to enter and submit survey
Create huffman codes : Write a C++ program to create Huffman codes. Program input is a file called freq.txt (make up your own file for testing) that contains data on the characters in some cleartext file in the form of each character's non-zero frequency of occurrence i..
Discuss the issues that managing and implementing : Discuss the issues that managing and implementing the technology architecture you would have and how you would overcome these challenges. Be sure to discuss at least three challenges.
Give a recursive definition of s. : Let S be the set of positive integers that can be written as a sum of one or more 4's and/or 7's. For example, 7 ? S and 18 ? S (because 18 = 4 + 7 + 7)

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