ENGR 112 HOMEWORK #5 (EXTENDED) Due: 11:59 P.M. Wednesday, October 4, 2006 NOTE: Please follow your lab instructor's directions for submitting your assignment to your ENGR 112 section on http://csnet.cs.tamu.edu. NOTE: Homework will be graded by how it runs on unix.cs.tamu.edu. You may develop and test your homework on any platform, but make sure it runs correctly on unix.cs.tamu.edu. NOTE: Begin each file according to the following sample-- // hw5pr1.cpp (assignment number and problem number) // // ENGR 112-5xx (your section number) // Due 11:59 P.M. Wednesday, October 4, 2006 // In support of the Aggie Honor Code, I have neither given nor received any // unauthorized help on this assignment. 1. (10 points) Exercise 1 in section 6.12. Name your program hw5pr1.cpp. Hint: Add one more rule to the grammar and implement it. 2. (10 points) Read exercise 10 in section 6.12 and then do the following simplified version: Use the letters p, n, d, and q for the coins, so that input looks like 3p + 4n + 5d + 2q Now modify your calculator program from the previous homework by adding rules like case 'q': return left * 25; so that the output is the value in cents (118 in this example). Name your progam hw5pr2.cpp. Hint: Be sure your exit command is 'x', not 'q'. 3. (10 points) Choose some table of data of your choice (say CD's or movies) with at least 5 rows and 2 columns, e.g., Caedmon's Call Guild 2 Newsboys devotion Kingpin Wrecking Crew Abolition Strategy Krystal Meyers Krystal Meyers MercyMe Coming Up To Breathe Define a struct (or class) named Row and create a vector of Rows with your data. Then ask the user for an item number (starting at 1, not 0) and display that row; repeat until the user enters 0. Thus item 5 is the MercyMe CD. Name your program hw5pr3.cpp.