Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Hello,I have the gist of the computer program..but I am getting

Hello,<br/>I have the gist of the computer program..but I am getting

errors..need help with the class model and the import color.

import java.awt.Color;public class HeadPhones {public static final int LOW = 1;public static final int MEDIUM = 2;public static final int HIGH = 3;private int volume;private boolean pluggedIn;private String manufacturer;private String headPhoneModel;private Color headPhoneColor;public HeadPhones() {volume = MEDIUM;pluggedIn = false;manufacturer =( “”);headPhoneModel= (“”);headPhoneColor = Color.black;}/**** @return volume of headphone*/public int getVolume() {return volume;}/*** set volume of headphone** @param volume*/public void setVolume(int volume) {this.volume = volume;}/**** @return true if the headphone is plugged in, false otherwise*/public boolean getPluggedIn() {return pluggedIn;}/*** set plugged in** @param pluggedIn*/public void setPluggedIn(boolean pluggedIn) {this.pluggedIn = pluggedIn;}/**** @return manufacturer*/public String getManufacturer() {return manufacturer;}
Background image of page 1
/*** set manufacturer** @param manufacturer*/public void setManufacturer(String manufacturer) {this.manufacturer = manufacturer;}/**** @return model*/public String getheadPhoneModel() {return model;}/*** set head phone model** @param model*/public void setheadPhoneModel(String model) {this.model = model;}/**** @return headphone color*/public Color getHeadPhoneColor() {return headPhoneColor;}public String getColorName(){String colorName = “Black”;if (headPhoneColor == Color.Black || headPhoneColor == Color.black) {colorName = “Black”;} else if (headPhoneColor == Color.WHITE || headPhoneColor ==Color.white) {colorName = “White”;} else if (headPhoneColor == Color.RED || headPhoneColor == Color.red) {colorName = “Red”;} else if (headPhoneColor == Color.PINK || headPhoneColor == Color.pink){colorName = “Pink”;} else if (headPhoneColor == Color.CYAN || headPhoneColor == Color.cyan){colorName = “Cyan”;} else if (headPhoneColor == Color.BLUE || headPhoneColor == Color.blue){colorName = “Blue”;} else if (headPhoneColor == Color.GREEN || headPhoneColor ==Color.green) {colorName = “Green”;} else if (headPhoneColor == Color.GRAY || headPhoneColor == Color.gray){colorName = “Gray”;}return colorName;}/*** set headphone color*
Background image of page 2

Show

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"