Gabe U. answered 11/18/21
Algebra, Python, and Java Tutoring
If I understand your question correctly, you are asking how to print bd.display() only if the user has put input into input1 and input2, but to print dbd.display() if there is no input for either input1 or input2.
The first problem I notice is that your variables are static, this means that every time you make a new BloodData object, those variables are changed to whatever the new value is. In other words, when constructing dbd, you delete whatever input1 and input2 were. Because of this, no matter what you put in your if, it will always look like it is calling dbd.display() even if it isn't. If you get rid of the static keyword on your variables, your if could look something like this:
If that is intentional and I just don't understand why, you could move the dbd construction inside the else, so that the values aren't rewritten. Then, your if would look something like:
I hope that answers your question.