Skip to content

Commit

Permalink
#4 Dodata klasa Process
Browse files Browse the repository at this point in the history
  • Loading branch information
Veliki5382 committed Mar 28, 2024
1 parent 90b904c commit 338e42e
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 18 deletions.
76 changes: 58 additions & 18 deletions class_diagram.mdj
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@
"top": 287,
"width": 135,
"height": 13,
"text": "+put_process()",
"text": "+put_process(proc)",
"horizontalAlignment": 0
}
],
Expand Down Expand Up @@ -959,7 +959,7 @@
"top": 487,
"width": 139.71533203125,
"height": 13,
"text": "+put_process()",
"text": "+put_process(proc)",
"horizontalAlignment": 0
}
],
Expand Down Expand Up @@ -1183,7 +1183,7 @@
"top": 487,
"width": 132.4853515625,
"height": 13,
"text": "+put_process()",
"text": "+put_process(proc)",
"horizontalAlignment": 0
}
],
Expand Down Expand Up @@ -1837,9 +1837,9 @@
"$ref": "AAAAAAGOgb1Jy8g2e1M="
},
"font": "Arial;13;0",
"left": 652,
"left": 651,
"top": 378,
"width": 5.05908203125,
"width": 6.5,
"height": 13,
"alpha": -0.5235987755982988,
"distance": 25,
Expand Down Expand Up @@ -3090,9 +3090,9 @@
"$ref": "AAAAAAGOhKS5iUscoco="
},
"font": "Arial;13;0",
"left": 671,
"left": 670,
"top": 346,
"width": 5.05908203125,
"width": 6.5,
"height": 13,
"alpha": -0.5235987755982988,
"distance": 25,
Expand Down Expand Up @@ -3362,9 +3362,9 @@
"$ref": "AAAAAAGOhKYiz1DW9NY="
},
"font": "Arial;13;0",
"left": 514,
"left": 513,
"top": 272,
"width": 5.05908203125,
"width": 6.5,
"height": 13,
"alpha": -0.5235987755982988,
"distance": 25,
Expand Down Expand Up @@ -3564,15 +3564,17 @@
"_parent": {
"$ref": "AAAAAAGOgabaA8VTCqA="
},
"name": "processes[]"
"name": "processes[]",
"type": ""
},
{
"_type": "UMLAttribute",
"_id": "AAAAAAGOggpFxvhghNc=",
"_parent": {
"$ref": "AAAAAAGOgabaA8VTCqA="
},
"name": "alg_planner"
"name": "alg_planner",
"type": ""
}
],
"operations": [
Expand Down Expand Up @@ -3738,31 +3740,35 @@
"_parent": {
"$ref": "AAAAAAGOgbiNxsXGidI="
},
"name": "num_of_iterations"
"name": "num_of_iterations",
"type": ""
},
{
"_type": "UMLAttribute",
"_id": "AAAAAAGOge75wu+3o2k=",
"_parent": {
"$ref": "AAAAAAGOgbiNxsXGidI="
},
"name": "sleep_interval"
"name": "sleep_interval",
"type": ""
},
{
"_type": "UMLAttribute",
"_id": "AAAAAAGOge9DlvDGo70=",
"_parent": {
"$ref": "AAAAAAGOgbiNxsXGidI="
},
"name": "wake_time"
"name": "wake_time",
"type": ""
},
{
"_type": "UMLAttribute",
"_id": "AAAAAAGOggDat/OSBtg=",
"_parent": {
"$ref": "AAAAAAGOgbiNxsXGidI="
},
"name": "process_size"
"name": "process_size",
"type": ""
}
]
},
Expand Down Expand Up @@ -3790,6 +3796,17 @@
"$ref": "AAAAAAGOgbjeYsX1ISw="
},
"name": "put_process",
"parameters": [
{
"_type": "UMLParameter",
"_id": "AAAAAAGOhPFE9i12oCk=",
"_parent": {
"$ref": "AAAAAAGOhKgV0VZH1tU="
},
"name": "proc",
"type": ""
}
],
"isAbstract": true
}
],
Expand Down Expand Up @@ -3832,7 +3849,18 @@
"_parent": {
"$ref": "AAAAAAGOgblaGMYi4nQ="
},
"name": "put_process"
"name": "put_process",
"parameters": [
{
"_type": "UMLParameter",
"_id": "AAAAAAGOhPFYeC511ts=",
"_parent": {
"$ref": "AAAAAAGOhKlWmFquEG8="
},
"name": "proc",
"type": ""
}
]
}
]
},
Expand Down Expand Up @@ -3873,7 +3901,18 @@
"_parent": {
"$ref": "AAAAAAGOgbrNncZQyeI="
},
"name": "put_process"
"name": "put_process",
"parameters": [
{
"_type": "UMLParameter",
"_id": "AAAAAAGOhPFr5C+Y4uc=",
"_parent": {
"$ref": "AAAAAAGOhKlz71xB+4s="
},
"name": "proc",
"type": ""
}
]
}
]
},
Expand Down Expand Up @@ -3967,7 +4006,8 @@
"_parent": {
"$ref": "AAAAAAGOhJ7crDhTnhI="
},
"name": "proc"
"name": "proc",
"type": ""
},
{
"_type": "UMLParameter",
Expand Down
11 changes: 11 additions & 0 deletions src/process.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class Process:
def __init__(self, num_of_iterations, sleep_interval, process_size):
self.num_of_iterations = num_of_iterations
self.sleep_interval = sleep_interval
self.process_size = process_size

class CPU:
def __init__(self):



0 comments on commit 338e42e

Please sign in to comment.