Question: Task Write a npv named deterministic function that calculates the Net Present Value (NPV). It should accept the following parameters: A future_value parameter using a

Task Write a npv named deterministic function that calculates the Net Present Value (NPV). It should accept the following parameters: A future_value parameter using a number data type A periods parameter using an integer data type An interest parameter using a number data type The npv function should return a decimal (in Oracle a NUMBER data type) value rounded to the nearest penny. Replace the <<>> placeholders with functional code. CREATE OR REPLACE FUNCTION npv ( future_value NUMBER , periods INTEGER , interest NUMBER ) RETURN NUMBER DETERMINISTIC IS BEGIN RETURN <<>>; END; / Test Case: Write an anonymous block program that calls the npv deterministic function you wrote and prints the results. Replace the <<>> placeholders with functional code. SET SERVEROUTPUT ON SIZE UNLIMITED BEGIN /* Call, round, and print the return value from the npv deterministic function. */ <<>> END; / Submit your script, which should generate the correct output, in the quiz question of this lab

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!