Skip to content

Commit 63a19a8

Browse files
committed
changes in programming/lab3
1 parent 8f8a3f6 commit 63a19a8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+631
-68
lines changed
16.1 KB
Binary file not shown.
11.7 MB
Binary file not shown.
525 KB
Loading
Lines changed: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,291 @@
1+
@startuml
2+
class BasicCharacter {
3+
+ BasicCharacter(String):
4+
+ enjoyGrass(): void
5+
+ toString(): String
6+
+ goFurther(): void
7+
+ makeStep(): StepStatus
8+
+ reclaimPotatoes(FieldLenght): void
9+
+ makeStepAfterReclaim(): StepStatus
10+
+ equals(Object): boolean
11+
+ tellBadWords(): void
12+
+ saveUnusefulPotatoes(GroundType, int): void
13+
+ getTiredOfWalk(GroundType): void
14+
+ savePotatoesFastly(): void
15+
+ claimPotatoes(int, GroundType): void
16+
+ hashCode(): int
17+
+ leaveField(): void
18+
+ throwPotatoes(): void
19+
+ checkIfClothBroken(): void
20+
+ sleepOnGround(): void
21+
+ bite(): boolean
22+
+ smellFood(): void
23+
+ saveUsefulPotatoes(GroundType, int): void
24+
+ becomeTired(): void
25+
name: String
26+
id: int
27+
}
28+
class BecomeTired {
29+
+ BecomeTired():
30+
+ becomeTired(): void
31+
}
32+
class BitePotato {
33+
+ BitePotato(RandomWrapper):
34+
+ bite(): boolean
35+
}
36+
class CharacterCloth {
37+
+ CharacterCloth():
38+
cloth: Cloth
39+
}
40+
class CharacterEnergy {
41+
+ CharacterEnergy():
42+
+ energyStepIncriment(): void
43+
energy: int
44+
}
45+
class CharacterLocation {
46+
+ CharacterLocation():
47+
location: Location
48+
}
49+
class CharacterName {
50+
+ CharacterName():
51+
name: String
52+
}
53+
class CheckIfClothBroken {
54+
+ CheckIfClothBroken(CharacterCloth):
55+
+ checkIfClothBroken(): void
56+
}
57+
class ClaimPotatoes {
58+
+ ClaimPotatoes(CharacterCloth, CharacterName):
59+
+ claimPotatoes(int, GroundType): void
60+
}
61+
class Cloth {
62+
+ Cloth(String, int):
63+
+ equals(Object): boolean
64+
+ makeStep(): void
65+
+ toString(): String
66+
+ hashCode(): int
67+
potatoes: ArrayList<Potato>
68+
name: String
69+
potatoesCount: int
70+
id: int
71+
stepIncrement: int
72+
}
73+
enum ClothesEnum << enumeration >> {
74+
+ ClothesEnum():
75+
+ values(): ClothesEnum[]
76+
+ valueOf(String): ClothesEnum
77+
+ toCloth(int): Cloth
78+
}
79+
class EnjoyGrass {
80+
+ EnjoyGrass():
81+
+ enjoyGrass(): void
82+
}
83+
class FieldEnd {
84+
+ FieldEnd(BasicCharacter, int):
85+
+ execute(): Location
86+
}
87+
class FieldLenght {
88+
+ FieldLenght():
89+
+ incrementFieldLenght(): void
90+
fieldLenght: int
91+
}
92+
class FieldMiddle {
93+
+ FieldMiddle(BasicCharacter, GroundType):
94+
+ execute(): Location
95+
}
96+
class FieldStart {
97+
+ FieldStart(BasicCharacter):
98+
+ execute(): Location
99+
}
100+
class GetTiredOfWalk {
101+
+ GetTiredOfWalk():
102+
+ getTiredOfWalk(GroundType): void
103+
}
104+
class GoFurther {
105+
+ GoFurther():
106+
+ goFurther(): void
107+
}
108+
enum GroundType << enumeration >> {
109+
+ GroundType():
110+
+ values(): GroundType[]
111+
+ valueOf(String): GroundType
112+
+ toString(): String
113+
}
114+
interface IBasicObj << interface >> {
115+
+ equals(Object): boolean
116+
+ hashCode(): int
117+
+ toString(): String
118+
name: String
119+
id: int
120+
}
121+
class LeaveField {
122+
+ LeaveField(CharacterName):
123+
+ leaveField(): void
124+
}
125+
class Location {
126+
+ Location(String, BasicCharacter):
127+
+ equals(Object): boolean
128+
+ toString(): String
129+
+ hashCode(): int
130+
+ execute(): Location
131+
character: BasicCharacter
132+
name: String
133+
id: int
134+
}
135+
class Main {
136+
+ Main():
137+
+ main(String[]): void
138+
}
139+
class MakeSteps {
140+
+ MakeSteps(CharacterEnergy, CharacterName):
141+
- makeEnergyStep(): StepStatus
142+
+ makeStepAfterReclaim(): StepStatus
143+
+ makeStep(Cloth): StepStatus
144+
- makePotatoStep(Cloth): StepStatus
145+
}
146+
class NegativeEnergyException {
147+
+ NegativeEnergyException():
148+
}
149+
class NegativePotatoesException {
150+
+ NegativePotatoesException():
151+
}
152+
entity Potato << record >> {
153+
+ Potato(boolean):
154+
isDelicious: boolean
155+
}
156+
class RandomWrapper {
157+
+ RandomWrapper():
158+
+ randomizePotato(): Potato
159+
+ randomizeSmell(): SmellType
160+
+ randomizeGroundType(): GroundType
161+
+ randomizeCloth(): Cloth
162+
+ randomizeFieldLenght(): int
163+
+ ramdomizePotatoesReclamation(int, int): int
164+
+ randomizeEnergy(int, int): int
165+
+ randomizeCanSmell(): boolean
166+
+ randomizePotatoes(): int
167+
}
168+
class ReclaimPotatoes {
169+
+ ReclaimPotatoes(RandomWrapper, CharacterEnergy, CharacterCloth, GoFurther):
170+
+ reclaimPotatoes(FieldLenght): void
171+
}
172+
class SavePotatoes {
173+
+ SavePotatoes(CharacterCloth, CharacterName):
174+
+ saveUsefulPotatoes(GroundType, int): void
175+
+ savePotatoesFastly(): void
176+
+ saveUnusefulPotatoes(GroundType, int): void
177+
}
178+
class SleepOnGround {
179+
+ SleepOnGround():
180+
+ sleepOnGround(): void
181+
}
182+
class SmellFood {
183+
+ SmellFood(RandomWrapper):
184+
+ smellFood(): void
185+
}
186+
enum SmellType << enumeration >> {
187+
+ SmellType():
188+
+ values(): SmellType[]
189+
+ toString(): String
190+
+ valueOf(String): SmellType
191+
}
192+
enum StepStatus << enumeration >> {
193+
+ StepStatus():
194+
+ values(): StepStatus[]
195+
+ valueOf(String): StepStatus
196+
}
197+
class TellBadWords {
198+
+ TellBadWords(CharacterName):
199+
+ tellBadWords(): void
200+
}
201+
class ThrowPotatoes {
202+
+ ThrowPotatoes(CharacterCloth, CharacterName):
203+
+ throwPotatoes(): void
204+
}
205+
206+
BasicCharacter "1" *-[#595959,plain]-> "becomeTired\n1" BecomeTired
207+
BasicCharacter -[#595959,dashed]-> BecomeTired : "«create»"
208+
BasicCharacter "1" *-[#595959,plain]-> "bitePotato\n1" BitePotato
209+
BasicCharacter -[#595959,dashed]-> BitePotato : "«create»"
210+
BasicCharacter "1" *-[#595959,plain]-> "characterCloth\n1" CharacterCloth
211+
BasicCharacter -[#595959,dashed]-> CharacterCloth : "«create»"
212+
BasicCharacter -[#595959,dashed]-> CharacterEnergy : "«create»"
213+
BasicCharacter "1" *-[#595959,plain]-> "characterEnergy\n1" CharacterEnergy
214+
BasicCharacter -[#595959,dashed]-> CharacterLocation : "«create»"
215+
BasicCharacter "1" *-[#595959,plain]-> "characterLocation\n1" CharacterLocation
216+
BasicCharacter "1" *-[#595959,plain]-> "characterName\n1" CharacterName
217+
BasicCharacter -[#595959,dashed]-> CharacterName : "«create»"
218+
BasicCharacter -[#595959,dashed]-> CheckIfClothBroken : "«create»"
219+
BasicCharacter "1" *-[#595959,plain]-> "checkIfClothBroken\n1" CheckIfClothBroken
220+
BasicCharacter -[#595959,dashed]-> ClaimPotatoes : "«create»"
221+
BasicCharacter "1" *-[#595959,plain]-> "claimPotatoes\n1" ClaimPotatoes
222+
BasicCharacter "1" *-[#595959,plain]-> "enjoyGrass\n1" EnjoyGrass
223+
BasicCharacter -[#595959,dashed]-> EnjoyGrass : "«create»"
224+
BasicCharacter "1" *-[#595959,plain]-> "getTiredOfWalk\n1" GetTiredOfWalk
225+
BasicCharacter -[#595959,dashed]-> GetTiredOfWalk : "«create»"
226+
BasicCharacter -[#595959,dashed]-> GoFurther : "«create»"
227+
BasicCharacter "1" *-[#595959,plain]-> "goFurther\n1" GoFurther
228+
BasicCharacter -[#008200,dashed]-^ IBasicObj
229+
BasicCharacter -[#595959,dashed]-> LeaveField : "«create»"
230+
BasicCharacter "1" *-[#595959,plain]-> "leaveField\n1" LeaveField
231+
BasicCharacter "1" *-[#595959,plain]-> "makeSteps\n1" MakeSteps
232+
BasicCharacter -[#595959,dashed]-> MakeSteps : "«create»"
233+
BasicCharacter "1" *-[#595959,plain]-> "rnd\n1" RandomWrapper
234+
BasicCharacter -[#595959,dashed]-> RandomWrapper : "«create»"
235+
BasicCharacter -[#595959,dashed]-> ReclaimPotatoes : "«create»"
236+
BasicCharacter "1" *-[#595959,plain]-> "reclaimPotatoes\n1" ReclaimPotatoes
237+
BasicCharacter "1" *-[#595959,plain]-> "savePotatoes\n1" SavePotatoes
238+
BasicCharacter -[#595959,dashed]-> SavePotatoes : "«create»"
239+
BasicCharacter -[#595959,dashed]-> SleepOnGround : "«create»"
240+
BasicCharacter "1" *-[#595959,plain]-> "sleepOnGround\n1" SleepOnGround
241+
BasicCharacter "1" *-[#595959,plain]-> "smellFood\n1" SmellFood
242+
BasicCharacter -[#595959,dashed]-> SmellFood : "«create»"
243+
BasicCharacter -[#595959,dashed]-> TellBadWords : "«create»"
244+
BasicCharacter "1" *-[#595959,plain]-> "tellBadWords\n1" TellBadWords
245+
BasicCharacter -[#595959,dashed]-> ThrowPotatoes : "«create»"
246+
BasicCharacter "1" *-[#595959,plain]-> "throwPotatoes\n1" ThrowPotatoes
247+
BitePotato "1" *-[#595959,plain]-> "rnd\n1" RandomWrapper
248+
CharacterCloth "1" *-[#595959,plain]-> "cloth\n1" Cloth
249+
CharacterEnergy -[#595959,dashed]-> NegativeEnergyException : "«create»"
250+
CharacterLocation "1" *-[#595959,plain]-> "location\n1" Location
251+
CheckIfClothBroken "1" *-[#595959,plain]-> "cloth\n1" CharacterCloth
252+
ClaimPotatoes "1" *-[#595959,plain]-> "cloth\n1" CharacterCloth
253+
ClaimPotatoes "1" *-[#595959,plain]-> "name\n1" CharacterName
254+
Cloth -[#008200,dashed]-^ IBasicObj
255+
Cloth -[#595959,dashed]-> NegativePotatoesException : "«create»"
256+
Cloth "1" *-[#595959,plain]-> "potatoes\n*" Potato
257+
Cloth -[#595959,dashed]-> RandomWrapper : "«create»"
258+
Cloth "1" *-[#595959,plain]-> "rnd\n1" RandomWrapper
259+
ClothesEnum -[#595959,dashed]-> Cloth : "«create»"
260+
FieldEnd -[#595959,dashed]-> FieldLenght : "«create»"
261+
FieldEnd "1" *-[#595959,plain]-> "fieldLenght\n1" FieldLenght
262+
FieldEnd -[#000082,plain]-^ Location
263+
FieldMiddle -[#595959,dashed]-> FieldEnd : "«create»"
264+
FieldMiddle -[#595959,dashed]-> FieldLenght : "«create»"
265+
FieldMiddle "1" *-[#595959,plain]-> "fieldLenght\n1" FieldLenght
266+
FieldMiddle "1" *-[#595959,plain]-> "groundType\n1" GroundType
267+
FieldMiddle -[#000082,plain]-^ Location
268+
FieldStart -[#595959,dashed]-> FieldMiddle : "«create»"
269+
FieldStart -[#000082,plain]-^ Location
270+
LeaveField "1" *-[#595959,plain]-> "characterName\n1" CharacterName
271+
Location "1" *-[#595959,plain]-> "character\n1" BasicCharacter
272+
Location -[#008200,dashed]-^ IBasicObj
273+
Location -[#595959,dashed]-> RandomWrapper : "«create»"
274+
Location "1" *-[#595959,plain]-> "rnd\n1" RandomWrapper
275+
Main -[#595959,dashed]-> BasicCharacter : "«create»"
276+
Main -[#595959,dashed]-> FieldStart : "«create»"
277+
Main -[#595959,dashed]-> RandomWrapper : "«create»"
278+
MakeSteps "1" *-[#595959,plain]-> "energy\n1" CharacterEnergy
279+
MakeSteps "1" *-[#595959,plain]-> "name\n1" CharacterName
280+
RandomWrapper -[#595959,dashed]-> Potato : "«create»"
281+
ReclaimPotatoes "1" *-[#595959,plain]-> "characterCloth\n1" CharacterCloth
282+
ReclaimPotatoes "1" *-[#595959,plain]-> "characterEnergy\n1" CharacterEnergy
283+
ReclaimPotatoes "1" *-[#595959,plain]-> "goFurther\n1" GoFurther
284+
ReclaimPotatoes "1" *-[#595959,plain]-> "rnd\n1" RandomWrapper
285+
SavePotatoes "1" *-[#595959,plain]-> "cloth\n1" CharacterCloth
286+
SavePotatoes "1" *-[#595959,plain]-> "name\n1" CharacterName
287+
SmellFood "1" *-[#595959,plain]-> "rnd\n1" RandomWrapper
288+
TellBadWords "1" *-[#595959,plain]-> "name\n1" CharacterName
289+
ThrowPotatoes "1" *-[#595959,plain]-> "cloth\n1" CharacterCloth
290+
ThrowPotatoes "1" *-[#595959,plain]-> "name\n1" CharacterName
291+
@enduml
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

programming/sem1/lab3/out/production/lab3/src/Character/Exceptons/NegativeEnergyException.class renamed to programming/sem1/lab3/out/production/lab3/src/Character/Actions/Exceptons/NegativeEnergyException.class

488 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)