Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need this assignment im doing a group project (the detail are in the picture) i got assign to do the classes for the streetlight

i need this assignment
im doing a group project (the detail are in the picture) i got assign to do the classes for the streetlight and temperature. the streetlight class will just need the light color and and intensity of the light with frequency to determine. it will determine when its dim and when to turn on and off. also when to turn on when a emergency is near by,. The temperature class determine when to turn on/dim and off depending on the temperature. it should be base on the details in the picture.
i have a rough draft of it. just need it to be more detailed plz
code is below:
//-------------- Streetlight.java-----------
public class Streetlight {
private Status status;
public Streetlight() {
}
public Streetlight(Status status) {
this.status = status;
}
public String getStatus() {
return status.name();
}
public void setOff() {
this.status = Status.OFF;
}
public void setOn() {
this.status = Status.ON;
}
public void setFlickerRed() {
this.status = Status.FLICKER_RED;
}
@Override
public String toString() {
return "Streetlight [status=" + status + "]";
}
}
// enum of status of the light,
// since a street light LED can be in only one state at a time
enum Status {
ON, OFF, DIM, FLICKER_RED
}
//---------- Temperature.java -----------------
public class Temperature {
private float value;
private String unit; // degree / Fahrenheit
public Temperature() {
}
public Temperature(float value, String unit) {
this.value = value;
this.unit = unit;
}
@Override
public String toString() {
return "Temperature [value=" + value + ", unit=" + unit + "]";
}
}
image text in transcribed
image text in transcribed
image text in transcribed
WhatsApp LTE 10:12 AM @* 90%- Obiective: The light's goal is to help reduce light pollution and energy consumption while keeping the roads safe and visible ns User (e.g. The City) will be able to use this code on smart streetlights that gather information from external sensors (not provided). The program will then analyze the information and make ap the smart streetlights LED light bulbs. propriate changes to The program will have three settings for the LED'S 1. light orn 2. light off 3. light dim These settings will depend on an analysis of the information the streetlight wl be able to pick up with Sensors that can detect will be able to analyze and differentiate various weather conditions A light sensor will determine the setting for the LED accordingly. The data picked up from these sensors will be stored and sent to the location (i.e. city). A motio letector on the smart streetlight will pick up walking pedestrians or moving vehicles that will tell the smart streetlight, whether or not the lights should be on. If there is no motion detected within a given amount of time, the light will dim. Onc mode, the light will not be using up as much e

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

1. Answer the question, Who should do the appraising?

Answered: 1 week ago

Question

=+management system of the MNE?

Answered: 1 week ago