Question: Create a new version of the Babbage's Cabbage's program from Assignment # 1 0 using the modular structures offered by PL / SQL: procedures, functions,
Create a new version of the Babbage's Cabbage's program from Assignment # using the modular structures offered by PLSQL: procedures, functions, and packages.
One significant change from the previous version is that transport fees will now be looked up by code in a table named bctransportcodes.
Use the script provided
Links to an external site. to create the necessary tables and populate them with sample data.
Requirements
The program code is contained entirely within modules. All of the modules listed below must be in a single package named bclastname that incorporates your last name eg bckrofchok Use only the lowercase letters az when spelling your last name; please omit any accent marks, spaces or hyphens.
You will need to supply an appropriate data type for each of the parameters, but do not change the module's name or parameter list the number of parameters, their order, or the inout directionality. You are allowed to change the names of the parameters, if desired to conform to the textbook's style, for example but each parameter must keep its same conceptual meaning.
splithours in hours, out reghours, out ovthours
A procedure that splits the given number of hours into regular hours and overtime, per Assignment #
computegrosspay in hours, in hourlyrate
A function that computes and returns an employee's gross pay given their hours and hourly rate, per Assignment # This module must call the splithours module to determine the regular and overtime hours, rather than duplicating that module's logic.
computetaxes in grosspay
A function that computes and returns an employee's taxes given their gross pay amount, per Assignment #
gettransportamount in code
A function that returns the transportation deduction amount corresponding to the given singleletter code. The amount is looked up in the bctransportcodes table. If the code supplied is NULL, then zero is returned. If the code supplied is not NULL and not found in the lookup table, an application error with error number and message Transportation code not found is raised.
computenetpay in grosspay, in taxes, in transportcode
A function that computes and returns an employee's net pay given their gross pay, taxes, and transportation deduction code, per Assignment # The amount of the transportation deduction is determined using the gettransportamount function. If the transportation deduction code is determined to be invalid due to an error being raised, then NULL is returned for the net pay amount.
processpayroll
A procedure that processes the weekly payroll for all employees in the bcemployees table. A complete and correct row is inserted into the bcpayroll table for each employee; any existing rows in the table are deleted by this module before processing begins. If the net pay amount for an employee is NULL, it is an indication that their transportation deduction code is invalid and their transportation deduction will also be listed as NULL
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
