Modify the menu function to accept its parameters from a


Assignment

1. Modify the menu function to accept its parameters from a file.

2. Rewrite thepr1function asprx that will behave in the manner ofpr4from Chapter 8 but will take an option for any number of columns.

3. Add age top ts section to the fifteen game that allows the user to select between three different board formats. Write a third format.

chp 12

1. Add code to the upload script that checks that all variables have been set to legitimate values (for example, that port is an integer).

2. Write a usage or help function, and add it to the upload script.

3. Add an option to the upload script to save the configuration if it has been saved.

4. Write a script that creates a configuration file in the same form as words. cfg, prompting the user for the information to put in it.

chp 13

1. Modify the is or tand a search functions to use sort and grep, respectively, if the array exceeds a certain size.

2. Write a function that transposes rows and columns in a grid (either a single-string grid or an array). For example, transform this:

123
456
789
into this:

147
256
369

3. Convert some of the grid functions, either string or array versions, to work with grids that are not square, for example, 6×3.

4. Convert the code that parses fixed-width records into a function that accepts the line of data as the first argument, followed by thevarname=width list.

chp 14

1. Write a function, hbar, that accepts two integer arguments, a width and a color, and prints a bar of that color and width. Write a second function, hbar_ at, that accepts four arguments, row, column, width and color; moves the cursor to the row and column; and passes the remaining arguments tohbar.

2. White a function, clear_ area, that accepts two integer arguments, rows and columns, and clears a rectangular area of that many rows and columns.

chp 15.

1. Using the key-funcslibrary, write a menu script that uses the function keys for selection.

2. Rewrite the key-funcslibrary to include mouse handling, and incorporate the function into the mouse-demo script.

3. The password script does minimal checking for invalid entries. What checking would you add?

How would you code it?

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Modify the menu function to accept its parameters from a
Reference No:- TGS01673320

Expected delivery within 24 Hours