download voltage.java
Language: Java
LOC: 399
Project Info
JavaML
Server: SourceForge
Type: cvs
...ml\javaml\java‑ml\examples\
   .cvsignore
   Abacus.java
   AlphaBullet.java
   Animator.java
   AnInterface.java
   AnonymousClass.java
   AnotherApplet.java
   Assignments.java
   AudioItem.java
   Banner.java
   BigInit.java
   Blah.java
   BounceItem.java
   Bubbles.java
   cannon.java
   Chart.java
   ComplexApplet.java
   ComplexApplet2.java
   Continued.java
   crossword.java
   DiningPhilosophers.java
   escherpaint.java
   fillTriangle.java
   FirstApplet.java
   generic_paint.java
   Hangman.java
   ImageLoop.java
   ImageLoopItem.java
   ImageTape.java
   ImageTest.java
   JackhammerDuke.java
   LED.java
   LEDMessage.java
   Letters.java
   OuterClass.java
   Pythagoras.java
   RotateFilter.java
   Script.java
   SimpAnim.html
   SimpAnim.java
   SimpleAnimator.java
   stars.java
   SystemInfo.java
   TumbleItem.java
   voltage.java
   WordMatch.java

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
package voltage;

import java.awt.*;
import java.lang.Math;
import java.lang.Integer;

/**
 * Parameters:
 *   VOLTAGE=int     Voltage level of the battery.  Defaults to 10
 *   AMPERAGE=int    Amperage level of the lightbulb.  Defaults to 2
 *
 * Synopsis:
 *
 * - Mon Aug 21 14:53:02 PDT 1995
 *   This tool allows users to derive the relationship between voltage,
 * resistance, and amplitude through experimentation.  Given a circuit
 * containing a battery with a voltage and a lightbulb with an amperage,
 * the user inserts resistors into the circuit.  If the resistance is
 * too low, the lightbulb explodes.  If the resistance is too high, 
 * the lightbulb fails to light.
 * 
 * History is located at the end of the sourcecode.
 *
 * @author Sean Russell
 * Department of Computing and Information Sciences, University of Oregon
 * Department of Physics, University of Oregon
 */
public class voltage extends java.applet.Applet
{
   Resistance resistance;	// The resistance array
   int rwidth, rheight;		// Resistor glyph idth and height
   int bwidth, bheight;
   int cx, cy, cw, ch;		// Clipping area.
   int ocx, ocy, ocw, och;
   int ix = 0, iy = 0;		// The x/y coords of whatever we're dragging
   Image bang;
   Image lightcircuit;
   int voltage;			// Voltage of the battery
   Image lightbulb_on, lightbulb_broken;
   Image lightswitch_on, battery;
   Battery batts[] = new Battery[4];
   int amperage;		// Amperage of the lightbulb
   boolean switch_on=false;	// Whether the switch is on or not.
   int rangeXStart, rangeYStart, // The location of the circuit area into
       rangeXEnd, rangeYEnd;	 // which resistors can be dropped
   int max_resistors = 6;	 // Max number of resistors
   int max_width = 600;		 // Max width of the app window
   int max_height = 150;	 // The max height of the app window
   int bar = 30;		 // The y value on which the circuit
				 // lies.
   int res_selected = 0;	 // 0 if no resistor is being dragged,
				 // <0 if a new resistor is being dragged,
				 // >0 if an old resistor is being dragged.
   int bat_selected = 0;	 // 0 if no battery is being dragged,
				 // >0 if a new battery is being dragged.
   boolean hide;		 // Determines whether the amperage is
				 // displayed.

   boolean auplay = false;

