Answer:
Doey
So you gotta doey, it should be 900, the doey is sometimes wrong so be patient
I need help with this coding homework! I cant get right the Two Test Case's shown in the picture.
Instructions
Redo Programming Exercise 16 of Chapter 4 so that all the named constants are defined in a namespace royaltyRates.
Instructions for Programming Exercise 16 of Chapter 4 have been posted below for your convenience.
Exercise 16
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. Write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold. The program then outputs the royalties under each option and the best option the author could choose. (Use appropriate named constants to store the special values such as royalty rates and fixed royalties.)
THE FULL CODE:
#include
#include
using namespace std;
namespace royaltyRates {
const double FIXED_ROYALTY_1 = 5000.00;
const double FIXED_ROYALTY_2 = 20000.00;
const double ROYALTY_RATE_2 = 0.125;
const double ROYALTY_RATE_3_LOW = 0.1;
const double ROYALTY_RATE_3_HIGH = 0.14;
const int COPIES_THRESHOLD = 4000;
}
using namespace royaltyRates;
int main() {
double netPrice;
int estimatedCopies;
cout << "Enter price of each copy: ";
cin >> netPrice;
cout << "Estimated number of copies sold: ";
cin >> estimatedCopies;
double royalty1 = FIXED_ROYALTY_1 + FIXED_ROYALTY_2;
double royalty2 = ROYALTY_RATE_2 * netPrice * estimatedCopies;
double royalty3 = 0;
if (estimatedCopies > COPIES_THRESHOLD) {
royalty3 = (COPIES_THRESHOLD * netPrice * ROYALTY_RATE_3_LOW)
+ ((estimatedCopies - COPIES_THRESHOLD) * netPrice * ROYALTY_RATE_3_HIGH);
} else {
royalty3 = estimatedCopies * netPrice * ROYALTY_RATE_3_LOW;
}
cout << fixed << setprecision(2);
cout << "Royalties under option 1: $" << royalty1 << endl;
cout << "Royalties under option 2: $" << royalty2 << endl;
cout << "Royalties under option 3: $" << royalty3 << endl;
if (royalty1 >= royalty2 && royalty1 >= royalty3) {
cout << "Option 1 is the best option you can choose for maximum royalties.";
} else if (royalty2 >= royalty1 && royalty2 >= royalty3) {
cout << "Option 2 is the best option you can choose for maximum royalties.";
} else {
cout << "Option 3 is the best option you can choose for maximum royalties.";
}
return 0;
}
This Python script assists the author in comparing three options and determining which one to select.
The Script and ExplanationFirst, it requires the input of the net price for each copy and an estimated amount of copies sold. Subsequently, royalties are computed under each option and displayed. Finally, the script determines the optimal choice and displays it.
Option 1 involves fixed royalties valued at $20,000 plus $5,000. Option 2 provides royalties based on a percentage of the net price multiplied by estimated copies sold, while Option 3 uses tiered percentages applied to the net price until the maximum number of sales is reached (4,000), after which a different percentage applies.
The resulting royalty payouts are denoted individually for each option and presented as output formatted with two decimal places. The best alternative among them is calculated via conditional statements that establish whether Royale Options #1, #2, or #3 offers the highest payout. Then, the corresponding option tag is returned as output.
Read more about programs here:
https://brainly.com/question/23275071
#SPJ1
Can someone add on to the summary and analysis of this group project? we don't know what else to add
Expanding on a group project's summary and analysis starts with reviewing existing entries to identify any gaps that require fleshing out.
What is the next step?Conduct further research or gather additional data if necessary, to support your analysis. Ensure thorough coverage of key project points when complementing the summary.
When filling in details for analysis, provide insightful observations based solely on available facts and figures. Finally, openly communicate about contribution areas within the team and include other members' feedback effectively.
Read more about group project here:
https://brainly.com/question/26053073
#SPJ1
Compare and contrast the code of ethics of two professional organizations or regulatory bodies in computer science field. Analyze the similarities and differences between the codes, and discuss their implications for professional practice. Critically evaluate the strengths and weaknesses of each code and propose recommendations for improving ethical standards in the profession.
Ethical standards upheld in the computer science field are set forth by reputable professional organizations like ACM and AAAI.
How is this so?Both these organizations advocate for values promoting honesty, integrity, privacy protection and respect towards every individual's dignity.
While focus on educational growth is central to the ACM code of ethics, more significant emphasis seems laid down by AAAI for researchers in artificial intelligence fields to consider broader society concerns related to potential impact with AI research practices.
The codes derive their strength from placing significant stress on ethical behavior and acknowledging the influence of technology on society.
Learn more about Ethical Standards;
https://brainly.com/question/28295890
#SPJ1
how to Use the Security Evaluator to determine whether there are any IoT devices on your network in pfsense
To use the Security Evaluator in pfsense to determine the presence of IoT devices on your network, follow these steps:
1. Log in to your pfsense router and navigate to the Security Evaluator option under the Diagnostics menu.
2. Launch the Security Evaluator and select the IoT Devices scan option.
3. The tool will search for any IoT devices on your network and provide a list of results.
4. Review the list of devices and take appropriate action to secure any vulnerable or unknown devices.
5. Repeat the scan periodically to ensure there are no new IoT devices added to your network and maintain security.
Answer: Radio Frequency Identification (RFID), Bluetooth, Barcode/2D code, Near Field Communication (NFC), Electronic product codes (EPC), IP address.
Explanation: Hope This Helps!
List the rules involved in declaring variables in python . Explain with examples
1. The variable name should start with a letter or underscore.
2. The variable name should not start with a number.
3. The variable name can only contain letters, numbers, and underscores.
4. Variable names are case sensitive.
5. Avoid using Python keywords as variable names.
Here are some examples of variable declaration in Python:1. Declaring a variable with a string value
message = "Hello, world!"2. Declaring a variable with an integer value
age = 303. Declaring a variable with a float value
temperature = 98.64. Declaring a variable with a boolean value
is_sunny = TrueCreate a UML diagram for the card game Go Fish.
A UML diagram for the card game Go Fish is given below:
The UML Diagram-------------------------
| Player |
-------------------------
| -hand: List<Card> |
| -score: int |
| +getPlayerName(): String|
| +getHand(): List<Card>|
| +getScore(): int |
| +addCardToHand(card: Card): void|
| +removeCardFromHand(card: Card): void|
| +addToScore(points: int): void|
| +hasCard(rank: Rank): boolean|
| +getMatchingCards(rank: Rank): List<Card>|
| +askForCard(player: Player, rank: Rank): List<Card>|
| +goFish(deck: Deck): Card|
-------------------------
| ^
| |
|------------------|
| |
------------------------- |
| Card | |
------------------------- |
| -rank: Rank | |
| -suit: Suit | |
| +getRank(): Rank | |
| +getSuit(): Suit | |
| +toString(): String | |
| +equals(other: Object): boolean|
| +hashCode(): int | |
------------------------- |
| ^
| |
|------------------|
| |
------------------------- |
| Rank | |
------------------------- |
| ACE | |
| TWO | |
| THREE | |
| FOUR | |
| FIVE | |
| SIX | |
| SEVEN | |
| EIGHT | |
| NINE | |
| TEN | |
| JACK | |
| QUEEN | |
| KING | |
------------------------- |
| ^
| |
|------------------|
| |
------------------------- |
| Suit | |
------------------------- |
| CLUBS | |
| DIAMONDS | |
| HEARTS | |
| SPADES | |
------------------------- |
| ^
| |
|------------------|
| |
------------------------- |
| Deck | |
------------------------- |
Read more about UML diagram here:
https://brainly.com/question/13838828
#SPJ1