New to Java and very confused.
First let me state that this is a HW assignment and I absolutely do not want it done for me - I am making every effort to learn this on my own. I am just looking for input on where to start.
Here is the assignment:
__________
Create a Java class to implement the Angle class, described below. The class should represent a mathematical angle with a value between 0 and 359 degrees. Required elements:
* an instance variable that represents the degree of the angle
* accessor (getter) methods that return the angle in degrees and in radians (2 separate methods)
* mutator (setter) methods that are analogous to the accessor methods; note that these must enforce the restriction about degree of angle stated above
* constructors:
- a default constructor that sets degrees to 0
- a single-argument constructor that takes an argument representing degrees and sets the angle degree accordingly; note that this must enforce the degree specification 0 <= angle < 360
* accessor methods that return the following information about the angle:
* accessor methods that return the values;
- isAcute
- isObtuse
- isRight
- isStraight
- isReflex
* a compareTo method that compares the calling object with another Angle object and returns a 1, 0 or -1 as a result of the comparison (results mean the same as they do in the String and Fraction versions)
* a main method that tests all of the other methods, using a loop so that the user can control the number of repetitions.
___________
I understand what the Class is used for along with the getter and setter methods, but I don't understand how to put it all together. Are there any good examples that show something similar...or does anyone have any input on where they would start with this?