Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 344 Weeks Ago, 1 Day Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Programming Posted 28 May 2017 My Price 6.00

Construct a class named Light that simulates a traffic light

(Program) Construct a class named Light that simulates a traffic light. The class’s color attribute should change from Green to Yellow to Red and then back to Green by using the class’s change() method. When a new Light object is created, its initial color should be Red

 

Answers

(8)
Status NEW Posted 28 May 2017 09:05 AM My Price 6.00

-----------

Attachments

1495963164-2164364_2_636314565344855432_sample-output.PNG
file 1495963191-Answer.docx preview (43 words )
#-----------inc-----------lud-----------e &-----------amp-----------;lt-----------;io-----------str-----------eam-----------&am-----------p;g-----------t; ----------- #i-----------ncl-----------ude----------- &a-----------mp;-----------lt;-----------str-----------ing-----------&am-----------p;g-----------t; ----------- us-----------ing----------- na-----------mes-----------pac-----------e s-----------td;----------- c-----------las-----------s L-----------igh-----------t -----------{ -----------pub-----------lic-----------: -----------Lig-----------ht(-----------); ----------- st-----------rin-----------g L-----------ook-----------() -----------con-----------st;----------- v-----------oid----------- Ch-----------ang-----------e()-----------; -----------pri-----------vat-----------e: ----------- st-----------rin-----------g C-----------olo-----------r; ----------- };----------- L-----------igh-----------t::-----------Lig-----------ht(-----------){ ----------- Co-----------lor----------- = -----------&qu-----------ot;-----------Yel-----------low-----------&qu-----------ot;-----------; -----------} -----------str-----------ing----------- Li-----------ght-----------::L-----------ook-----------() -----------con-----------st ----------- { ----------- re-----------tur-----------n C-----------olo-----------r; ----------- } ----------- vo-----------id -----------Lig-----------ht:-----------:Ch-----------ang-----------e()----------- {----------- i-----------f (-----------Col-----------or -----------== -----------&qu-----------ot;-----------Gre-----------en&-----------quo-----------t;)----------- C-----------olo-----------r =----------- &q-----------uot-----------;Ye-----------llo-----------w&q-----------uot-----------;; ----------- el-----------se -----------if -----------(Co-----------lor----------- ==----------- &q-----------uot-----------;Ye-----------llo-----------w&q-----------uot-----------;) ----------- Co-----------lor----------- = -----------&qu-----------ot;-----------Red-----------&qu-----------ot;-----------;
Not Rated(0)