Results 1 to 5 of 5
Thread: Array List help
- 10-26-2009, 09:44 PM #1
Member
- Join Date
- Oct 2009
- Posts
- 2
- Rep Power
- 0
Array List help
So I am doing a lab for university and unfortunately the prof is really terrible.
I need to make a project, using BlueJ, where I have to use an Array List to populate some classes.
the classes are; BirdSpecies, Person, Sighting, BirdList and Repository.
BirdSpecies has 3 methods, birdName, birdAbbreviation and birdScientificName
Person has 3 methods, personFirstName, personLastName, and personBirdSaw
these 2 classes have the simple getters, setters, constructors and toString.
basically, thats all he has given us and expects us to just figure out what array lists are and make it so that everything can be populated through the Repository class. (or something to that extent)
Any help? Where do i start?
-
Given your instructions, you should be able to make class skeletons, i.e.,
Then start fleshing out your getters and setters. Come on back if you run into a specific road block. Good luck!Java Code:public class MyClass { private String something; public MyClass() public String getSomething() { return something; } public void setSomething(String something) { this.something = something; } }
- 10-26-2009, 10:11 PM #3
Member
- Join Date
- Oct 2009
- Posts
- 3
- Rep Power
- 0
I would guess that the Bird class is the simplest, so you should make that first, then the Sightings, then the Person, which probably has a list of sightings so you can know from the Person class what birds were seen. The repository class then probably has two ArrayLists, of Person and Bird, where you can then start entering info.
edit: wow I'm slow.
- 10-26-2009, 10:22 PM #4
Member
- Join Date
- Oct 2009
- Posts
- 2
- Rep Power
- 0
Thanks for the help, but i think im going to need ALOT more help than i should on this. Going to need someone basically walk me right through this with me from start to finish.
-
Then you should talk to your teacher. There are limits on what volunteers can or should do on a forum such as this one.
My recommendation remains the same: try to do as much as you can on your own, and then come on back with specific questions over your code.
Much luck.
Similar Threads
-
Array List
By mashyum in forum Advanced JavaReplies: 2Last Post: 07-28-2009, 06:47 AM -
linked list or array?
By sick_peng in forum New To JavaReplies: 6Last Post: 04-15-2009, 07:33 PM -
Array List
By mprentice84 in forum New To JavaReplies: 2Last Post: 02-20-2009, 02:12 AM -
array list help
By dorno83 in forum New To JavaReplies: 9Last Post: 11-07-2008, 09:56 AM -
using an Array list
By toad in forum New To JavaReplies: 1Last Post: 11-18-2007, 09:08 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks