Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with Part 2! Coded in Java please! Abby wants to start a backyard chicken egg business. As any good she wants to

I need help with Part 2! Coded in Java please!

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.

part one will be needed to be solved inorder to do part 2

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

Step: 3

blur-text-image

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

MFDBS 91 3rd Symposium On Mathematical Fundamentals Of Database And Knowledge Base Systems Rostock Germany May 6 9 1991

Authors: Bernhard Thalheim ,Janos Demetrovics ,Hans-Detlef Gerhardt

1991st Edition

3540540091, 978-3540540090

More Books

Students also viewed these Databases questions

Question

7-16 Compare Web 2.0 and Web 3.0.

Answered: 1 week ago