Write an application that computes and displays a worker’s anticipated output each month for 24 months assuming the worker starts by producing 4,000 parts and increases production by 6 percent each month. Also display the month in which production exceeds 7,000 parts (when the worker deserves a raise!) as follows: The month in which production exceeds 7000.0 is month X.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

This is the question I am having issues with -

The Freemont Automobile Factory has discovered that the longer a worker has been on the job, the more parts the worker can produce. Write an application that computes and displays a worker’s anticipated output each month for 24 months assuming the worker starts by producing 4,000 parts and increases production by 6 percent each month. Also display the month in which production exceeds 7,000 parts (when the worker deserves a raise!) as follows: The month in which production exceeds 7000.0 is month X.

This is the code I have. I know it isn't right because I am unsure how to make it count properly, but this is what I have -
 
public class IncreasedProduction {
    public static void main (String[] args) {
        final int month = 24;
        double parts = 4000.0;
        double production = 0.06;
        double raise = 7000.0;
       int counter;
        System.out.println("The month in which production exceeds 7000.0 is month " + month);
      counter = 1;
       while(counter >= parts)
       {
        System.out.print(counter + " ");
        counter = counter + 1;
    
       }
         System.out.println();
    }
}
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Running Time of Application
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT