Program 2: CPS 008, Spring 1995 Owen Astrachan due: Part 1: February 9, 8:00 am, Part 2: February 16, 8:00 am: 20 points **********Introduction This assignment covers material through chapter 4 of the text. In order to do this assignment you should create a subdirectory named prog2 in your cps08 directory (see the first Unix/Emacs/C++ lab if you haven't yet created a cps08 directory). You'll need to copy a few files into this directory to facilitate writing the programs for this assignment. You should do the assignment on mentor if possible, but acpub machines will work too. Follow the steps below to copy files: Change into the prog2 directory using the cd command (use mkdir to create the directory if you need to). Verify that you're in the right directory using the pwd command (print working directory). Type cp ~ola/cps08/prog2/* . which will copy all the files from the directory ~ola/cps08/prog2 into your directory. Don't forget the trailing period, or dot. If you do, you might get an error message something like: Permission denied. This should copy at least two files Makefile userando.cc Verify that these file(s) have been copied by typing ls to see all the files in the current directory. Programs to write The first program you write should serve as a quiz in arithmetic for someone studying multiplication and addition. Name the program numquiz.cc. The user should have the option of choosing easy, medium, and hard problems. o Easy means addition of two-digit numbers with no carrying and multiplication of single-digit numbers. o Medium means addition of two or three digit numbers (carrying is ok) and multiplication of a two-digit number by a single-digit number. o Hard means addition of three or four digit numbers (again, carrying is ok) and multiplication of two-digit by two-digit or three-digit by one-digit numbers. Your program should ask the user how many questions to ask. It should then give a quiz, keeping track of the how many questions are answered correctly. A user should be given two chances to answer a question. If both are wrong, the correct answer should be given. At the end of the quiz, a message indicating how well the user did should be printed. Extra Credit For extra credit (5 points), if the user gets the answer wrong the first time you can offer the opportunity for ``help''. Help means that some of the digits of the answer are filled in (but not all). For multiplication you might want to fill in some digits of the intermediate steps as well as the final answer (e.g., in multiplying ). This problem is worth 20 points. Grading is as follows: 1. program runs correctly in general: 10 points 2. user-interface is good (easy to read, use, etc.) and program is robust (doesn't do bizarre things for bad input): 4 points 3. program is well-designed and implemented: 6 points To earn full credit on design, there should be no function longer than approximately 25 lines of code (not including comments) and duplication of code should be minimized. Be sure to ask questions about this in class or via news. You'll need to use either "dice.h" or (and better) "rando.h". The header for the latter is attached as part of this document with a program that uses it. ******** Submit You should create a README file as described for the first assignment. In it you put the time you spent on the assignment, the names of people with whom you collaborated, and any thoughts on the assignment. To submit, use submit08 prog2 README numberquiz.cc The README file is worth 2 points.