Create a class which defines a "Garment" object.
$2-8 USD / hour
Assume that you are creating a class which defines a “Garment” object. Your class has the following variables:
private int gType;
private int gColor;
1. Code the constructor for the Garment class which has two formal parameters whose values are assigned into the class variables.
2. Code a mutator method for the gColor variable.
3. Assume that the gType variable contains a 1 for shirt and a 2 for pants, no other values will be loaded into this variable. Likewise the gColor variable contains a 1, 2 or 3 for red, green and blue respectively. Code the “toString” method for the “Garment” class which returns a string of the form: color space type. For example if gType contains a 1 (for a shirt) and gColor contains a 2 (for green) the method should return: green shirt
Project ID: #4812463
About the project
Awarded to:
2 freelancers are bidding on average $3/hour for this job
Dear Employer.. This is a simple task. I can do with nice structure and excetpion handling. If any more details please send me,