nus-cs2113-AY2021S1 / pe-dev-response

0 stars 0 forks source link

Confusing description of "optional" vs "compulsory" arguments in Parser implementation section #1863

Open nus-pe-bot opened 4 years ago

nus-pe-bot commented 4 years ago

Note from the teaching team: This bug was reported during the Part II (Evaluating Documents) stage of the PE. You may reject this bug if it is not related to the quality of documentation.


It seems strange that some "optional" arguments are "compulsory". It might be a bit confusing since these are supposed to be opposites.

image.png


[original: nus-cs2113-AY2021S1/pe-interim#1694]

iamchenjiajun commented 4 years ago

Team's Response

"Optional arguments" as in it is optional to the general Command class, but for implementing different Command subclasses that require these arguments to be compulsory arguments, they can check the validity and existence of these arguments. It is also not wrong to pass in extra arguments that the specific Command subclass might not need, but how it is handled will depend on the specific Command subclass.

Duplicate status (if any):

--