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

This question was created from Homework 3 Revision 3(1)

This question was created from Homework 3 Revision 3(1) https://www.coursehero.com/file/16826640/Homework-3-Revision-31/

16826640-290036.jpeg

16826640-290036.jpeg
125 points ) Create a Java class named Head Phone to represent a headphone set . The class contains :
Three integer constants named LOW , MEDIUM , and HIGH with values of 1 , 2 , and 3 .
A private int data field named volume that contains the volume setting of the headphone . The
default value is HIGH .
A private boolean data field named pluggedin that specifies if the headphone is plugged in . The
default value is False .
A private String data field named manufacturer that specifies the name of the manufacturer of
the headphones .
A private Color data field named head Phone Color that specifies the color of the headphones .
This must be an object of the java . ant . Color class . ( You will need to look up the features of this
class . )
A two – argument constructor that creates a Head Phone object with specified manufacturer*
name and color , and default values for all other data fields .
A method named to String ! ) that returns a String object describing the current field values of the
headphone .
A method named chang = Volume ( int value ) that changes the volume of the headphone to the
value passed into the method . If the provided value is invalid , the volume shall not be changed .
Better methods for all data fields , and setter methods for all data fields except manufacturer*
name and device color and volume . ( !)
( Note : It’s not appropriate to provide " set " methods for the manufacturer and color because in the real
world , manufacturer and color of a shipped product cannot be changed . Also , we don’t want a " set "
method for volume because that function is provided by the change Volume method , which provides the
needEd input data validation . )
Create a Test Head Phone main class to test the Head Phone class . For each test , the necessary inputs
shall be obtained from the tester ( user ) . Each feature of the Headphone class shall be tested by
comparing outputs from the getter methods to the required values . Test three different headphones .
(
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"