See attached:
Program Exercise 4-16
Instructions
Summary
A new author is in the process of negotiating a contract for a new romance novel. The publisher is offering three options.
- In the first option, the author is paid$5,000upon delivery of the final manuscript and$20,000when the novel is published.
- In the second option, the author is paid12.5%of the net price of the novel for each copy of the novel sold.
- In the third option, the author is paid10%of the net price for the first4,000copies sold, and14%of the net price for the copies sold over4,000.
The author has some idea about the number of copies that will be sold and would like to have an estimate of the royalties generated under each option.
Instructions
Write a program that prompts the author to enter:
- The estimated number of copies that will be sold.
- The net price of each copy of the novel
The program then outputs:
- The royalties under each option
- The best option the author could choose.
- Ex. If option 1 is the best, outputOption 1 is the best
(Use appropriate named constants to store the special values such as royalty rates and fixed royalties.)
Since your program handles currency, make sure to use a data type that can store decimals with a decimal precision of 2.
Program Exercise 4-16 Instructions Summary A new author is in the process of negotiating a contract for a new romance novel. The publisher is offering three options. · In the first option, the author is paid $5,000 upon delivery of the final manuscript and $20,000 when the novel is published. · In the second option, the author is paid 12.5% of the net price of the novel for each copy of the novel sold. · In the third option, the author is paid 10% of the net price for the first 4,000 copies sold, and 14% of the net price for the copies sold over 4,000. The author has some idea about the number of copies that will be sold and would like to have an estimate of the royalties generated under each option. Instructions Write a program that prompts the author to enter: 1. The estimated number of copies that will be sold. 2. The net price of each copy of the novel The program then outputs: 1. The royalties under each option 2. The best option the author could choose. · Ex. If option 1 is the best, output Option 1 is the best (Use appropriate named constants to store the special values such as royalty rates and fixed royalties.) Since your program handles currency, make sure to use a data type that can store decimals with a decimal precision of 2. The following checks will be run and look for: Tasks 0.00 out of 10.00 Correct output for test cases 3 0 out of 3 checks passed. Review the results below for more details. Checks Test CaseIncomplete Option 1 best - case 1 Input 120 22.99 Output Results 25000.0 344.8 275.8 Option 1 is the best Show Details Test CaseIncomplete Option 2 best - case 1 Input 8001 35.99 Output Results Option 2 is the best 25000.0 35994.5 34555.4 Show Details Test CaseIncomplete Option 3 best - case 1 Input 20000 20.0 Output Results Option 3 is the best 25000.0 50000.0 52800.0 Show Details Run ChecksSubmit 0% Program Exercise 4-16 Instructions Summary A new author is in the process of negotiating a contract for a new romance novel. The publisher is offering three options. · In the first option, the author is paid $5,000 upon delivery of the final manuscript and $20,000 when the novel is published. · In the second option, the author is paid 12.5% of the net price of the novel for each copy of the novel sold. · In the third option, the author is paid 10% of the net price for the first 4,000 copies sold, and 14% of the net price for the copies sold over 4,000. The author has some idea about the number of copies that will be sold and would like to have an estimate of the royalties generated under each option. Instructions Write a program that prompts the author to enter: 1. The estimated number of copies that will be sold. 2. The net price of each copy of the novel The program then outputs: 1. The royalties under each option 2. The best option the author could choose. · Ex. If option 1 is the best, output Option 1 is the best (Use appropriate named constants to store the special values such as royalty rates and fixed royalties.) Since your program handles currency, make sure to use a data type that can store decimals with a decimal precision of 2. The following checks will be run and look for: Tasks 0.00 out of 10.00 Correct output for test cases 3 0 out of 3 checks passed. Review the results below for more details. Checks Test CaseIncomplete Option 1 best - case 1 Input 120 22.99 Output Results 25000.0 344.8 275.8 Option 1 is the best Show Details Test CaseIncomplete Option 2 best - case 1 Input 8001 35.99 Output Results Option 2 is the best 25000.0 35994.5 34555.4 Show Details Test CaseIncomplete Option 3 best - case 1 Input 20000 20.0 Output Results Option 3 is the best 25000.0 50000.0 52800.0 Show Details Run ChecksSubmit 0%