Java Applet Use
Essay by review • February 23, 2011 • Essay • 265 Words (2 Pages) • 958 Views
Problem Statement
Create an applet displaying an arrangement of lighting 'bulbs' and allows
the user to assign a color and lighting information to subsets of bulbs.
The lighting information would include color of the bulb, a start time and
a periodicity.
Once the user is done with programming the bulbs in this manner, the
applet should simulate the bulbs lighting for a length of time specified
by the user (simulating something like Diwali lights with different
patterns of bulbs lighting).
The implementation involves
1) Making an applet, creating the input -output interface.
2) Timing simulation.
Note that the simulation events must be maintained in a priority queue
implemented as a binary heap with time information as the priority. It is
required that the input is given from a file about the lay out of the
bulbs, the attributes of bulbs (Name or ID, color, shape, start time,
periodicity, etc.). In addition it is encouraged that one makes
interactive interface for inputs.
For Example:
If the applet contains 10 bulbs and color options for red, blue and green.
(assuming initially no bulb has any color).
The user can choose bulb 1, 3, 5, 7, 9 and assign color red, periodicity 2
and start time 1. And then he may choose bulbs 2, 4, 6, 8, 10 and assign
color blue, periodicity 2 and start time 2.
If the simulation time is set by the user for 10 units, then one should
see for 10 time units, red and blue bulbs lighting alternately at periodic
intervals.
At
...
...