![]() |
.. (לתיקייה המכילה) | |
If a filter contains the word "test" should it reject an application that contains "testing" ? | |
Yes. Searching an app works with sub-strings too. |
in AppStoreErrorCode there is no Success, Error_xyz .... | |
AppStoreErrorCode is just a means to print errors while executing user commands. You have full control over what your functions return (if any). |
Is allocating space to hold the maximal number of apps and filters in the system considered as a waste of space ? | |
since Lists are not part of this assignment's material, then you are allowed to do so. The requirement "don't allocate extra memory" is still relevant to other parts of the assignment. |
There is no "Exit" command, when does execution end ? | |
execution ends when there are no more commands to execute. either EOF in case of redirecting input from a file or (Ctrl^D) in Linux. |
Must I separate code to multiple files ? | |
Since partitioning code to multiple files was not learned in the first two tutorials you are not obliged to so. yet, we highly recommend you to do so since it can help you during development, debugging and testing. in any case ( multiple files vs one file ) you must strive to keep your code readable and organized. |
are strings case sensitive ? | |
Yes, all strings in the system are case sensitive. |
Is application name relevant to search and filters ? | |
No, only application description. |
how to redirect output and errors to separate files ? | |
(./appstore 40 40 < test1.in >! t1.myout) >&! t1.myerr diff t1.myout test1.out diff t1.myerr test1.err tests folder for the assignment was updated accordingly. |
Can we assume that the delimiter between command and fist argument, and between following arguments is a single delimiter ? | |
there can be multiple spaces before and after arguments, and command name. App description starts from first word tell end of the line, and should be considered as one argument. |
is 4.0 considered a valid integer input ? | |
4.0 is not, 04 is. |
Tell me more about those "unit" tests ! | |
1) the goal is not write tests to cover all functionality of the system. you are asked to write a few tests, just to give you an idea. 2) A unit test should test specific functionality. That functionality can be one basic building block that you used to implement large operations. 3) test should return true only if they passed, should not print something. |
I have two very similar functions with only few lines difference, using normal parameters I couldn't write one common function. | |
This kind of duplication can be easily eliminated with pointers to functions. Since this is not part of the material for this assignment, this kind of duplication will not be penalized, all other code duplication will be. still, if you want to solve it with pointer to functions, you can write one generic function that uses a pointer to function to perform a context-specific actions. then pass a suitable function each time. |
Can we assume there's a "\n" at the end of every command, including the last one (before ctrl+d)? | |
Yes |