60 519
Assignments Done
98,2%
Successfully Done
In April 2018

Answer to Question #10235 in Java | JSP | JSF for kazam

Question #10235
The class ColourValue has a single field of type int that is used to hold a value representing an index into a colour pallette. The class provides an accessor (get method) and a mutator (set method) for this field. Both methods are visible to all other classes. The constructor of ColourValue takes a single parameter containing the initial value for the field.
Write a complete definition of the class ColourValue.
Expert's answer
public class ColorValue {

private int id;



ColorValue(int id){

this.id = id;

}



public void setID(int id){

this.id = id;

}



public int getID(){

return id;

}

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions