Name: ____________________________________________________ Alpha: _____________________

Describe help received: _________________________________________________________________

Download hw.cpp. Read over it to understand how it works.
Below is some actual code from the program, marked "BEFORE", and a proposed change, marked "AFTER". Answer the following questions in regards to this code.
BEFOREAFTER
      
    if (bestSet.score < currSet.score) {
      bestSet.score = currSet.score;
      for (int j=1; j <= 6; j++) {
          bestSet.rolls[j] = currSet.rolls[j];
      }
    }
      
    if (bestSet.score < currSet.score) {
      bestSet = currSet;
    }
  1. (5 pts) If we changed the code marked BEFORE to the code marked AFTER, would the code still compile?
  2. 
        
  3. (10 pts) If we changed the code marked BEFORE to the code marked AFTER, would the code still function properly? If not, WHY?
  4. 
    
        
      
  5. (10 pts) hw.cpp is making use of dynamic arrays. If it used static arrays instead, would that change either of your answers above? If so, WHY?
  6. 
    
        
      
  7. (75 pts) Modify hw.cpp so that it DOES now use static arrays instead of dynamic arrays. Make all changes that are (a) necessary to make the code still function properly, and (b) sensible to do (i.e., if using static arrays enables you to simplify the code, then do so!)

Submit: ~/bin/submit -c=IC210 -p=hw33 hw.cpp

Turn in the codeprint of your source code.