ReviewEssays.com - Term Papers, Book Reports, Research Papers and College Essays
Search

Java Applet Use

Essay by   •  February 23, 2011  •  Essay  •  265 Words (2 Pages)  •  981 Views

Essay Preview: Java Applet Use

Report this essay
Page 1 of 2

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

...

...

Download as:   txt (1.7 Kb)   pdf (46.5 Kb)   docx (9.4 Kb)  
Continue for 1 more page »
Only available on ReviewEssays.com