Professional Documents
Culture Documents
at
1432 GOVERNMENT POLYTECHNIC NANDURBAR.
1
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI
Certificate
This is to certify that Miss.1)Ritul Prashant Borse : Roll NO:3117
Date: 5 / 2 / 2021
Seal of
Institute
2
Index
1 Introduction 4
2 Source code 5
4 Conclusion 7
7 Evaluation sheet 10
3
INTRODUCTION:
The program lets the user select one of three lights: red, yellow, or green. When a radio
button is selected, the light is turned on, and only one light can be on at a time No light
is on when the program starts
It has been stated that the first traffic signal to be installed in Great Britain was erected
in Westminster in 1868. It was illuminated by town gas and unfortunately for the future
development of signals of this type was demolished by an explosion. Not until 1918
were signals used again for the control of highway traffic when manually operated
three-colour light signals were introduced in New York. Some seven years later
manually controlled signals were used in Piccadilly, followed in 1926 by the first
automatic traffic signals in Great Britain, which were erected at Wolverhampton.
A road signal for directing vehicular traffic by means of colored lights, typically red for
stop, green for go, and yellow for proceed with caution. Also called stoplight, traffic
signal.
one of a set of coloured lights placed at crossroads, junctions, etc, to control the flow of
traffic. A red light indicates that traffic must stop and a green light that it may go:
usually an amber warning light is added between the red and the green
4
Source Code:
//public class TR {
//Program for implementing Traffic Signals
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
/*<applet code="Signals" width=150 height=150></applet>*/
public class TR extends Applet implements ItemListener
{
String msg="";
Checkbox stop,ready,go;
CheckboxGroup cbg;
public void init()
{
cbg = new CheckboxGroup();
stop = new Checkbox("Stop", cbg, false);
ready = new Checkbox("Ready", cbg, false);
go= new Checkbox("Go", cbg, false);
add(stop);
add(ready);
add(go);
stop.addItemListener(this);
ready.addItemListener(this);
go.addItemListener(this);
msg=cbg.getSelectedCheckbox().getLabel();
g.drawOval(90,40,50,50);
g.drawOval(90,100,50,50);
g.drawOval(90,160,50,50);
if(msg.equals("Stop"))
{
5
g.setColor(Color.red);
g.fillOval(90,40,50,50);
}
else if(msg.equals("Ready"))
{
g.setColor(Color.yellow);
g.fillOval(90,100,50,50);
}
else
{
g.setColor(Color.green);
g.fillOval(90,160,50,50);
}
}
}
Output:
6
Advantages:
1. Traffic control signals provide for an orderly movement of traffic.
2. They help in reducing the frequency of an accident of some special nature i.e. of right
angles accidents.
3. They intercept heavy traffic to allow other traffic to cross the road intersection
Safety.
4. They provide authority to the drivers to move with confidence.
5. They control the speed of vehicles on main as well as on secondary roads.
6. They direct traffic on different routes without excessive congestion.
7. The provide economy over manual control at the intersection.
Disadvantages:
1. Some drivers disobey these signals.
2. Increasing traffic congestion, air pollution, and fuel consumption.
3. Increase in use of less-adequate roads to avoid traffic signs.
4. Excessive delay due to time allocated by the traffic signals.
Conclusion:
As a conclusion, the controller can control the traffic movement and detect a
busy and non busy road. The overall of this project is ok but certain condition the traffic
signals is not function properly. The critical problem is about the timing.
The number one reason for traffic control systems is to ensure the safety of
those around or in traffic. A roadway system without traffic controls begets more accidents and
more injuries. Without direction, the roadway would become much more dangerous.
7
Literature review and references:
Books references:
1) Java programming Languge
Sites references:
1)www.google.com
2)www.javaTpoint
3)www.Geeksforgeeks
4)http://learnegene.blogspot.com
8
Weekly Work / Progress Report
9
ANEXURANE-II
( )
Signature with name and designation of the faculty member
10
11
12
13