Designing a 3 Light Traffic Light Object Using a UML Diagram Assignment 13: Traffic Light Device Design a 3 light traffic light object using a UML Diagram

Designing a 3 Light Traffic Light Object Using a UML Diagram Assignment 13: Traffic Light Device

Design a 3 light traffic light object using a UML Diagram.

Don't use plagiarized sources. Get Your Custom Essay on
Designing a 3 Light Traffic Light Object Using a UML Diagram Assignment 13: Traffic Light Device Design a 3 light traffic light object using a UML Diagram
Get an essay WRITTEN FOR YOU, Plagiarism free, and by an EXPERT!
Order Essay

Think about the attributes of a traffic light. It has the states, Red, Yellow, and Green. It can also be in a blinking mode. Powered off is also a state but we will not need to program for that.

Create a program that is a class for a the Traffic light. See the Section Things to know this week.

This class needs methods to set the states for Red and Yellow and Green. It also needs a method to show the current state and if it is blinking.

Once that is done, the program should do the following.

1. Create an object ( just 1 ) that uses the Traffic Light class. This can be references in main().

2. Using a method in the object class, set the light color to green. Using a method in the object class, report the current state.

3. Using a method in the object class, set the light color to yellow. Using a method in the object class, report the current state.

4. Using a method in the object class, set the light to flashing. Using a method in the object class, report the current state.

Deliverables include the UML diagram and Java program.

Sample output:

Light is Green – Flashing = false
Light is Yellow – Flashing = false
Light is Yellow – Flashing = true

superadmin

Recent Posts

What is the easy difination of science | Quick Solution

Science is the pursuit and application of knowledge and understanding of the natural and social…

3 years ago

definition, values, meaning of such values and type of goods with such elasticity value …….. | Quick Solution

Clearly stating the definition, the values, the meaning of such values and the type of…

3 years ago

Acct 422 – Nora D | Quick Solution

All answered must be typed using Times New Roman (size 12, double-spaced) font. No pictures…

3 years ago

Acct 322 – Nora D | Quick Solution

All answered must be typed using Times New Roman (size 12, double-spaced) font. No pictures…

3 years ago

Macro Economics Question | Quick Solution

https://www.npr.org/sections/ed/2018/04/25/605092520/high-paying-trade-jobs-sit-empty-while-high-school-grads-line-up-for-university Click on the link above. Read the entire link and answer the questions below…

3 years ago

MGT 322 – Nora D | Quick Solution

All answered must be typed using Times New Roman (size 12, double-spaced) font. No pictures…

3 years ago