Questions
Is the Insanity Defense necessary? Discuss what form it should take and the role of the...

Is the Insanity Defense necessary? Discuss what form it should take and the role of the forensic psychiatrist in establishing whether an accused person can successfully use it.

In: Psychology

In C++ A new author is in the process of negotiating a contract for a new...

In C++

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.

Example input:

120
22.99

Expected Output:

25000.0

344.8

275.8

Option 1 is the best

In: Computer Science

(C++) Redo Programming Exercise 16 of Chapter 4 so that all the named constants are defined...

(C++) 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.)

An input of: 20, 5

Should have an output of:

Royalty option1: 25000.00
Royalty option2: 12.50
Royalty option3: 10.00

In: Computer Science

There were 2,074,000 baby girl and 2,173,000 baby boy born. We often assume that the probability of having a boy or a girl is 0.5 because of the chromosomal determination of sex in


There were 2,074,000 baby girl and 2,173,000 baby boy born. We often assume that the

probability of having a boy or a girl is 0.5 because of the chromosomal determination of sex in

humans. Is there reason to think that the sex ratio in the United States favor more baby boys?

To answer this question, find the probability that an equal chance of getting a boy would give

2,173,000 boys or more in 4,247,000. What do you conclude?

In: Statistics and Probability

You have been hired to produce a family tree for three generations of a family where...

You have been hired to produce a family tree for three generations of a family where a disorder called sneezer syndrome is observed. People who suffer from sneezer syndrome sneeze when they smell peppermint. In order to draw a pedigree chart for this family, you interview Mike and Annie. Neither suffer from sneezer syndrome. Annie’s mother is normal, while Annie’s father sneezed at the smell of peppermint. Annie has one sister and one brother and her sister is a sneezer. While Annie’s sister has yet to have kids, her brother married a sneezer. Mike’s mother is a sneezer while his father is normal. Mike’s brother is just like their mother. In addition, this brother married a sneezer. Mike’s sister is normal - as is her husband and their one boy.

draw a pedigree chart (one point). Use the letters A and a. If more than one genotype is possible for an individual - you may write it as A with a dash - e.g. A-

Use your pedigree chart to answer the following questions (four points):

a. Annie’s brother and his wife have two kids – a sneezing boy and a normal girl. What are their genotypes ?

boy -

girl -

b. What are the genotypes of Mike’s brother-in-law (his sister’s husband) and their boy?

brother-in-law -

his son -

c. Mike and Annie have two girls and a boy. The boy and one girl are normal. What are the genotypes of their three kids?

boy -

girl 1 -

girl 2 -

d. Mike and Annie want a 4th child. What is the chance that this child will be a boy who is a sneezer. Write your answer as a reduced fraction - e.g. 1/8.

In: Biology

The distribution of cholesterol levels in a boy is approximately normal with a mean of 170...

The distribution of cholesterol levels in a boy is approximately normal with a mean of 170 and a standard deviation of 30. Levels above 200 require attention. What is the probability of a boy with a cholesterol between 160 and 205?

In: Statistics and Probability

Write the null and alternative hypotheses. Identify the dependent variable, the factor, and the levels of...

Write the null and alternative hypotheses. Identify the dependent variable, the factor, and the levels of the factor.

1. A study of the impact of graphical quality on time spent playing a computer game. Researchers record the time, in minutes, that children spent playing three computer games: one game with minimal 2D graphics, one with high 2D graphic quality, and one with 3D graphic quality.

2. A study of the number of hits a video gets on YouTube based on the type of video (humorous, inspirational, musical, and informational).

In: Statistics and Probability

I am working on an Arduino Project. I would like to build a controllable RGB LED...

I am working on an Arduino Project. I would like to build a controllable RGB LED Nightlight (with a debounce code included). With each time pushing the button I want a different color. like the following

Initial state = LED off

first press= LED turns on Red

second Press = LED turns on Green

third Press = LED turns on Blue

Fourth Press = LED turns on Purple

Fifth Press = LED turns on Teal

sixth press= LED turns on Orange

7th press = LED turns on White

8th press = LED turns off again

if you put the comments with each line of the code, it will be highly appreciated.

In: Computer Science

Consider a family with 4 children. Assume the probability that one child is a boy is...

Consider a family with 4 children. Assume the probability that one child is a boy is 0.5 and the probability that one child is a girl is also 0.5, and that the events "boy" and "girl" are independent.

(a) List the equally likely events for the gender of the 4 children, from oldest to youngest. (Let M represent a boy (male) and F represent a girl (female). Select all that apply.)

FMMFone M, three F'sFFFFMMMMFMFMFMFFtwo M's, two F'sthree M's, one FMFMFMFFFFMMMMFMMFFMFMMMFMMFFFFMMFFFMMMFMMFFM

In: Statistics and Probability

3. Please complete the example given in lecture; Programs to display pyramid and inverted pyramid using...

3. Please complete the example given in lecture;
Programs to display pyramid and inverted pyramid using * or # and digits

*
* * *
* * * * *
* * * * * * *
* * * * * * * * *

Press “1” button add 1 into the pyramid.
Press “1” to move number 1 to next cell (if it is the end of the triangle, loopback)
Press “2” to move number 1 to previous cell (if it is the end of the triangle, loopback)

First press
1
* * *
* * * * *
* * * * * * *
* * * * * * * * *
Second press
*
1 * *
* * * * *
* * * * * * *
* * * * * * * * *
Eighth press
*
* * *
* * * 1 *
* * * * * * *
* * * * * * * * *

Please write in cpp

In: Computer Science