   /**
    * gets the images and initializes all of the drawing area values.
    * Reads arguments to the applet and makes sure that they are legal;
    * if not, adjusts them until they are legal, and if arguments weren't
    * given, generates random values.
    */
   public void init()
      {
      int sv;
      
      amperage = Integer.parseInt((getParameter("amperage") == null) ? 
				  "2" : getParameter("amperage"));
      voltage = Integer.parseInt((getParameter("voltage") == null) ? 
				 "12" :
				 getParameter("voltage"));
      hide = (getParameter("hide") == null) ? false : true;
      
      if (voltage < amperage) throw new IllegalArgumentException("Bad circuit values");
      while ((voltage % amperage) != 0)
	 {
	 voltage--;
	 if (voltage < amperage) voltage *= 10;
	 }
      
      Image r = getImage(getCodeBase(), "images/resistor.gif");
      lightswitch_on = getImage(getCodeBase(), "images/lightswitch-on.gif");
      
      // Resistor dimensions
      rwidth = 50;
      rheight = 18;
      
      battery = getImage(getCodeBase(), "images/battery.gif");
      if (battery == null)
	 throw new IllegalArgumentException("images/battery.gif not found");

      sv = ((voltage/2)<amperage) ? voltage : voltage/2 ;
      sv = ((sv % amperage) != 0) ? voltage : sv;

      for (int i=0; i<4; i++)
	{
	 batts[i] = new Battery(this, battery, (i+1)*sv, 
				123 + ((battery.getWidth(this)+10)*i), 
				3+rheight+2);
	}

      // Main Battery dimensions (more or less... used for other calculations)
      bwidth = 110;
      bheight = 57;

      lightcircuit = getImage(getCodeBase(), "images/light-circuit.gif");
      bang = getImage(getCodeBase(), "images/bang1.gif");
      lightbulb_on = getImage(getCodeBase(), "images/bulb-glow.gif");
      lightbulb_broken = getImage(getCodeBase(), "images/bulb-broken.gif");

      // Set up the area where the resistor glyphs in the circuit go
      rangeXStart = bwidth;
      rangeXEnd = bwidth + (rwidth*max_resistors);
      rangeYStart = bar + bheight;
      rangeYEnd = bar + bheight + 18;

      resistance = new Resistance(this, max_resistors, r, rangeXStart, rangeYStart);

      // Default clipping area
      cx = cy = 0;
      cw = max_width;
      ch = max_height;

      resize(max_width, max_height);
      }

    Image offimg;
    Graphics offg;

    public void paint(Graphics g) {
        update(g);
    }
   public void update(Graphics g)
      {
	  if (resistance == null) {
	      return;
	  }
	  if (offimg == null) {
	      Dimension d = size();
	      offimg = createImage(d.width, d.height);
	      offg = offimg.getGraphics();
	  }
      String total = new String("Total Resistance: ");
      int resist = resistance.resistance();

      // Clear the screen
      offg.setColor(getBackground());
      offg.fillRect(0,0,max_width,max_height);

      // Draw the dropzone for the circuit
      offg.draw3DRect(rangeXStart-2, rangeYStart-2,
		    rangeXEnd - rangeXStart + 4,
		    rangeYEnd - rangeYStart + 4,
		    false);

      offg.drawImage(lightcircuit, 0, bar, this);
      offg.setColor(Color.black);
      
      Output.print(offg, voltage, 30, bar+65);
      if (!hide)
	Output.print(offg, amperage, max_width - 47, bar+37);

      total += Integer.toString(resist);
      Output.print(offg, total, rangeXStart, rangeYEnd+16);

      // Draw the resistors in the toolbox
      offg.fill3DRect(100, 0, ((rwidth+10)*5)- 4, 
		    3 + rheight + 2 + battery.getHeight(this) + 2, 
		    false);
      for (int i=0; i < 5; i++)
	 resistance.draw(offg, (int)Math.pow(2, i), 
			 103 + ((rwidth+10)*i), 3); 

      for (int i=0; i < 4; i++)
	  batts[i].draw(offg);

      // Draw the resistors in the circuit
      resistance.draw(offg);

      // Handle switch events
      if (switch_on)
	 {
	 offg.setColor(getBackground());
	 offg.fillRect(469, bar, 32, 70);
	 offg.drawImage(lightswitch_on, 465, bar+23, this);

	 if ((amperage * resist) < voltage) // Blow up: too little resistance
	    {
   	    if (auplay)
	       {
	       // Blow up: too little resistance
	       if ((amperage * resistance.resistance()) < voltage)
		  play(getCodeBase(), "sounds/electricity.au");
	try {Thread.sleep(200);} catch (InterruptedException e){}
	       offg.drawImage(bang, 530, bar + 10, this);
	try {Thread.sleep(100);} catch (InterruptedException e){}
	       auplay = false;
	       }
	    offg.setColor(getBackground());
	    offg.fillRect(530, bar + 8, bang.getWidth(this), bang.getHeight(this)+2);
	    offg.drawImage(lightbulb_broken, 542, bar + 20, this);
	    Output.print(offg, amperage, max_width + 20, bar-10);
	    }
	 else if ((amperage * resist) == voltage) // V=IR: Just right. 
	    {					  // Light the bulb
	    offg.drawImage(lightbulb_on, 542, bar + 20, this);
	    Output.print(offg, amperage, max_width + 20, bar-10);
	    }
	 }

      if (res_selected != 0)	// We're dragging a resistor; we draw it
	 resistance.draw(offg, Math.abs(res_selected), ix, iy);

      if (bat_selected != 0)	// We're dragging a battery; we draw it
	  batts[bat_selected - 1].draw(offg, ix, iy);
      
      cx = cy = 0;
      cw = max_width;
      ch = max_height;
      g.drawImage(offimg, 0, 0, null);
      }

