Question: I am trying to compile this code in NetBeans and I am coming up with errors. Please tell me the errors and show in NetBean
I am trying to compile this code in NetBeans and I am coming up with errors. Please tell me the errors and show in NetBean what I am doing wrong: *File: Headphones.java *Author:Jaime Jones *Date: April 21,2017 *Class: CMIS 141 7982 */ 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 headPhoneColor; HeadPhones(){ volume = MEDIUM; pluggedIn = false; manufacturer = "DEFAULT"; headPhoneColor = "DEFAULT"; } public void setVolume(int v){ if(v < LOW){ volume = LOW; } else if(v > HIGH){ volume = HIGH; } else{ volume = v; } } public void setPluggedIn(boolean p){ pluggedIn = p; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
