Exercise 18.11 (school survey app);A school cafeteria is giving an electronic survey to its students to improve their lunch menu. Create an app that uses a two dimensional array array to store votes for the survey. Provide radio buttons to allow students to indicate whether they like or dislike a particular food.;A. Copy the template to your working directory.;B. Opening the apps template file. Double-click the road survey.SLN in the foods survey directory to open the app.;C. Adding radio buttons to the vote group box. Add to radio buttons to the vote group box. Name one like radio button and the other dislike radio button. Changed their text properties to like and dislike, respectively. Set the checked priority of like a radio button to true.;D. Declaring a two-dimensionaliinteger array. Declare a two-dimensional integer array named votes, with four rows. And two columns. Each row corresponds to a menu item in the combo box. The column store the number of like and dislike votes, respectively. The items in the combo box provided in the template app were added through the IDE using the combo boxes items property.;E. Create event handlers will button_click. Generate the click event handler for the vote button. Create a local integer variable index. This veritable should contain the iron index of the selected item in the menu item: combo box, use the checked property to determine whether the student likes or dislikes the selected menu item and update the votes array accordingly.;F.. Displaying the data. Create a sub procedure named display votes. Add a header to the results list box. Use a for next statement to iterate through each row in the votes array. Add the menu item, the number of like votes and the number of dislike votes to the list box. Called this procedure from the vote button click event handler.
Paper#68893 | Written in 18-Jul-2015Price : $32