Results 1 to 2 of 2
  1. #1
    Hash is offline Member
    Join Date
    Feb 2012
    Posts
    1
    Rep Power
    0

    Default Accessing specific class if condition is true

    I'm making a trigonometry application with the different formulas for each shapes and such. What I wanted to know is: is there any way to make a boolean and access a specific class if this boolean is true?

    Since I'm making Degree and Radian sub-classes, I needed to make it so when the boolean isInDegrees is true, it accesses Degree class, and the inverse if isInRadian is true.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,272
    Rep Power
    25

    Default Re: Accessing specific class if condition is true

    You could use an if statement to test the boolean and do something if it is true
    What do you mean by "access a class"?
    call a method in a class
    create an instance of a class

Similar Threads

  1. Replies: 3
    Last Post: 01-26-2012, 11:20 PM
  2. Replies: 5
    Last Post: 12-18-2011, 04:06 AM
  3. How do I stop or kill a running thread when a condition is true
    By chikaman in forum Threads and Synchronization
    Replies: 3
    Last Post: 12-21-2009, 11:07 PM
  4. Replies: 6
    Last Post: 03-31-2009, 04:27 AM
  5. Replies: 8
    Last Post: 03-21-2009, 09:34 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
  •