Couple questions about Java
I'm currently trying to do my final project for my Java class. Here is a screen-shot of a completed version.
http://i32.photobucket.com/albums/d2...nalprojpic.jpg
It's going to be an applet and may possibly be written in three classes: FinalProjectInit, CBus, and CThing. On the assignment sheet it says "Typically the CBus class will keep track of other objects using a Vector or an array."
and "CThing class - a class used for instantiating objects managed by CBus."
There was a total of four projects you could do so I don't know if everything said applies to my project.
For the project there are three pictures, each of a person and along with them is a name. When we select a radio button, it says (name assigned to picture) is (whatever radio button is selected). The button "Next" moves to the next picture along with that name and does the same thing.
Would I even need a vector for this project? I'm also a bit confused on what would go into CBus. My CThing currently looks like this:
import java.awt.Image;
public class CThing{
public static final int cpokemonRed = 1, cpokemonBlue = 2, cpokemonYellow = 3;
private String name, game;
private Image image;
public CThing(String n){
}
public String getName() {
return name;
}
public void setName(String n) {
this.name = n;
}
public String getGame() {
return game;
}
public void setGame(String g) {
this.game = g;
}
public Image getImage() {
return image;
}
public void setImage(Image image) {
this.image = image;
}
public String toString(){
return this.getName() + " is playing " + this.getGame();
}
}
Chunk from the Goonies, Samus Aran, and Chris Farley are my three images/names. And my output should look like: (name) is playing (one of the three pokemon games).
I'm pretty lost on this thing. I have nothing in CBus yet and I know I have more to do in CThing/FinalProjectInit.
Any help would be greatly appreciated.