And I'm back. :/ So, I'm writing a class file that interacts with a driver to get a student's info but I'm having a bit of trouble with the input validation. Basically, if I enter any ID number via the driver that doesn't start with the letter E, then the ID number should be set to the default value of E####### and if the concentration isn't CS, IT or IS, it's supposed to default to XX. But lines 17 and 29 keep throwing me the error message "Incomparable types: char and String" and the default values don't kick in so when I run the print statements in the driver, it displays an ID of "Not a valid ID" and a concentration of "Messing up Java programs" that I entered with the driver. I have no idea why it thinks there any chars in there since I declared everything as Strings. Any idea where I messed up and how to fix it?
In line 17 you are trying to see whether the char is equal to the String "E". Maybe you meant myString.startsWith("E") or maybe that the char is equal to 'E'. Subtle difference in the quote marks.
I would suggest you be a bit more aggressive than choosing a default value.You will have problems later on when you use the == operator on Strings. Don't worry; you won't notice that because of your incorrect use of boolean algebra in that line
Why have you got a no‑arguments constructor? Why are you letting your number be set to E###### rather than requiring a “real” number be supplied. To get a “real” number make sure only to expose contructors requiring a “real” number.