Answer:
Explanation:
//Guitar.java
import java.awt.Color;
import java.lang.reflect.Field;
import java.util.Random;
public class Guitar
/**
* these two fields are used to generate random note and duration
*/
static char[] validNotes = 'A', 'B', 'C', 'D', 'E', 'F', 'G' ;
static double[] validDuration = 0.25, 0.5, 1, 2, 4 ;
/**
* basic guitar attributes
*/
private int numStrings;
private double guitarLength;
private String guitarManufacturer;
private Color guitarColor;
public Guitar()
/**
* default constructor
*/
numStrings = 6;
guitarLength = 28.2;
guitarManufacturer = Gibson;
guitarColor = Color.RED;
public Guitar(int numStrings, double guitarLength,
String guitarManufacturer, Color guitarColor)
/**
* parameterized constructor
*/
this.numStrings = numStrings;
this.guitarLength = guitarLength;
this.guitarManufacturer = guitarManufacturer;
this.guitarColor = guitarColor;
/**
* required getters and setters
*/
public static char[] getValidNotes()
return validNotes;
public static void setValidNotes(char[] validNotes)
Guitar.validNotes = validNotes;
public static double[] getValidDuration()
return validDuration;
public