Question
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:
- Prompt the user for the variables noted above.
- If the user enters 0 for number of chickens, end the program (Hint: break out of the while loop).
- When all the parameters are entered, echo them back to the user identifying each one.
- Calculate the total cost of the operation per month. (Assume 30 days)
- Determine the cost to produce each dozen eggs. (Note: you may ignore any left-over eggs)
Part 2:
- 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.
- Part 1: 40 points
- User prompted appropriately.
- Calculations made and reported correctly.
- Part 2: Bonus Up To 10 points
- Range cost analysis calculated and reported accurately.
- Part 3: 10 points
- Diagram accurate.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started