Files
examnow/UML_classes.puml
2026-06-26 10:40:09 +03:00

79 lines
1.0 KiB
Plaintext

@startuml
skinparam classAttributeIconSize 0
class SpaceObject {
x
y
radius
color
mass
draw()
}
class Star {
name
planets
set_position()
add_planet()
update()
draw()
}
class Planet {
star
orbit_number
orbit_radius
angle
angular_speed
linear_speed
direction
calculate_position()
update()
shift_angle()
draw()
}
class SolarSystem {
width
height
stars
show_orbits
paused
create_system()
get_direction()
resize()
update()
prevent_planet_intersections()
draw()
toggle_pause()
toggle_orbits()
get_all_objects()
get_total_mass()
get_planet_count()
}
class SolarApp {
system
screen
clock
font
resize_window()
draw_text()
draw_info()
run()
}
class solar_input {
handle_events()
save_system_to_file()
}
SpaceObject <|-- Star
SpaceObject <|-- Planet
SolarSystem *-- Star
Star *-- Planet
SolarApp --> SolarSystem
SolarApp ..> solar_input
@enduml