Results 1 to 8 of 8
  1. #1
    knightwriter is offline Member
    Join Date
    Nov 2011
    Posts
    49
    Rep Power
    0

    Default Programming Logic Class

    I'm taking a programming logic class as an introduction into programming. I'm trying to apply what I'm learning by using Java on my own, not in class. So far I'm doing well. However, I have a question that my professor was not able to answer for me. She is Chinese and I'm not sure if it's a language barrier or what, so I thought I would ask here.

    I'm writing a program in pseudocode and have created a module in my mainline program. I am not sure how to apply Java to this. Is there a way to create a module in Java? If so, does it run in the mainline program or does the module bounce out to the module then complete the module and bounce back to the mainline program? Does the module just run in the mainline program?

    So far the best I can come up with is that I need to create a function that calls the needed module. Could any one show me what the code would look like for a module in Java?

    Thank you for your time and hello to you all. I expect to be here on these forums for a long time as I really enjoy Java and I'm having a great time learning about computer programming. I plan to be a programmer after I graduate from college.

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    618
    Rep Power
    4

    Default Re: Programming Logic Class

    Hi.
    The module is just parts code which you can use separately. For example when you want to testing your code you use junit libraries. It is a testing module.
    Skype: petrarsentev
    http://TrackStudio.com

  3. #3
    knightwriter is offline Member
    Join Date
    Nov 2011
    Posts
    49
    Rep Power
    0

    Default Re: Programming Logic Class

    Quote Originally Posted by Petr View Post
    Hi.
    The module is just parts code which you can use separately. For example when you want to testing your code you use junit libraries. It is a testing module.
    Thanks for the response. I guess this is a little over my head. Are you saying that there really isn't an equivalent to a module in Java? What if I were to create a new class and wanted to call that information to the mainline logic?

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: Programming Logic Class

    What is your definition of module? In java the independent pieces of a program are classes. Each class file contains the logic (ie methods) and data for only that class. The code in one class can create objects and use its methods.

  5. #5
    knightwriter is offline Member
    Join Date
    Nov 2011
    Posts
    49
    Rep Power
    0

    Default Re: Programming Logic Class

    Quote Originally Posted by Norm View Post
    What is your definition of module? In java the independent pieces of a program are classes. Each class file contains the logic (ie methods) and data for only that class. The code in one class can create objects and use its methods.
    Hi Norm. I think you may have clarified this for me. I was looking at a module as an independent piece of programming that would create some value which would then be output back into the mainline program. I'm guessing there is a way to call a class to the mainline program at a specific point in the mainline program and have that class run, while the mainline program paused, waiting for the class logic to finish. (If this doesn't make sense, I can input some of my pseudocode as a reference.)

    Thanks again for the help!!

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: Programming Logic Class

    an independent piece of programming
    A class could fit that description.
    create some value which would then be output back
    That would describe a method.
    while the mainline program paused, waiting for the class logic to finish.
    That would be a description of what happens when one method calls another.

  7. #7
    knightwriter is offline Member
    Join Date
    Nov 2011
    Posts
    49
    Rep Power
    0

    Default Re: Programming Logic Class

    Thanks so much Norm!!! You really helped me understand this. I've been beating my head against the Java manual I have and my programming logic text book for hours trying to figure this out.

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: Programming Logic Class

    The vocabulary is important to understand as you talk with other programmers about problems. It's not "Greek" but close.

Similar Threads

  1. Replies: 0
    Last Post: 07-13-2010, 06:25 PM
  2. Replies: 1
    Last Post: 10-02-2009, 01:35 AM
  3. Replies: 16
    Last Post: 05-28-2009, 03:41 PM
  4. Replies: 14
    Last Post: 05-28-2009, 05:44 AM
  5. Replies: 3
    Last Post: 10-06-2008, 11:03 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
  •