Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem Description For PA1, you are to build an application that keeps track of ingredients and ordering costs for a lemonade stand. This application will

image text in transcribed

Problem Description For PA1, you are to build an application that keeps track of ingredients and ordering costs for a lemonade stand. This application will estimate, given the available ingredients, how much lemonade can be made. It will also calculate the cost to order more inventory to produce a certain amount of lemonade. Inputs: User should be able to enter the number of lemons currently in stock. Expect an integer value. User should be able to enter the cups of sugar currently in stock. Expect a double value. User should be able to enter the desired number of gallons of lemonade they wish to produce. Expect an integer value. Outputs / Functionality: There should be one button in the application that, when pressed, reads in the current number of lemons and current cups of sugar, and calculates how many gallons of lemonade can currently be produced. 1 gallon of lemonade requires 3 lemons and 0.75 cups of sugar. For example, if the user entered 30 lemons and 1 cup of sugar, the application should calculate that 1 gallon of lemonade can be produced (there are plenty of lemons but only enough sugar for 1 gallon). The number of gallons produced should be a whole number. There should be one button in the application that, when pressed, reads in the current number of lemons and current cups of sugar, and the desired number of gallons of lemonade they wish to produce. The application will then calculate how many additional lemons and cups of sugar are required to produce the desired gallons of lemonade. Next, calculate the cost to order the missing inventory, given that 1 lemon costs $0.45 and 1 cup of sugar costs $1.05. Finally, output the number of lemons needed to be ordered, the cups of sugar needed to be ordered, and the total cost to order these ingredients. Program Requirements Your program should be free of syntax errors and build and compile properly. All inputs and outputs and controls should be clearly labeled. Inputs should be tested for incorrect/missing values

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

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

design a simple performance appraisal system

Answered: 1 week ago