this is 1st BAD practice.
if You have exceptions, PLS play attention to result.
in the specific case You could have exception AS You cannot read here:
FileReader(directoryName +
file is missing.
2) You did not try to test if You caught exception: 2ns bad practice. You have to deliberately FAKE your parti to verify You catch it!
(and then restore correct path)
3) bad practice; You did not ask HOW to manage exception: or You propagate it OR return NNULL
You simply return new Assistant(id,(int)steps,(int)turn);
You have at least 4 bad practices!
I see:
} catch (IOException e) { e.printStackTrace(); } catch (ParseException e) { e.printStackTrace(); }
this is 1st BAD practice. if You have exceptions, PLS play attention to result.
in the specific case You could have exception AS You cannot read here:
FileReader(directoryName +
file is missing.
2) You did not try to test if You caught exception: 2ns bad practice. You have to deliberately FAKE your parti to verify You catch it! (and then restore correct path)
3) bad practice; You did not ask HOW to manage exception: or You propagate it OR return NNULL
You simply return new Assistant(id,(int)steps,(int)turn);
4) do not cascade calls to IO /system:
You do:
Object obj = parser.parse(new FileReader(directoryName +
NEW fierleader + PARSE
Are you sure you don't fail in inner call??