++ Need questions answered only. Part A a. Why were you able to redefine whatStringIsThis multiple times in the program without an error? b. Why is the output from func2() the only place we print out the global whatStringIsThis? c. What happened to the whatStringIsThis that printed inside the while loop after it exited the loop? d. What happened when you tried to create a string variable called whatStringIsThis after func2()? Why was this a problem here, but not anywhere else whatStringIsThis is defined? Part B. a. Is the Class based version of this code larger or smaller than the structure based version? Do you think this would be a typical result? Why? b.How much programming had to be done to use the classes instead of structs in the range-based for loops in this program? c. How much work did it take to make showStats() a class method instead of a general function? d. What would you need to do to add a new weapon to this code?
Get Free Quote!
330 Experts Online