Slow down and test as you go.
Don't try and write the whole thing, then wonder why it's full of errors and/or doesn't work.
Code:
if ( male ) {
if ( over_thirty ) {
} else if ( thirty_and_under )
}
} else if ( female ) {
if ( over_thirty ) {
} else if ( thirty_and_under )
}
}
Without filling in any calculations, make sure this logic actually compiles before trying to do anything else.
Then add one calculation like so.
Code:
if ( male ) {
if ( over_thirty ) {
percentfat = // whichever it is.
} else if ( thirty_and_under )
}
} else if ( female ) {
if ( over_thirty ) {
} else if ( thirty_and_under )
}
}
// Then however you write to your results text field
result = "Fat = " + ToString.to_string();
Check that when you select male over 30 in your radio buttons and type in some values into your other dialogs, that the final result is OK when you press calculate.
Then do the same for the other calculations.