Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
Lab 5
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9731087
Lab 5
Commits
7040c40a
Commit
7040c40a
authored
6 years ago
by
9731087
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Second commit
parent
00cc2050
master
No related merge requests found
Pipeline
#412
failed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
Order.java
src/com/restaurant/Order.java
+3
-1
No files found.
src/com/restaurant/Order.java
View file @
7040c40a
...
@@ -27,13 +27,15 @@ public class Order {
...
@@ -27,13 +27,15 @@ public class Order {
return
price
;
return
price
;
}
}
public
void
addFood
(
Food
food
,
int
amount
){
public
void
addFood
(
Food
food
,
int
amount
)
{
Food
[]
temp
=
new
Food
[
foods
.
length
+
amount
];
Food
[]
temp
=
new
Food
[
foods
.
length
+
amount
];
for
(
int
i
=
0
;
i
<
foods
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
foods
.
length
;
i
++)
{
temp
[
i
]
=
foods
[
i
];
temp
[
i
]
=
foods
[
i
];
}
}
for
(
int
i
=
0
;
i
<
amount
;
i
++)
{
for
(
int
i
=
0
;
i
<
amount
;
i
++)
{
temp
[
foods
.
length
+
i
]
=
food
;
temp
[
foods
.
length
+
i
]
=
food
;
this
.
price
+=
(
temp
[
foods
.
length
+
i
].
getPrice
())
*
1.4
;
}
}
foods
=
temp
;
foods
=
temp
;
temp
=
null
;
temp
=
null
;
...
...
This diff is collapsed.
Click to expand it.
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