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"?>
<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>
......
......@@ -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();
}
}
}}
......
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