Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA Project 2 Abby wants to start a backyard chicken egg business. As any good she wants to count the costs of such an operation

JAVA Project 2

Abby wants to start a backyard chicken egg business. As any good she wants to count the costs of such an operation to determine if she can make a profit. While there are a number of variables, naturally the most influential ones are:

  • Number of chickens
  • Average number of eggs laid per day per chicken
  • Pounds of feed per chicken per day
  • Cost per pound for feed
  • Empty carton cost

Not being much of a programmer yet, she needs your help by writing a program which will help her assess the viability of her venture. The program should fulfill the following requirements:

Part 1:

  1. Prompt the user for the variables noted above.
  2. If the user enters 0 for number of chickens, end the program (Hint: break out of the while loop).
  3. When all the parameters are entered, echo them back to the user identifying each one.
  4. Calculate the total cost of the operation per month. (Assume 30 days)
  5. Determine the cost to produce each dozen eggs. (Note: you may ignore any left-over eggs)

Part 2:

  1. Since the number of chickens, eggs laid per chicken, and pounds of feed per chicken per day, scale linearly with the operation it becomes apparent that the profit or loss of the venture is heavily influenced by the cost of the feed. A larger flock could command bulk feed purchases resulting in a lower per pound costs. However, the time of year and weather may also impact the cost of feed. As such, Abby wants to calculate the cost per dozen with the supplied feed cost varied from -25% to +25% at 5% intervals. At each interval, output the cost per dozen assuming the other variables remain constant.

Hint: The easiest way to do this is to let the percent be controlled in a for-loop varying from -25 to 25 with a step of 5.

Part 3:

Using UMLet or Draw.IO draw an activity diagram to document your programs implementation.

Grading:

General: All code should be documented and formatted appropriately. Variables and method names should be descriptive, integrity pledge included, project properly zipped and submitted.

  1. Part 1: 40 points
    1. User prompted appropriately.
    2. Calculations made and reported correctly.
  2. Part 2: Bonus Up To 10 points
    1. Range cost analysis calculated and reported accurately.
  3. Part 3: 10 points
    1. Diagram accurate.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions

Question

Is the assumption of normality important in Exercise 7-51? Why?

Answered: 1 week ago

Question

Equity decreases with expenses and revenues. True False

Answered: 1 week ago

Question

Networking is a two-way street. Discuss this statement.

Answered: 1 week ago