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.
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.
What is the question dude? Wanna help from us for writing pseudo code, huh?