---
# System prepended metadata

title: Untitled

---


```java
class Intensity {    
    int r, g, b;         // RGB values at a position
}

class Position {
    int x, y;            // pixel position
}

class Pixel {            // pixel position with RGB values
    Intensity intensity;    
    Position position;
}

public interface IDrawErase {
    // parameter: ArrayList<Pixel> - an ArrayList of pixel with RGB values for random curve object 
    void draw_curve(ArrayList <Pixel>);
    // parameter: ArrayList<Position> - an ArrayList of pixel position for erase object
    void erase(ArrayList <Position>);
}
```

``` java
public interface IDrawShapes {
    // parameter: Pixel center - center position with intensity for circle
    //            radius - radius of circle
    void draw_circle(Pixel center, float radius);
    // makes an object for square parallel to the whiteBoard 
    // parameter: Pixel start - start position for square with RGB values in whiteBoard
    //            float length - length of the sqaure
    void draw_square(Pixel start, float length);         
    // parameter: Pixel start - top left position with RGB values for rectangle in whiteBoard
    //            Pixel end - bottom right position with RGB values for rectangle in whiteBoard
    void draw_rectangle(Pixel start, Pixel end); 
    // makes an object for a line segment parallel to the whiteBoard 
    // parameter: Pixel start - start position with RGB values
    //            Pixel end - end position with RGB values
    void draw_line(Pixel start, Pixel end);        
}
```

```java
public interface IUndoRedo {
    // redo the work done by a particular user
    void redo();
    // undo the work done by a particular user
    void undo();
}
```

```java
public interface IOperation {
    // returns the pixel position for selected object if  an object exist at selected position  
    ArrayList<Position> select (ArrayList <Position>);
    // deletes the selected object
    void delete ();
    // changes color of selected objected to specified intensity 
    void colorChange (Intensity intensity);
    // rotates selected object by specified angle in counter clockwise direction
    void rotate (double angleCCW);
    // removes all the object drawn by the particular user 
    void reset ();
}
```

```java
public interface IChanges {
    // UI will subscribe for notifications for any changes and we will notify when any changes will happen
    // UI will call getCahnges function and we will pass the changes
    boolean listenForChanges();
    // returns ArrayList<Pixel> - an ArrayList of position with intensity for the changes to be made in UI
    ArrayList<Pixel> getChanges();
}
```

```java
public interface IUser {
    // this function is used to get the user details during initial setup from user through UI 
    // if the board Id is null then we get a new board id from server and pass to UI
    // parameter: userName - user name
    //            ipAddress - ipaddress for the server with the port
    //            boardId - white board ID to which user wants to connect 
    String getUserDetails(String userName, String ipAddress, String boardId);
    // return the username at the selected position
    String getUser(ArrayList<Position>);
    void stopSession();
}
```