forked from finneyj/SolarSystem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SolarSystemController.java
37 lines (35 loc) · 1.73 KB
/
SolarSystemController.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Defines the methods that a SolarSystemController is required to implement.
* @see SolarSystemGUI
* @see SolarSystem
*/
public interface SolarSystemController
{
/**
* Add a new solar object with the given characteristics, that orbits the centre of the screen.
* @param name the name of the new solar object being created.
* @param orbitalDistance the distance of the new object from the centre of the screen.
* @param initialAngle the initial orbital angle of the object.
* @param size the size of the new object, in pixels.
* @param speed the rotational speed of the new object around the centre of the screen.
* @param colour the colour of the new object.
*/
public void add(String name, double orbitalDistance, double initialAngle, double size, double speed, String colour);
/**
* Add a new solar object with the given characteristics, that orbits a given parent object (e.g. planet).
* @param name the name of the new solar object being created.
* @param orbitalDistance the distance of the new object from its parent object.
* @param initialAngle the initial orbital angle of the object.
* @param size the size of the new object, in pixels.
* @param speed the rotational speed of the new object around its parent object.
* @param colour the colour of the new object.
* @param parentName the name of the solar object that the new object should orbit.
*/
public void add(String name, double orbitalDistance, double initialAngle, double size, double speed, String colour, String parentName);
/**
* Removes the given object from the screen.
*
* @param name the name of the object to remove
*/
public void remove(String name);
}