I have gotten started on this program but am getting no where fast. Its due june 28. Can someone help me with it please.
2. Create a class named Line.
3. Add an integer field to the Line class named length.
4. Add a String field to the Line class named color.
5. Add a mutator for length.
6. Add a mutator for color.
7. Add an accessor for length.
8. Add an accessor for color.
9. Create a default constructor that sets the fields to length of zero and color of “black”.
10. Create a constructor that sets the fields using parameters. Make sure the length cannot be set to a value less than zero or greater than 20. The color should only be allowed to be set to red, blue, green, or black. Any attempt to set disallowed values results in setting 0 for length and black for color.
11. Create a method called drawLine() which prints the color and the line using the proper number of asterisks with a for loop and System.out.print(). Make sure to print a newline afterward.
For example if the lines length is six and the color is red, drawLine() should print the following
12. Create a Main class with a main method.
13. Create a line named line1 using the default constructor.
14. Prompt the user for a length. Keep prompting until the user enters a number in the range of 1-20.
15. Prompt the user for a color. Keep prompting until either red, blue, green, or black are entered.
16. Create a line named line2 passing the values you just received in the previous to steps to the parameter constructor of the line Class.
17. Draw line1 using the drawLine() method.
18. Draw line2 using the drawLine() method.
I know how to start a main class and class line. My problem is I do not know where to go from there. I have tried several different things but all I get red marks. I just need to know what command I should use for this program and how to get started. If you could help me with that I feel confident I could get the rest.