For this program you will generate two random force vectors and graph them when you click a Get Question button. When you click the Get Answer button, the equilibrant will be graphed and given as an answer.
INPUTS:
The user will click the "Get Question" button
Two random forces are generated, graphed and stated in a problem
OUTPUTS:
The user will click the "Get Answer" button
The equilibrant will be graphed
The equilibrant will show up in the answer box
CRITERIA & CONSTRAINTS:
Your program should have an impressive interface. (colors and graphics)
A "Get Question" and a "Get Answer" button will be displayed.
Duplicate your vector program to start this program. Instead of 5 vectors you will only need two and instead of the user entering these you will just create them randomly.
Create two force magnitude variables f1 and f2 and set them to a random number from 1-10.
Create two angle variables a1 and a2 and set them to a random number from 1-360.
Calculate the ihats and jhats of both vectors and the sum of both the ihats and the sum of the jhats.
Since we want the equilibrant, change the signs of the ihats sum and the jhats sum.
Calculate the magnitude and angle of the equilibrant.
Add a question statement and an answer statement and put them on the interface.
The graph is the tricky part. Check out the tables at the bottom. When the Get Question button is clicked the first table is created. When the Get Answer button is clicked the second table is created. The only difference is cell AA6. When the Get Question button is clicked the cell is set as "". When the Get Answer button is clicked the cell is set as the equilibrant jhat.
Column Y is a blue graph that shows both the force vectors.
Column Z is actually a black line graph (or the same as the chart background) because we don't want it to show up until we click the Get Answer button.
Column AA is a red graph that will show up when the Get Answer button is clicked.
When the Get Question button is clicked set AA6 to "".
When the Get Answer button is clicked set AA6 to whatever is in Z6.
Make sure you are plotting Null values.
When the Get Question button is clicked setFontColor of the answer box to white.
When the Get Answer button is clicked setFontColor of the answer box to black.