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, 22.06.2019 11:30
What do character formats do for your document's message? a.set the tone b.provide organization c.provide clarity d.set how texts align with documents
Answers: 2
question
Computers and Technology, 23.06.2019 12:50
Which syntax error in programming is unlikely to be highlighted by a compiler or an interpreter? a variable name misspelling a missing space a comma in place of a period a missing closing quotation mark
Answers: 1
question
Computers and Technology, 23.06.2019 13:50
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
You know the right answer?
Create a program to calculates an employee’s weekly gross salary, based on the number of hours worke...
Questions
question
Mathematics, 06.05.2020 03:05
question
Mathematics, 06.05.2020 03:05
question
Mathematics, 06.05.2020 03:05
Questions on the website: 13722362