Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CS682-HW1-OrderMatching
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rohit Prasad
CS682-HW1-OrderMatching
Commits
89e0dffd
Commit
89e0dffd
authored
Jan 20, 2018
by
Rohit Prasad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change class name
parent
bf173046
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
src/BuyOrder.java
src/BuyOrder.java
+6
-0
src/Order.java
src/Order.java
+3
-3
src/SellOrder.java
src/SellOrder.java
+5
-0
No files found.
src/Buy
Trade
.java
→
src/Buy
Order
.java
View file @
89e0dffd
public
class
Buy
Trade
extends
Trade
{
public
class
Buy
Order
extends
Order
{
Buy
Trade
(
int
time
,
Customer
c
,
Stock
stock
,
int
qty
,
float
price
)
{
Buy
Order
(
int
time
,
Customer
c
,
Stock
stock
,
int
qty
,
float
price
)
{
super
(
time
,
"BUY"
,
c
,
stock
,
qty
,
price
);
super
(
time
,
"BUY"
,
c
,
stock
,
qty
,
price
);
}
}
}
}
src/
Trade
.java
→
src/
Order
.java
View file @
89e0dffd
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* for both SellTrade and BuyTrade classes that will inherit
* for both SellTrade and BuyTrade classes that will inherit
* for it.
* for it.
*/
*/
public
abstract
class
Trade
{
public
abstract
class
Order
{
int
qty
;
int
qty
;
float
price
;
float
price
;
int
time
;
int
time
;
...
@@ -11,7 +11,7 @@ public abstract class Trade {
...
@@ -11,7 +11,7 @@ public abstract class Trade {
Customer
c
;
Customer
c
;
Stock
stock
;
Stock
stock
;
Trade
(
int
time
,
String
type
,
Customer
c
,
Stock
stock
,
int
qty
,
float
price
)
{
Order
(
int
time
,
String
type
,
Customer
c
,
Stock
stock
,
int
qty
,
float
price
)
{
this
.
qty
=
qty
;
this
.
qty
=
qty
;
this
.
price
=
price
;
this
.
price
=
price
;
this
.
c
=
c
;
this
.
c
=
c
;
...
@@ -43,7 +43,7 @@ public abstract class Trade {
...
@@ -43,7 +43,7 @@ public abstract class Trade {
// type check and case
// type check and case
if
(
getClass
()
!=
o
.
getClass
())
return
false
;
if
(
getClass
()
!=
o
.
getClass
())
return
false
;
Trade
t
=
(
Trade
)
o
;
Order
t
=
(
Order
)
o
;
return
this
.
time
==
t
.
getTime
()
&&
this
.
type
.
equals
(
t
.
getType
())
return
this
.
time
==
t
.
getTime
()
&&
this
.
type
.
equals
(
t
.
getType
())
&&
this
.
c
.
equals
(
t
.
getCustomer
())
&&
this
.
stock
.
equals
(
t
.
getStock
())
&&
this
.
c
.
equals
(
t
.
getCustomer
())
&&
this
.
stock
.
equals
(
t
.
getStock
())
...
...
src/Sell
Trade
.java
→
src/Sell
Order
.java
View file @
89e0dffd
public
class
Sell
Trade
extends
Trade
{
public
class
Sell
Order
extends
Order
{
Sell
Trade
(
int
time
,
Customer
c
,
Stock
stock
,
int
qty
,
float
price
)
{
Sell
Order
(
int
time
,
Customer
c
,
Stock
stock
,
int
qty
,
float
price
)
{
super
(
time
,
"SELL"
,
c
,
stock
,
qty
,
price
);
super
(
time
,
"SELL"
,
c
,
stock
,
qty
,
price
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment