Jump to content

make a class of superhero


bench

Recommended Posts

ned help in java.... :(

 

 

The task is to make a class of superhero, and create interface of your 1st and 2nd hero.

And create class which is the son of both heroes that inherits the power of both heroes.

 

The following table describes the information that an SuperHero has.

 

===============================================================

Attributes/Properties | Description

=======================+=======================================

Name | Name of your Super Hero

-----------------------+----------------------------------------

Gender | What gender is your super hero (

-----------------------+----------------------------------------

Power | Power of your Super Hero

-----------------------+----------------------------------------

 

 

 

After finishing this lab you should have 3 class and 2 interface separated as a file.

Possible class names:

- The Main class = the main UI

- The SuperHero class = The superHero super class

- The 1st and 2nd hero interfaces = Your 1st and 2nd superHero which have each own unique power.

- The SonOfTwoSuperHero class = the son of your super hero inherits the power of the both heroes.

-

 

 

 

Create an abstract class called Shape with abstract methods getArea() and

getName(). Write two of its subclasses Circle and Square. Add additional

methods to its subclasses to complete the required inputs of its subclasses.

 

After finishing this lab you should have 4 class separated as a file.

Classes:

- The Main class

- The abstract Shape class

- The Circle class

- The Square class

Link to comment
Share on other sites

I don't know either, but I do know that Java and JavaScript are two totally different things, but many people mistakenly abbreviate JavaScript to 'Java' thinking it's the same.

 

You're posting in the JavaScript forum asking for help with Java - which one do you mean?

Link to comment
Share on other sites

I don't know either, but I do know that Java and JavaScript are two totally different things, but many people mistakenly abbreviate JavaScript to 'Java' thinking it's the same.

 

You're posting in the JavaScript forum asking for help with Java - which one do you mean?

 

 

:( ..its about java....tnx

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...