I'm completely new to programming, and I'm having difficulties understanding my assignment, and how I proceed solving it.
The assignment is introduced by saying: The String class defines a length accessor method with the following header: public int length() So the following is an example of its use with the String variable fullName; fullName.length()
The assignment then asks me to add conditional statements to the constructor of Student to print an error message if either the length of the fullName parameter is less than four characters or the length of the studentId parameter is less than three characters. However, the constructor should still use those parameters to set the name and id fields, even if the error message is printed.
The assignment also suggests that use if and else methods.
I've read up on everything until this point, but I simply don't understand how I proceed - I do, however, understand what it's supposed to function.
Can you guys perhaps lead me the way, or just give some hints on how I get started on this? It's noteworthy to mention that this is coded in BlueJ, and it's using an example of the project "LabClass".