Commit a086d581 authored by 9731029's avatar 9731029

the second edit

parent c42eb2dc
Pipeline #433 failed with stages
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <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/" /> <ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -10,20 +12,17 @@ ...@@ -10,20 +12,17 @@
<option name="LAST_RESOLUTION" value="IGNORE" /> <option name="LAST_RESOLUTION" value="IGNORE" />
</component> </component>
<component name="DefaultGradleProjectSettings"> <component name="DefaultGradleProjectSettings">
<option name="testRunner" value="GRADLE" /> <option name="isMigrated" value="true" />
<option name="delegatedBuild" value="true" />
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Shop.java"> <entry file="file://$PROJECT_DIR$/src/Shop.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153"> <state relative-caret-position="322">
<caret line="76" column="23" lean-forward="true" selection-start-line="76" selection-start-column="23" selection-end-line="76" selection-end-column="23" /> <caret line="337" column="20" selection-start-line="337" selection-start-column="20" selection-end-line="337" selection-end-column="20" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#3870#3871#0" expanded="true" />
<element signature="e#3906#3907#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
...@@ -59,19 +58,9 @@ ...@@ -59,19 +58,9 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <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="Scope" />
<pane id="PackagesPane" />
<pane id="ProjectPane" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
...@@ -121,6 +110,7 @@ ...@@ -121,6 +110,7 @@
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-7" y="-7" width="1550" height="838" extended-state="6" /> <frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
<editor active="true" />
<layout> <layout>
<window_info id="Image Layers" order="0" /> <window_info id="Image Layers" order="0" />
<window_info id="Designer" order="1" /> <window_info id="Designer" order="1" />
...@@ -153,12 +143,10 @@ ...@@ -153,12 +143,10 @@
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/Shop.java"> <entry file="file://$PROJECT_DIR$/src/Shop.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153"> <state relative-caret-position="322">
<caret line="76" column="23" lean-forward="true" selection-start-line="76" selection-start-column="23" selection-end-line="76" selection-end-column="23" /> <caret line="337" column="20" selection-start-line="337" selection-start-column="20" selection-end-line="337" selection-end-column="20" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#3870#3871#0" expanded="true" />
<element signature="e#3906#3907#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
......
...@@ -134,10 +134,9 @@ static class Repository{ ...@@ -134,10 +134,9 @@ static class Repository{
{ {
ID = id; ID = id;
this.c = c; this.c = c;
this.status = "pending";
} }
public Order (int id){
this.ID = id;
}
public int getID() public int getID()
{ {
return ID; return ID;
...@@ -180,7 +179,25 @@ static class Repository{ ...@@ -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) public static void main(String[] args)
{ {
...@@ -300,6 +317,27 @@ static class Repository{ ...@@ -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();
}
}
}} }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment