subject

Create a program to calculates an employee’s weekly gross salary, based on the number of hours worked and an hourly wage that the user inputs. Define your own exception classes to handle invalid inputs and file not found exceptions. Save the script in a PHP file, named myExceptionClasses. php, and then include it in the paycheck. php.
Create a PHP document, named paycheck. php.
In the PHP document, create all-in-one Web form with three text field – one for employee ID, one for the number of hours worked, and the other for the hourly wage. The Web form should include for two buttons, "Submit" to submit data and "Clear" to erase previous inputs.
Accept data entered from the Web form, and validate inputs using exception handling technique. Display appropriate error messages for invalid values when an exception is thrown and allow the user to correct invalid values or re-enter in the Web form. All fields cannot be empty.
The number of hours worked must be a numeric value between 1 and 60. The hourly wage must be numeric value and greater than 0.
Compute the gross salary.
Determine whether the number of hours is over 40 or not. If it is equal to or less than 40, compute regular salary; if not compute any hours as time-and-a-half.
Display each paycheck in the following format under the Web form or in another page (if so, make a like on the display page back to the Web form for a new entry).
Date: Employee ID: Hours worked: Hourly Pay Rate: Gross Pay:
Save each paycheck into a text file in this format (separate data pieces by comma). Need to handle file not found exception before writing data to the file.
Employee ID, Hours worked, Hourly Pay Rate, Gross Pay, Date
Read all paycheck information from the text file and create a button or a link to display all records in the table format with a header row as the following. Need to handle file not found exception before reading data from the file.
Employee ID
Hours worked Hourly Pay Rate Gross Pay Date
If you display the table on another page, make a link back to the Web form for a new entry.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:10
Which is a benefit of peer-to-peer networking? easy to add or remove devices main server has a fast processor more reliable than a client/server network same software versions on all computers
Answers: 3
question
Computers and Technology, 22.06.2019 15:10
Which activity should be part of a long-term plan to positively affect yourhealth? oa. wearing regular clothing when handling toxinsob. not worrying about secondhand smokeoc. avoiding excessive exposure to sunlightod. drinking only well water
Answers: 1
question
Computers and Technology, 22.06.2019 19:10
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
What is used to analyze and summarize your data without graphical support
Answers: 1
You know the right answer?
Create a program to calculates an employee’s weekly gross salary, based on the number of hours worke...
Questions
Questions on the website: 13722367