-
oo query
hi guys
I have primitive obsession in my current program and i wanna make it oo.
at the moment i have one class which is called playerselect. for oo i would need to create two classes. within the same class i have
static int enteramount, j, k;
static int numberofplayers = -99;
static int humanpl = -97;
now my main problem is how to turn these into objects. Im using eclipse omundo. and Ive been testing attributes and constructers. now from my understanding would I turn these into attributes? can some explain what option i would use to turn the current variables into objects???
thanks alot
here
-
Do you mean that?
public class PlayerSelect {
public int enteramount, j, k;
public int numberofplayers = -99;
public int humanpl = -97;
public static void main(String[] args) {
PlayerSelect ps1 = new PlayerSelect();
PlayerSelect ps2 = new PlayerSelect();
}
}
Or that?
Integer jObj = new Integer(j);
-
what Im trying to say is at the moment i have these varables which the method uses. Now to turn these into objects i would to create a new class but what options would I use in eclipse to turn them into object e.g would i be using setter and getters?
Last edited by shahkhan; 10-08-2006 at 11:05 AM.
Similar Threads
-
By lightningtechie in forum Database
Replies: 1
Last Post: 02-07-2006, 08:34 AM
-
By knightsg in forum Database
Replies: 0
Last Post: 02-16-2005, 08:07 AM
-
By Bernie in forum VB Classic
Replies: 0
Last Post: 12-17-2002, 07:31 AM
-
By Mohan Ekambaram in forum Database
Replies: 0
Last Post: 12-09-2001, 11:56 AM
-
By Mohan Ekambaram in forum Database
Replies: 0
Last Post: 12-08-2001, 11:21 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
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|