Question: Consider a firework display arrangement, you have to fire every few seconds after the previous round finishes. Let's assume that a round of fireworks takes

Consider a firework display arrangement, you have to fire every few seconds after the previous round finishes. Let's assume that a round of fireworks takes between 30 seconds to 60 seconds to complete. And then the next round starts. Let's say we have 10 rounds like this. Simulate the above scenario using client-side scripting. Each round takes a random number of seconds between 30 to 60. And give a delay of 5 seconds after a round completes and before starting off the next round. Display the starting time and the time taken for each round in the web page. And display firework in progress for the running time and complete once it finishes. Provide a start button to start the simulation, a pause button to pause the simulation at any time, a continue button to continue the simulation from the paused point and a clear button to clear everything and start from the first
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
