oo query


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: oo query

  1. #1
    Join Date
    Feb 2005
    Posts
    24

    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

  2. #2
    Join Date
    Sep 2006
    Posts
    68
    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);

  3. #3
    Join Date
    Feb 2005
    Posts
    24
    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

  1. SQL2000 remote SQL query
    By lightningtechie in forum Database
    Replies: 1
    Last Post: 02-07-2006, 08:34 AM
  2. Multi-table Select Query using Joins
    By knightsg in forum Database
    Replies: 0
    Last Post: 02-16-2005, 08:07 AM
  3. Query causes fatal error with MSAccess97 db
    By Bernie in forum VB Classic
    Replies: 0
    Last Post: 12-17-2002, 07:31 AM
  4. reg...select count distinct....query
    By Mohan Ekambaram in forum Database
    Replies: 0
    Last Post: 12-09-2001, 11:56 AM
  5. reg....count distinct query
    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center