-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDivision.java
More file actions
29 lines (27 loc) · 768 Bytes
/
Division.java
File metadata and controls
29 lines (27 loc) · 768 Bytes
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
/**
* An Integer division.
*
* @author Mak Fazlic & Roberto Ferrari - Latex project.
* @version v1.0
*/
public class Division extends Node
{
// instance variables - replace the example below with your own
private final Node leftChild;
private final Node rightChild;
/**
* Constructor for objects of class Division.
* @param leftChild expression Node.
* @param rightChild expression Node.
*/
public Division(final Node leftChild, final Node rightChild) {
super();
this.leftChild = leftChild;
this.rightChild = rightChild;
}
@Override
// Returns Latex of Division
public String toLatex() {
return "\\frac{" + leftChild.toLatex() + "}{" + rightChild.toLatex() + "}";
}
}