Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
HW-3
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
9731029
HW-3
Commits
a086d581
Commit
a086d581
authored
Apr 08, 2019
by
9731029
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the second edit
parent
c42eb2dc
Pipeline
#433
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
27 deletions
+53
-27
workspace.xml
.idea/workspace.xml
+11
-23
Shop.java
src/Shop.java
+42
-4
No files found.
.idea/workspace.xml
View file @
a086d581
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"67bfc981-7b10-4bf4-963c-b8f3544bb91a"
name=
"Default Changelist"
comment=
""
/>
<list
default=
"true"
id=
"67bfc981-7b10-4bf4-963c-b8f3544bb91a"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/src/Shop.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/src/Shop.java"
afterDir=
"false"
/>
</list>
<ignored
path=
"$PROJECT_DIR$/out/"
/>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -10,20 +12,17 @@
<option
name=
"LAST_RESOLUTION"
value=
"IGNORE"
/>
</component>
<component
name=
"DefaultGradleProjectSettings"
>
<option
name=
"testRunner"
value=
"GRADLE"
/>
<option
name=
"delegatedBuild"
value=
"true"
/>
<option
name=
"isMigrated"
value=
"true"
/>
</component>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/src/Shop.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
153
"
>
<caret
line=
"
76"
column=
"23"
lean-forward=
"true"
selection-start-line=
"76"
selection-start-column=
"23"
selection-end-line=
"76"
selection-end-column=
"23
"
/>
<state
relative-caret-position=
"
322
"
>
<caret
line=
"
337"
column=
"20"
selection-start-line=
"337"
selection-start-column=
"20"
selection-end-line=
"337"
selection-end-column=
"20
"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
<element
signature=
"e#3870#3871#0"
expanded=
"true"
/>
<element
signature=
"e#3906#3907#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
...
...
@@ -59,19 +58,9 @@
<foldersAlwaysOnTop
value=
"true"
/>
</navigator>
<panes>
<pane
id=
"PackagesPane"
/>
<pane
id=
"ProjectPane"
>
<subPane>
<expand>
<path>
<item
name=
"untitled"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"untitled"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</expand>
<select
/>
</subPane>
</pane>
<pane
id=
"Scope"
/>
<pane
id=
"PackagesPane"
/>
<pane
id=
"ProjectPane"
/>
</panes>
</component>
<component
name=
"PropertiesComponent"
>
...
...
@@ -121,6 +110,7 @@
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"-7"
y=
"-7"
width=
"1550"
height=
"838"
extended-state=
"6"
/>
<editor
active=
"true"
/>
<layout>
<window_info
id=
"Image Layers"
order=
"0"
/>
<window_info
id=
"Designer"
order=
"1"
/>
...
...
@@ -153,12 +143,10 @@
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/src/Shop.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
153
"
>
<caret
line=
"
76"
column=
"23"
lean-forward=
"true"
selection-start-line=
"76"
selection-start-column=
"23"
selection-end-line=
"76"
selection-end-column=
"23
"
/>
<state
relative-caret-position=
"
322
"
>
<caret
line=
"
337"
column=
"20"
selection-start-line=
"337"
selection-start-column=
"20"
selection-end-line=
"337"
selection-end-column=
"20
"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
<element
signature=
"e#3870#3871#0"
expanded=
"true"
/>
<element
signature=
"e#3906#3907#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
...
...
src/Shop.java
View file @
a086d581
...
...
@@ -134,10 +134,9 @@ static class Repository{
{
ID
=
id
;
this
.
c
=
c
;
this
.
status
=
"pending"
;
}
public
Order
(
int
id
){
this
.
ID
=
id
;
}
public
int
getID
()
{
return
ID
;
...
...
@@ -180,7 +179,25 @@ static class Repository{
}
public
class
Discount
{}
public
class
Discount
{
//todo to compelete Discount class;
private
int
id
;
private
int
percent
;
public
Discount
(
int
id
,
int
percent
)
{
this
.
id
=
id
;
this
.
percent
=
percent
;
}
public
void
setOrder
(
Order
order
)
{
}
}
public
static
void
main
(
String
[]
args
)
{
...
...
@@ -300,6 +317,27 @@ static class Repository{
}}*/
}
if
(
entering
.
equals
(
"submit"
))
{
String
submit
=
scan
.
nextLine
();
if
(
submit
.
equals
(
"order"
))
{
int
IdOfOrder
=
scan
.
nextInt
();
for
(
Order
order
:
MyShop
.
orders
)
{
if
(
order
.
getID
()
==
IdOfOrder
)
order
.
setStatus
(
"submitted"
);
}
//todo if we submit we must decrease the repositry
// which repositry to decrease >>??
}
if
(
submit
.
equals
(
"discount"
))
{
int
IdOfOrder
=
scan
.
nextInt
();
int
IdOfPercet
=
scan
.
nextInt
();
}
}
}}
...
...
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