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
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SAURABH GUPTA
CS682-HW1-OrderMatching
Commits
ae9b2b8c
Commit
ae9b2b8c
authored
Jan 20, 2018
by
SAURABH GUPTA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show Orders fucntion added
parent
f8b3251f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
src/orders/Main.java
src/orders/Main.java
+20
-5
No files found.
src/orders/Main.java
View file @
ae9b2b8c
...
...
@@ -21,16 +21,27 @@ class Orders{
int
qty
;
String
cust_ID
;
public
void
read
(
Orders
O
)
public
void
read
()
{
Scanner
s
=
new
Scanner
(
System
.
in
);
this
.
ord_ID
=
s
.
next
();
this
.
type
=
s
.
next
();
this
.
product
=
s
.
next
Line
();
this
.
pro_ID
=
s
.
next
Line
();
this
.
product
=
s
.
next
();
this
.
pro_ID
=
s
.
next
();
this
.
price
=
s
.
nextInt
();
this
.
qty
=
s
.
nextInt
();
this
.
cust_ID
=
s
.
nextLine
();
this
.
cust_ID
=
s
.
next
();
}
public
void
show
()
{
System
.
out
.
println
(
"OrderID :"
+
this
.
ord_ID
+
"\n"
);
System
.
out
.
println
(
"Type :"
+
this
.
type
+
"\n"
);
System
.
out
.
println
(
"Product :"
+
this
.
product
+
"\n"
);
System
.
out
.
println
(
"ProductID :"
+
this
.
pro_ID
+
"\n"
);
System
.
out
.
println
(
"Price :"
+
this
.
price
+
"\n"
);
System
.
out
.
println
(
"Quantity :"
+
this
.
qty
+
"\n"
);
System
.
out
.
println
(
"CustomerID :"
+
this
.
cust_ID
+
"\n"
);
}
}
public
class
Main
{
...
...
@@ -40,7 +51,11 @@ public class Main {
*/
public
static
void
main
(
String
[]
args
)
{
// TODO Auto-generated method stub
Orders
O1
;
Orders
O1
=
new
Orders
();
System
.
out
.
println
(
"Provide Order Details : \n [orderID : Type : Product : ProductID : Price : Quantity : CustID]\n"
);
O1
.
read
();
System
.
out
.
println
(
"These are details of your order: \n"
);
O1
.
show
();
}
...
...
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