class Motorcycle{ String make; String color; boolean engineState; void startEngine() { if(engineState==true) System.out.println("The engine is already on."); else{ engineState=true; System.out.println("The engine is now on"); } } void stopEngine() { if(engineState==true) { engineState=false; System.out.println("The engine is now off."); } else{ System.out.println("The engine is already off"); } } void showAtts(){ System.out.println("This motocrycle is a"+color+make); if(engineState==true) System.out.println("The engine is on"); else System.out.println("The engine is off"); } public static void main(String args[]){ Motorcycle m=new Motorcycle(); // m.make="Harley Davidson"; m.make="HH HH DDDD\nHH HH DD DD\nHH HH DD DD\nHHHHHHHH DD DD\nHH HH DD DD\nHH HH DD DD\nHH HH DDDD"; m.color=" BLACK\n"; System.out.println("Calling showAtts..."); m.showAtts(); System.out.println("-----------"); System.out.println("Starting engine..."); m.startEngine(); System.out.println("-----------"); System.out.println("Calling showAtts..."); m.showAtts(); System.out.println("-----------"); System.out.println("Starting engine..."); m.startEngine(); System.out.println("-----------"); System.out.println("Stopping engine..."); m.stopEngine(); System.out.println("-----------"); System.out.println("Stopping engine..."); m.stopEngine(); } }