   /**
    * Initializes clipping variables; checks to see if the user clicked
    * in the toolbox, in the resistance box, or on the switch, and
    * reacts accordingly.
    */
   public boolean mouseDown(java.awt.Event evt, int x, int y)
      {
      // We have to set up some variables for erasing
      ix = ocx = (x - (rwidth/2));
      iy = ocy = (y - (rheight/2));

      // Check to see if they mouse downed in the new resistor
      // area.
      for (int i=0; i < 5; i++)
	 {
	 if ((x > ((i*(rwidth+10))+102)) && 
	     (x < ((i*(rwidth+10))+102+rwidth)) &&
	     (y > 2) && (y < rheight+3))
	    res_selected = (int)Math.pow(2, i)*-1;
	 }

      // Check to see if they mouse downed on a new battery
      if (res_selected == 0)
	{
	  for (int i=0; i<4; i++)
	    if (batts[i].in(x, y)) bat_selected = i+1;
	}
      
      // If they didn't click on a new resistor, check to see
      // if they clicked on an old resistor.
      if ((res_selected == 0) && (bat_selected == 0))
	 res_selected = resistance.mouseDown(x, y);

      // Check to see if they clicked on the onswitch
      // to turn it on.
      if ((res_selected == 0) && (bat_selected == 0))
	{
	  if ((x<504) && (x>465) &&
	      (y<(bar+56)) && (y>bar))
	    switch_on = (switch_on)?false:true;
	  else
	    switch_on = false;
	  auplay = true;
	}

      repaint();
      return true;
      }

   /** 
    * Adjusts clipping values for drags, and ignores the event otherwise.
    */
   public boolean mouseDrag(java.awt.Event evt, int x, int y)
     {
       int w = 0, 
           h = 0;

       if (res_selected != 0)	// We only care about drag events if
	 {			// we're carrying something
	   w = rwidth;
	   h = rheight;
	 }	 
       else if (bat_selected != 0)
	 {
	   w = battery.getWidth(this);
	   h = battery.getHeight(this);
	 }

       if (w != 0)
	 {
	   // The following centers the object on the mouse
	   x -= w/2;
	   y -= h/2;
	   cx = Math.max(0, Math.min(Math.min(ocx, x), max_width));
	   cy = Math.max(0, Math.min(Math.min(ocy, y), max_height));
	   cw  = Math.min(Math.abs(ocx-x)+ w , max_width-cx);
	   ch  = Math.min(Math.abs(ocy-y)+ h , max_height-cy);
	   ocx = ix = x;
	   ocy = iy = y;
	   repaint();
	 }
      return true;
     }

   /**
    * Checks for dropping a resistor in the droprange and
    * adds a resistor if so.
    * Also checks for dropping a new battery on the main battery,
    * and changes the main batt value if so.
    */
   public boolean mouseUp(java.awt.Event evt, int x, int y)
      {
      if (res_selected != 0)	// We only care about mouseUp events
	 {			// if we were carrying something
	 // Check to see if we're in the drop range
	 if ((x<rangeXEnd) && (x>rangeXStart) &&
	     (y<rangeYEnd) && (y>rangeYStart))
	    {
	    resistance.add(Math.abs(res_selected));
	    }			// that they were dragging something:
	 res_selected = 0;		// Add a new, or re-add an old
	 repaint();
	 }
      if (bat_selected != 0)
	{
	  if ((x < 73) && (y > (bar+50)) && (y < (bar+107)))
	    voltage = batts[bat_selected - 1].voltage;
	  bat_selected = 0;
	  repaint();
	}
      return true;
      }

   /**
    * Just calls repaint()
    */
   public void start()
      {
      repaint();
      }
}


/**
 * Dummy class to consolidate output functions in one place
 *
 * @author Sean Russell
 */
class Output
{
   /**
    * Print an integer value in g at (x,y)
    */
   public static void print(Graphics g, int val, int x, int y)
      {
      g.setColor(Color.black);
      g.drawString(Integer.toString(val), x+1, y+1);
      g.drawString(Integer.toString(val), x+1, y);
      g.setColor(Color.blue);
      g.drawString(Integer.toString(val), x, y);
      }

