We are about to switch to a new forum software. Until then we have removed the registration on this forum.
this is for a class project ,
You will be writing a program to place a Spring/Easter order. A Lindt chocolate bunny (3.5oz) is $4.00, chocolate Easter eggs (88 pieces) are $5.99 and Peeps (Yellow Chick 15 count) is $2.99. These prices should be declared as constants. Likewise, Suffolk County Sales Tax should also be a constant (8.625%)
You will be creating a function for the calculation of the cost (item quantity and cost). As per the traffic light classwork, only one light was on at a time. You can use this mechanism to “place” the orders. Quantity is randomly generated between the values of 1 to 7.
can someone help me?
Answers
Sure.
The reference is your friend.
What is a constant?
final
is for making a constant from a variable :https://www.processing.org/reference/final.html
So start with
final float LindtChocolateBunny=4.00;
etc.Go on with that.
Quantity
.... int(random(1,8));
Function
The Output
Give it out as a table using text()
product | single cost | quantity | cost
Remark
Break the task down into steps
Write a code section for every step and make progress this way
Show your attempt as code