Results 1 to 3 of 3
  1. #1
    STILET is offline Member
    Join Date
    Jul 2008
    Posts
    1
    Rep Power
    0

    Default how to creat collection

    Creat the abstract class Bird, there is no abstact method flapwings and String name.
    Creat derived abstract classes Flyingbird, Swimmingbird, Flyingandswimmingbird with corresponding abstact methods swim and/or fly.
    Creat no abstact subclasses from class Bird, for example:Dove, Eagle, Ostrich, Swan.
    Creat 4 classes, which model next bird flocks:
    1. flock of any birds
    2. flock of flying birds
    3. flock of swimming birds
    4. flock of flying and swimming birds
    Flocks creat with the objects type Collection. There is espessial method for adding birds to the flock, it being known that adding alien objects must be impossible.
    Classes structure must be so, that swan can adding to every flock. In every flock must be method, which make all birds, included in this flock, do, that all birds of flock ought do: flapwings and/or fly and/or swim.
    About all actions print corresponding messages.
    In test programm creat 4 different flocks, include in these flocks a few birds.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,616
    Rep Power
    25

    Default

    Ok, you've shown us the assignment, now what are your questions?
    Design the program, write some code and come back if you need help.

    When you read the API doc, you'll see that Collection is an interface, not a class.
    This means that you implement it, not extend it. Read your text if that doesn't make sense.
    Last edited by Norm; 07-26-2008 at 03:50 AM.

  3. #3
    jack239 is offline Member
    Join Date
    Jul 2008
    Posts
    35
    Rep Power
    0

    Default

    What is the question dude? Wanna help from us for writing pseudo code, huh?
    New to Java/PHP/Javascript development?
    For free help go to- www.techcubetalk.com

Similar Threads

  1. Problem using buttons to creat a magic square game
    By goldman in forum New To Java
    Replies: 5
    Last Post: 05-05-2008, 05:04 AM
  2. How to use Collection in Spring
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-29-2008, 01:45 PM
  3. Garbase Collection
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-30-2007, 10:37 AM
  4. How to use Collection in Springs
    By JavaBean in forum Java Tip
    Replies: 0
    Last Post: 09-26-2007, 09:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •