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
092fa884
Commit
092fa884
authored
Jan 22, 2018
by
Rohit Prasad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug for EOF when input is provided as file
parent
c8a9c8c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
src/Main.java
src/Main.java
+6
-0
No files found.
src/Main.java
View file @
092fa884
...
@@ -15,6 +15,10 @@ public class Main {
...
@@ -15,6 +15,10 @@ public class Main {
System
.
out
.
println
(
"Provide input in this format:"
);
System
.
out
.
println
(
"Provide input in this format:"
);
System
.
out
.
println
(
"type,from,stock,qnt,price"
);
System
.
out
.
println
(
"type,from,stock,qnt,price"
);
String
line
=
br
.
readLine
();
String
line
=
br
.
readLine
();
// to check EOF
if
(
line
==
null
)
break
;
String
[]
inputs
=
line
.
split
(
","
);
String
[]
inputs
=
line
.
split
(
","
);
Customer
c
=
new
Customer
(
inputs
[
1
]);
Customer
c
=
new
Customer
(
inputs
[
1
]);
...
@@ -43,6 +47,8 @@ public class Main {
...
@@ -43,6 +47,8 @@ public class Main {
System
.
out
.
print
(
count
++
+
": "
);
System
.
out
.
print
(
count
++
+
": "
);
System
.
out
.
println
(
o
);
System
.
out
.
println
(
o
);
}
}
}
else
{
System
.
out
.
println
(
"No matching orders found."
);
}
}
System
.
out
.
println
();
System
.
out
.
println
();
...
...
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