HOMEWORK 3 FAQ (Wed Sep 26, 1405 HOURS) ERRATA ------ Problem 1 --------- Problem 2 --------- Problem 3 --------- Problem 4 --------- Problem 5 --------- Problem 6 --------- Problem 7 --------- Q7-1) I am not sure where to start on this cuz there's a lot I'm not sure about. I'm thinking that I'll just start inserting code for the commands starting with echo into xsshA.c. Is that ok? A7-1) Bad approach. Writing code specifically for xsshA as the first step is the worst thing you can do. You will most likely waste a lot of time. My suggestion is that you do these things: 1) Look at what code is given and note what is missing. 2) Think about what is conceptually required to evaluate each builtin command and non-builtin commands in general (you might ignore the little details and variables). Write down any questions you might have and approaches to evaluating each command (type). 3) Put the stuff down for a day and then review your steps 2 and 3, revising your notes. Well, it's too late to do this step. 4) Draw up an plan/schedule for implementing and testing. What command will you do first and what do you get from finishing each command? What will you display to verify that your implementation will be correct? 5) Periodically, refactor your code and your thinking about how a command/feature should be implemented. If you start implementing too soon, you may find yourself producing junk code that will only get in your way. This doesn't mean you can't profitably write small code fragments that you test separately. But inserting lots of junk code into the mainline product code will likely cause you more grief and confusion in the end. Remember: o Treat the code as a learning device. o "Don't fly blind": Put in print statements to display key state changes. o Try to find someone with whom you can discuss your ideas. The grader/consultants and I are also available. Q7-2) Can we assume that only non-builtin commands are run in the background? A7-2) Yes. Q7-3) a) I assume we must add the ability to take input from the user, but why do you assign each command to one of the array slots in words? b) Is this a placeholder assignment until we replace it with the real input? A7-3) a) No, the input is from the command array. b) Yes, in Project A. Q7-4) Do we need to print out a list of the commands after every command the user gives us, or should it be printed only when a bad command is given? A7-4) There are no bad commands unless I mistyped something in the command array. There are only two places where parts of a command are printed. One is where you print the words in the command (i.e., cmnd[i][0], cmnd[i][1], etc.) and the other is the call to show_words(xword).