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.
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