I'm studying java and as part of my project I have to create a constructor that initializes 6 instance variables, 2 of them are doubles (2 Strings and 2 ints too) and I need to work in that those two doubles do not go below 0. If one of them is negative it has to set the relevant field to 0. The other numeric fields will be initialized to 0.
I know how to create an if else that will check one field but I'm lost on how to do 2. Belowis what I have so far but it's wrong. Can anyone provide insight?