   /**
    * Print a string in g at (x,y)
    */
   public static void print(Graphics g, String val, int x, int y)
      {
      g.setColor(Color.black);
      g.drawString(val, x+1, y+1);
      g.drawString(val, x+1, y);
      g.setColor(Color.blue);
      g.drawString(val, x, y);
      }
   }


/** 
 * Resistance represents the total resistance along a circuit, and is made
 * up of resistors.  The resistance in the wire itself can be represented
 * by an additional resistor.  
 *
 * @author Sean Russell 
 */
class Resistance
{ 
   Resistor resistor[]; 
   Image res; 
   int num_resistors = 0; 
   int max_resistors = 0; 
   int xs, ys;
   voltage parent;

   /**
    * Creates a resistance circuit given the number of resistors
    * and the glyph to represent the resistors.
    */
   Resistance(voltage parent, int num, Image i, int xs, int ys)
    {
    this.parent = parent;
    res = i;
    resistor = new Resistor[num];
    max_resistors = num;
    this.xs = xs;
    this.ys = ys;
    }
   
   /**
    * Draws all resistors on the circuit.  Given a graphics context
    * and the (x,y) start coordinates.
    */
   public void draw(Graphics g)
      {
     for (int i=0; i < num_resistors; i++)
	{
	g.drawImage(res, resistor[i].x, resistor[i].y, parent);
	Output.print(g, resistor[i].resistance, 
	      resistor[i].x + 20, resistor[i].y + 14);
	}
     }

   /**
    * Draws a single resistor given graphics context g, the resistance
    * val, and the (x,y) coordinates to draw the glyph at.
    * val is the factor of the resistor, not the actual resistance
    */
   public void draw(Graphics g, int val, int x, int y)
      {
      g.drawImage(res, x, y, parent);
      Output.print(g, val, x+20, y+14);
      }

   /**
    * Adds a resistor with resistance size to the circuit.
    * size is the factor of the resistor
    */
   public void add(int size)
      {
      if (num_resistors < max_resistors)
	 {
	 num_resistors++;
	 resistor[num_resistors-1] = 
	    new Resistor(size, res,
			 xs + ((num_resistors-1)*res.getWidth(parent)),
			 ys);
	 }
      }

   /**
    * Checks to see if the mouseDown occurs over a resistor in
    * the circuit, and if so, selects that resistor.
    */
   public int mouseDown(int x, int y)
      {
      int sel = 0;
      int val = 0;

      for (int i=0; (i < num_resistors) && (sel==0); i++)
	 if (resistor[i].in(x, y)) sel = i+1;

      if (sel != 0) val = resistor[sel-1].resistance;
      if (sel != 0) remove(sel);

      return val;
      }
      
   /**
    * Removes the indexed resistor.  
    * which = [1, num_resistors]
    */
   public void remove(int which)
      {
      for (int i=which-1; i < (num_resistors-1); i++)
	 {
	 resistor[i].resistance = resistor[i+1].resistance;
	 }

      if (num_resistors > 0) num_resistors--;
      }
   
   /**
    * Totals and returns the resistance of the circuit.
    */
   public int resistance()
      {
      int val = 0;
      
      for (int i=0; i < num_resistors; i++) val += resistor[i].resistance;
      return val;
      }
   }


/**
 * Represents a resistor, including the resistance, width and height
 * of the glyph graphically representing the resistor, and the x/y
 * location of this resistor.
 * 
 * @author Sean Russell
 *
 */
class Resistor
{
   public int resistance;
   int x, y;
   int w, h;
   
   Resistor()
      {
      resistance = x = y = w = h = 0;
      }
   
   /**
    * Creates a resistor given:
    * res  resistance
    * i    the glyph, from which we draw height and width data
    * x,y  the (x,y) coordinates of the glyph
    */
   Resistor(int res, Image i, int x, int y)
      {
      resistance = res;
      this.x = x;
      this.y = y;
      w = 50;
      h = 18;
      }

   /**
    * Initializes a resistor with the values:
    * res  resistance
    * i    the glyph, from which we draw height and size().width data
    * x,y  the (x,y) coordinates of the glyph
    */
   public void init(int res, Image i, int x, int y)
      {
      resistance = res;
      this.x = x;
      this.y = y;
      w = 50;
      h = 18;
      }

   /**
    * Checks to see if (x,y) are within the space taken up by this
    * resistor's glyph.  Returns true if so, otherwise false.
    */
   public boolean in(int x, int y)
      {
      if ((x > this.x) && (x < (this.x + w)) &&
	  (y > this.y) && (y < (this.y + w)))
	 return true;
      return false;
      }

