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 06:30
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 23.06.2019 01:20
Write a function balancechemical to balance chemical reactions by solving a linear set of equations. the inputs arguments are: reagents: symbols of reagents in string row array products: symbols of products in string row array elements: elements in the reaction in string row array elcmpreag: elemental composition of reactants in two dimensional numeric array elcmpprdcts: elemental composition of prducts in two dimensional numeric array hint: the first part of the problem is setting up the set of linear equations that should be solve. the second part of the problem is to find the integers from the solution. one way to do this is to mulitiply the rational basis for the nullspace by increasing larger integers until both the left-and right-side integers exist. for example, for the reaction that involves reacting with to produce and : reagents=["ch4", "o2"]; products =["co2", "h2o"]; elements =["c","h", "o"] elcmpreag=[1,4,0;
Answers: 3
question
Computers and Technology, 23.06.2019 16:00
Write a grading program for a class with the following grading policies: a. there are two quizzes, each graded on the basis of 10 points. b. there is one midterm exam and one final exam, each graded on the basis of 100 points. c. the final exam counts for 50% of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (do not forget to normalize the quiz scores. they should be converted to a percentage before they are averaged in.) any grade of 90 or more is an a, any grade of 80 or more (but less than 90) is a b, any grade of 70 or more (but less than 80) is a c, any grade of 60 or more (but less than 70) is a d, and any grade below 60 is an f. the program will read in the student’s scores and output the student’s record, which consists of two quiz and two exam scores as well as the student’s average numeric score for the entire course and final letter grade. define and use a structure for the student reco
Answers: 2
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
History, 19.11.2020 23:30
question
Mathematics, 19.11.2020 23:30
question
Mathematics, 19.11.2020 23:30
question
Mathematics, 19.11.2020 23:30
question
Mathematics, 19.11.2020 23:30
Questions on the website: 13722361