Wednesday (afternoon):
PoopyPants Payroll
PoopyPayroll.exe
uses Prof_Poopypants.gif
Dim FNames As String() = New String() {"Dorkey", "Booger", "Snotty", "Dorkey", "Pinky", _
"Booger", "Cheeseball", "Squeezit", "Booger", _
"Cheesball", "Squeezit", "Poopsie", "Chim-Chim", _
"Loopie", "Buttercup", "Crusty"}
Dim LNames As String() = New String() {"PizzaTushie", "DiaperSniffer", "DiaperSprinkles", _
"GirdleLips", "CootieTushi", "Diaperpaints", _
"CottieTushie", "GorillaHead", "DiaperFanny", _
"DiaperBiscuits", "DiaperHead", "DiaperFanny", _
"ChickenBiscuits", "DiaperHead", "ChickenBreath", _
"HamsterHead"}
Dim HourlyRate As Decimal() = New Decimal() {10.75, 8.75, 8.5, 7.75, 11.0, 10.75, 10.75, _
8.0, 10.0, 10.75, 8.75, 10.25, 7.25, 8.25, _
8.75, 9.75}
- From the arrays of first names and last names construct a new array of full names and enter them
into a listbox (which has its Sorted property set to true).
- When the user selects a name from the ListBox, find that person's index using the
IndexOf method.
- Use the corresponding element of the HourlyRate array and the number of hours
entered by the user to determine that employee's salary for the week. Pay the employee
time and half for any hours that exceed 40.
- Add the salary to the display which includes the name, the hours, the wage, any
overtime hours, and the salary.
- Keep a running total of the amount paid out in salaries this week.
- Do not pay anyone twice.