-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrder.java
More file actions
30 lines (26 loc) · 835 Bytes
/
Order.java
File metadata and controls
30 lines (26 loc) · 835 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
30
package com.company;
import java.util.UUID;
public class Order {
String type,scrip,name;
double qty,rate;
Order(String name, String type, String scrip, double qty, double rate){
this.name = name;
this.type = type;
this.scrip = scrip;
this.qty = qty;
this.rate = rate;
}
public String getName(){return name;} //to get name of user
public String getType(){return type;} //to get type of order, buy or sell
public String getScrip(){
return scrip;
} //to get Ticker
public double getQty(){return qty;}
public double getRate() {
return rate;
}
@Override
public String toString() {
return "user : " + name + ", type=" + type + ", scrip=" + scrip + ", qty=" + qty + ", rate=" + rate;
}
}