I have the following homework assignment in a class that is basically us teaching ourselves web programming:
The user enters the (integer) number of hours worked in the week for each employee in a pop-up box. Use an open-ended loop so that the number of employees can vary. Have the user enter a negative number such as -1 to indicate that there are no more employees to enter. (The program should do something reasonable if the user enters -1 as the first value.)
The program prints, as web page contents, a table containing three columns. The first column is simply an index that increases from 1 up to the number of employees processed. The second column is the number of hours worked, entered by the user. The third column is the employee's pay for the week. After the table, please print out a summary line giving the total pay of all the employees.
The output does not need to be fancy, but correct and readable. The table columns should have headings identifying them, and the total pay should a suitable label.
I am seeking guidance on how I should approach this, ie. how I should do the columns. I assume the first part I can just "prompt" for the employees and put the variables in an array. For the second part of input, should I be using a form or is there another input method that would accomplish this? and can I built the form on the fly or do I do a big form and only have input for those lines that have an employee?
These are my initial questions. Thanks in advance!