From 6a4b179c496512debb11e676a111af48907b7ce2 Mon Sep 17 00:00:00 2001 From: esoe Date: Wed, 11 Jan 2023 15:23:25 +0300 Subject: [PATCH] qq --- README.md | 2 +- docs/diagrams/src/{ => egspt}/anyreport.puml | 0 docs/diagrams/src/{ => egspt}/package.puml | 0 docs/diagrams/src/{ => egspt}/use-case.puml | 0 docs/diagrams/src/molokoin/class.puml | 8 ++++++++ docs/diagrams/src/molokoin/sequence.puml | 6 ++++++ docs/diagrams/src/molokoin/sql.puml | 20 ++++++++++++++++++++ docs/diagrams/src/molokoin/usecase.puml | 13 +++++++++++++ src/main/java/ru/egspt/Base.java | 2 +- 9 files changed, 49 insertions(+), 2 deletions(-) rename docs/diagrams/src/{ => egspt}/anyreport.puml (100%) rename docs/diagrams/src/{ => egspt}/package.puml (100%) rename docs/diagrams/src/{ => egspt}/use-case.puml (100%) create mode 100644 docs/diagrams/src/molokoin/class.puml create mode 100644 docs/diagrams/src/molokoin/sequence.puml create mode 100644 docs/diagrams/src/molokoin/sql.puml create mode 100644 docs/diagrams/src/molokoin/usecase.puml diff --git a/README.md b/README.md index ca4f1b8..79e4194 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -#muudle-anyreport +# muudle-anyreport скачать можно тут: http://molokoin.ru:3000/esoe/moodle-anyreport/src/branch/master/target/moodle-anyreport-0.1-jar-with-dependencies.jar diff --git a/docs/diagrams/src/anyreport.puml b/docs/diagrams/src/egspt/anyreport.puml similarity index 100% rename from docs/diagrams/src/anyreport.puml rename to docs/diagrams/src/egspt/anyreport.puml diff --git a/docs/diagrams/src/package.puml b/docs/diagrams/src/egspt/package.puml similarity index 100% rename from docs/diagrams/src/package.puml rename to docs/diagrams/src/egspt/package.puml diff --git a/docs/diagrams/src/use-case.puml b/docs/diagrams/src/egspt/use-case.puml similarity index 100% rename from docs/diagrams/src/use-case.puml rename to docs/diagrams/src/egspt/use-case.puml diff --git a/docs/diagrams/src/molokoin/class.puml b/docs/diagrams/src/molokoin/class.puml new file mode 100644 index 0000000..fd4114e --- /dev/null +++ b/docs/diagrams/src/molokoin/class.puml @@ -0,0 +1,8 @@ +@startuml class +title "moodle-anyreport: classes" +/'Программа реализует основной функционал обычного калькулятора'/ +class Runner /'Запускает программу на выполнение'/ +class SwingFace /'Реализация графического интерфейса'/ +class ConsoleFace /'Реализация консольного интерфейса'/ +class Calculator /'Хранит данные о запросах пользователя'/ +@enduml diff --git a/docs/diagrams/src/molokoin/sequence.puml b/docs/diagrams/src/molokoin/sequence.puml new file mode 100644 index 0000000..a71ac35 --- /dev/null +++ b/docs/diagrams/src/molokoin/sequence.puml @@ -0,0 +1,6 @@ +@startuml sequence +title "moodle-anyreport: sequence (logic)" +participant "Пользователь" as user +participant "Программа" as app +participant "Хранилище" as storage +@enduml diff --git a/docs/diagrams/src/molokoin/sql.puml b/docs/diagrams/src/molokoin/sql.puml new file mode 100644 index 0000000..8d3ee26 --- /dev/null +++ b/docs/diagrams/src/molokoin/sql.puml @@ -0,0 +1,20 @@ +@startuml sql +title "moodle-anyreport: database structure" +/' структура необходимых таблиц базы данных moodle '/ +!define primary_key(x) <&key> x +!define foreign_key(x) <&key> x +!define column(x) <&media-record> x +!define table(x) entity x << (T, white) >> +table( user ) { + primary_key( id ): UUID + column( isActive ): BOOLEAN + foreign_key( cityId ): INTEGER <> +} +table( city ) { + primary_key( id ): UUID + column( name ): CHARACTER VARYING + column( country ): CHARACTER VARYING + column( postCode ): INTEGER +} +user }|--|| city +@enduml diff --git a/docs/diagrams/src/molokoin/usecase.puml b/docs/diagrams/src/molokoin/usecase.puml new file mode 100644 index 0000000..03163fa --- /dev/null +++ b/docs/diagrams/src/molokoin/usecase.puml @@ -0,0 +1,13 @@ +@startuml usecase +title "moodle-anyreport: usecases" +left to right direction +actor "Пользователь" as user +usecase "Калькулятор" as program +user -> program : "Целые числа" +user -> program : "Дробные числа" /'.'/ +user -> program : "Сбрасывать значения" /'С'/ +user -> program : "Указывать математические операции" /'+-*'/ +user -> program : "Запрашивать расчет переданного выражения" /'='/ +user <-down- program : "Показывать текущее поле" /''/ +user <-down- program : "Показывать результат вычислений" /''/ +@enduml diff --git a/src/main/java/ru/egspt/Base.java b/src/main/java/ru/egspt/Base.java index cca7108..62d73cc 100644 --- a/src/main/java/ru/egspt/Base.java +++ b/src/main/java/ru/egspt/Base.java @@ -43,7 +43,7 @@ public class Base { public Connection getConnection() { return connection; } - + //подключение к базе public void connect(){ System.out.println("Подключение к серверу баз данных ...");