answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Zolol [24]
2 years ago
9

A jewelry store distributes bonuses after the holiday rush. The table shows the bonuses based on full weeks worked during the se

ason and the number of positive online customer reviews.
Positive Review Received Full Weeks Worked 0 1 2 3 4 or More 0 5.00 9.00 16.00 22.00 30.00 1 10.00 12.00 18.00 24.00 36.00 2 20.00 25.00 32.00 42.00 53.00 3 32.00 38.00 45.00 55.00 68.00 4 46.00 54.00 65.00 77.00 90.00 5 60.00 72.00 84.00 96.00 120.00 6 or more 85.00 100.00 120.00 140.00 175.00
Write: A program that allows the managers to continuously enter values for the two bonusdetermining factors (full weeks worked, and total positive reviews received) and displays the appropriate bonus formatted in US dollars.
Computers and Technology
1 answer:
Nonamiya [84]2 years ago
6 0

Answer:

In Java

import java.util.Scanner;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int weeks, reviews;

 double bonus=0;

 System.out.print("Weeks: ");  weeks = input.nextInt();  System.out.print("Positive Reviews: ");  reviews = input.nextInt();

 while(weeks != 99 || reviews != 99){

     if(weeks == 0){

      if(reviews == 0)  {bonus = 5.00;}

      else if(reviews == 1)  {bonus = 9.00;}

      else if(reviews == 2)  {bonus = 16.00;}

      else if(reviews == 3)  {bonus = 22.00;}

      else if (reviews >=4){bonus = 30.00;}

     }

     else if(weeks == 1){

      if(reviews == 0)  {bonus = 10.00;}

      else if(reviews == 1)  {bonus = 12.00;}

      else if(reviews == 2)  {bonus = 18.00;}

      else if(reviews == 3)  {bonus = 24.00;}

      else if (reviews >=4){bonus = 36.00;}

     }

     else if(weeks == 2){

      if(reviews == 0)  {bonus = 20.00;}

      else if(reviews == 1)  {bonus = 25.00;}

      else if(reviews == 2)  {bonus = 32.00;}

      else if(reviews == 3)  {bonus = 42.00;}

      else if (reviews >=4){bonus = 53.00;}

     }

     else if(weeks == 3){

      if(reviews == 0)  {bonus = 32.00;}

      else if(reviews == 1)  {bonus = 38.00;}

      else if(reviews == 2)  {bonus = 45.00;}

      else if(reviews == 3)  {bonus = 55.00;}

      else if (reviews >=4){bonus = 68.00;}

     }

     else if(weeks == 4){

      if(reviews == 0)  {bonus = 46.00;}

      else if(reviews == 1)  {bonus = 54.00;}

      else if(reviews == 2)  {bonus = 65.00;}

      else if(reviews == 3)  {bonus = 77.00;}

      else if (reviews >=4){bonus = 90.00;}

     }

     else if(weeks == 5){

      if(reviews == 0)  {bonus = 60.00;}

      else if(reviews == 1)  {bonus = 72.00;}

      else if(reviews == 2)  {bonus = 84.00;}

      else if(reviews == 3)  {bonus = 96.00;}

      else if (reviews >=4){bonus = 120.00;}

     }

     else if(weeks >= 6){

      if(reviews == 0)  {bonus = 85.00;}

      else if(reviews == 1)  {bonus = 100.00;}

      else if(reviews == 2)  {bonus = 120.00;}

      else if(reviews == 3)  {bonus = 140.00;}

      else if (reviews >=4){bonus = 175.00;}

     }

     System.out.println("Bonus : $"+bonus);      System.out.print("Weeks: ");  weeks = input.nextInt();      System.out.print("Positive Reviews: ");  reviews = input.nextInt();

 }

}

}

Explanation:

<em>See attachment 1 for complete question</em>

<em>See attachment 2 for explanation where I used comments to explain difficult lines</em>

<em />

You might be interested in
___refers to self-acting or self-operating.
lisabon 2012 [21]

Answer:

do it to me watch this

Explanation:

trailing zeros in a whole number with no decimal shown are NOT significan

6 0
2 years ago
Suppose a linked list of 20 nodes. The middle node has a data –250. Write the pseudocode to replace the middle node of the linke
dexar [7]

Answer:

The middle node has a data –250. ... Write The Pseudocode To Replace The Middle Node Of The Linked List With ... Assume That The List's Head Pointer Is Called Head_ptr And The Data For The New Node Is Called Entry ... Assume that the list's head pointer is called head_ptr and the data for the new node is called entry ...

Explanation:

4 0
2 years ago
Read 2 more answers
NTDS Quotas store NT Directory Service quota information that limits the number of Active Directory objects a user, group, compu
Anna35 [415]

Answer:

The anwer is advanced feature folder

Explanation:

Because NTDS QUOTAS is an advanced feature folder that stores NTDS quota information that limits the number of Active Directory objects a user, group, computer, or service can create.

3 0
2 years ago
Recall that with the CSMA/CD protocol, the adapter waits K. 512 bit times after a collision, where K is drawn randomly. a. For f
julia-pushkina [17]

Complete Question:

Recall that with the CSMA/CD protocol, the adapter waits K. 512 bit times after a collision, where K is drawn randomly. a. For first collision, if K=100, how long does the adapter wait until sensing the channel again for a 1 Mbps broadcast channel? For a 10 Mbps broadcast channel?

Answer:

a) 51.2 msec.  b) 5.12 msec

Explanation:

If K=100, the time that the adapter must wait until sensing a channel after detecting a first collision, is given by the following expression:

  • Tw = K*512* bit time

The bit time, is just the inverse of the channel bandwidh, expressed in bits per second, so for the two instances posed by the question, we have:

a) BW  = 1 Mbps = 10⁶ bps

⇒ Tw = 100*512*(1/10⁶) bps = 51.2*10⁻³ sec. = 51.2 msec

b) BW = 10 Mbps = 10⁷ bps

⇒ Tw = 100*512*(1/10⁷) bps = 5.12*10⁻³ sec. = 5.12 msec

5 0
2 years ago
What happens as the key length increases in an encryption application?
pashok25 [27]
<span>The answer is : Increasing the key length of DES would  protect it against brute force attacks.  </span>Brute force is when the attacker tries every key knowing that one will eventually work.  <span>Key length increase proportionally increases the key space,  having a keyspace l</span>arge enough that it takes too much time and money to accomplish a brute force attack.
6 0
2 years ago
Other questions:
  • HELP ASAP U GET BRAINLIEST
    15·2 answers
  • Marissa works at a company that makes perfume. She noticed many samples of the perfume were not passing inspection. She conducte
    6·2 answers
  • Darcy is creating an instructional manual for her employees. She entered the text in a word processing program and wants to impo
    6·1 answer
  • The video clip on driverless cars explained that brain signals from the individual wearing the headset are converted by computer
    13·2 answers
  • What was one important academic skill the blogger learned?
    9·1 answer
  • 5. Many vehicles have indicator lights telling you when your
    7·2 answers
  • 3.A customer has a system with a Gigabyte B450 Aorus Pro motherboard. He wants to upgrade the processor from the AMD Athlon X4 9
    11·1 answer
  • Given the macro definition and global declarations shown in the image below, provide answers to the following questions:
    5·1 answer
  • Write a program that calculates taxi fare at a rate of $1.50 per mile. Your pro-gram should interact with the user in this manne
    12·1 answer
  • Exponentiation Is a/an operater?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!