   /**
    * Zeros the resistor's values.
    */
   public void clear()
      {
      resistance = x = y = w = h = 0;
      }
   }


/**
 * A battery, with voltage, glyph and graphics coordinates
 */
class Battery
{
  voltage parent;
  Image glyph;
  public int voltage;
  int x, y;

  /**
   * Create a battery with the glyph i, the voltage v,
   * and the x/y coordinates of (xloc, ylox)
   */
  Battery(voltage parent, Image i, int v, int xloc, int yloc)
    {
      this.parent = parent;
      glyph = i;
      voltage = v;
      x = xloc;
      y = yloc;
    }

  /**
   * Changes the x and y coordinates of this battery
   */
  public void change(int xloc, int yloc)
    {
      x = xloc;
      y = yloc;
    }

  /**
   * Answers whether the given coordinate is within this battery's
   * glyph area with true or false
   */
  public boolean in(int xloc, int yloc)
    {
      if (
	  (xloc > x) && (yloc > y) &&
	  (xloc < (x + glyph.getWidth(parent))) &&
	  (yloc < (y + glyph.getHeight(parent)))
	  )
	return true;
      return false;
    }

  /**
   * Paints a battery at its coordinates, and adds the voltage
   */
  public void draw(Graphics g)
    {
      g.drawImage(glyph, x, y, parent);
      Output.print(g, voltage, x+15, y+14);
    }

  /**
   * Paints a battery at the given coordinates, and adds the voltage
   */
  public void draw(Graphics g, int xloc, int yloc)
    {
      g.drawImage(glyph, xloc, yloc, parent);
      Output.print(g, voltage, xloc+15, yloc+14);
    }
}


/**
 * History
 *
 * - Wed Aug 23 16:26:40 PDT 1995
 *   First major progress in the program.  Everything is going pretty
 * smoothly, since most of the non-UI AWT (of which there is very little
 * in this code) stuff is straightforward.  Java comes across as
 * increasingly elegant, as long as one understands that it only
 * resembles C++.  The absence of a preprocessor makes life more
 * difficult, and some constructions are a bit unnatural for those of
 * us more used to traditional C/C++, but I'm pleased.  Most of the
 * implementation of this code was done within about a day and a half
 * of reasonable effort.
 *   The dragging and clipping example supplied with Java was a bit
 * oddly implemented, but it helped.
 *   Left to do:
 *   + On/Off switch
 *   + Lightbulb animation
 *   + Cosmetics
 *   + Text gadgets for voltage and amperage
 *
 * - Thu Aug 24 12:15:43 PDT 1995
 *   It is done, unless Greg wants me to add thos text gadgets for the
 * battery and the lightbulb.  I don't think its neccessary, since we
 * hava a parameter list now.  The on/off switch took all of 10 minutes
 * to implement.  Lightbulb animation is simple, but it works.  Had
 * remarkably few bugs.
 *   Modified the reisitor levels to be powers of 2.
 *   Still waiting on graphics from Amy.
 *
 * - Fri Aug 25 12:00:27 PDT 1995
 *   Late yesterday I completely revamped the display.  Amy draw a really
 * nice circuit diagram so that the entire thing looks really slick.
 * It took about 1.5f hours to implement and debug.
 *   Today mostly cosmetic modifications.  Made the resistor toolbar
 * horizontal rather than vertical, which saves a lot of space.  Changed
 * dropbox from yellow to a 3DRect.  Added exception handling in the case
 * of missing GIFs.  Threw in some animation for when the lightbulb blows
 * up.  Added some quasi-external output functions so all of the printing
 * is centralized.  Cleaned up the code a lot, and optimized.  I had to
 * streamline the code a lot; I was doing things like calling update()
 * unneccessarily, etc.
 *
 * - Tue Sep  5 11:42:01 PDT 1995
 *   Greg came back from his vacation and is not completely satisfied with
 * the circuit simulator.  Still to do:
 *  + Drag-n-drop values for the battery (done: Tue Sep  5 13:25:49 PDT 1995)
 *  + Hidden but fixed amp value (done: Tue Sep  5 13:25:49 PDT 1995)
 *  + require that the user turn off the circuit, and shock them (virtually)
 *    if they don't.
 * Little modifications.  Most notably:
 *  + Added "hide" parameter, for optional hiding of amperage
 *  + Batterys are now multiples of the "voltage" argument
 *  + Text output is darker (more readable?)
 */

interface HISTORY {}

About Koders | Resources | Downloads | Support | Black Duck | Submit Project | Terms of Service | DMCA | Privacy Policy | Site Map| Contact Us