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,...

1 answer below »


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:



  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, 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%
Answered 1 days AfterOct 16, 2021

Answer To: See attached: Program Exercise 4-16 Instructions Summary A new author is in the process of...

Sathishkumar answered on Oct 17 2021
129 Votes
#include
#include
using namespace std;
int main()
{
int copies;
d
ouble price;
    double fixedroyalties = 25000;
double royaltyrates_case2;
    double royaltyrates_case3;    

cout << "1. Enter The estimated number of copies that will be sold ";
cin >> copies;
cout << endl;
cout << "2.    The net price of each copy of the novel ";
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here