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
be0f60d7
Commit
be0f60d7
authored
Jan 21, 2018
by
Rohit Prasad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add toString() method
parent
ea8d383e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
src/Customer.java
src/Customer.java
+5
-0
src/Order.java
src/Order.java
+6
-0
src/Stock.java
src/Stock.java
+5
-0
No files found.
src/Customer.java
View file @
be0f60d7
...
@@ -12,4 +12,9 @@ public class Customer {
...
@@ -12,4 +12,9 @@ public class Customer {
return
this
.
id
.
equals
(
c
.
getId
());
return
this
.
id
.
equals
(
c
.
getId
());
}
}
@Override
public
String
toString
()
{
return
id
;
}
}
}
src/Order.java
View file @
be0f60d7
...
@@ -67,4 +67,10 @@ public abstract class Order {
...
@@ -67,4 +67,10 @@ public abstract class Order {
&&
this
.
c
.
equals
(
t
.
getCustomer
())
&&
this
.
stock
.
equals
(
t
.
getStock
())
&&
this
.
c
.
equals
(
t
.
getCustomer
())
&&
this
.
stock
.
equals
(
t
.
getStock
())
&&
this
.
qty
==
t
.
getQty
()
&&
this
.
price
==
t
.
getPrice
();
&&
this
.
qty
==
t
.
getQty
()
&&
this
.
price
==
t
.
getPrice
();
}
}
@Override
public
String
toString
()
{
return
"<"
+
time
+
","
+
type
+
","
+
c
+
","
+
stock
+
","
+
qty
+
","
+
price
+
">"
;
}
}
}
src/Stock.java
View file @
be0f60d7
...
@@ -12,4 +12,9 @@ public class Stock {
...
@@ -12,4 +12,9 @@ public class Stock {
return
this
.
name
.
equals
(
s
.
getName
());
return
this
.
name
.
equals
(
s
.
getName
());
}
}
@Override
public
String
toString
()
{
return
name
;
}
}
}
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