Results 1 to 6 of 6
  1. #1
    mike_ is offline Member
    Join Date
    Oct 2011
    Posts
    18
    Rep Power
    0

    Default Implementing Class Files Into Driver

    Hello,
    I am having trouble figuring this out. I have a project where you build your own computer. I have the driver "Builder" but I also have a couple class files, "HardDrive" , "Ram", "Screen", & "Holiday Freebie". I want to be able to use the information in those class files in the driver. I originally had 1 driver and 1 big class file and that was easy to call. I am just really confuse how to call the other class files now that I have multiple class files.

    Thanks in advance!

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

    Default Re: Implementing Class Files Into Driver

    Your post is very vague. You create objects and call their methods just like you do with Strings and any other class you have experience with so far.
    Java Code:
    class Driver {
        public static vodi main(String[] args) {
            HardDrive hd = new HardDrive();
            hd.someMethod();
        }
    }

  3. #3
    mike_ is offline Member
    Join Date
    Oct 2011
    Posts
    18
    Rep Power
    0

    Default Re: Implementing Class Files Into Driver

    i need to do that for all the classes? and is that letting me access all the public files in "HardDrive"?

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Implementing Class Files Into Driver

    I think that junky and I are both having a great deal of difficulty trying to understand just what your problem is. You may wish to clarify things a bit.

  5. #5
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

    Default Re: Implementing Class Files Into Driver

    Do you mean methods? How about you try it and see. The best way to learn is to experiment.

  6. #6
    mike_ is offline Member
    Join Date
    Oct 2011
    Posts
    18
    Rep Power
    0

    Default Re: Implementing Class Files Into Driver

    I actually got it to work. I experimented like you said. I am sorry for the vague information as well. Thanks for your help though!

Similar Threads

  1. help with implementing Generic Array class
    By aqeel2010 in forum New To Java
    Replies: 2
    Last Post: 11-29-2011, 09:40 AM
  2. Question about a class implementing Runnable
    By d3n1s in forum Advanced Java
    Replies: 12
    Last Post: 06-18-2011, 07:16 PM
  3. Need Urgent Help in Implementing Interface Class
    By yel_hiei in forum New To Java
    Replies: 4
    Last Post: 07-29-2010, 02:42 PM
  4. using a driver with a class
    By vendetta in forum New To Java
    Replies: 7
    Last Post: 01-11-2010, 07:12 AM
  5. need help with implementing class
    By ALH813 in forum New To Java
    Replies: 3
    Last Post: 10-02-2009, 12:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •