java programming 67

Stuck with a difficult assignment? No time to get your paper done? Feeling confused? If you’re looking for reliable and timely help for assignments, you’ve come to the right place. We promise 100% original, plagiarism-free papers custom-written for you. Yes, we write every assignment from scratch and it’s solely custom-made for you.


Order a Similar Paper Order a Different Paper

13: Traffic Light Device

Traffic Light

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

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:

<strong>Light is Green - Flashing = false</strong>
<strong>Light is Yellow - Flashing = false</strong>
<strong>Light is Yellow - Flashing = true</strong>

Writerbay.net

We’ve proficient writers who can handle both short and long papers, be they academic or non-academic papers, on topics ranging from soup to nuts (both literally and as the saying goes, if you know what we mean). We know how much you care about your grades and academic success. That's why we ensure the highest quality for your assignment. We're ready to help you even in the most critical situation. We're the perfect solution for all your writing needs.

Get a 15% discount on your order using the following coupon code SAVE15


Order a Similar Paper Order a Different Paper