Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lesson7 #11

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
53d4903
Сделал
sozidatel319 Jul 26, 2019
32af0d4
Merge pull request #2 from sozidatel319/master
sozidatel319 Jul 26, 2019
0617961
Все переделал
sozidatel319 Jul 26, 2019
618ee52
Закончил задания!
sozidatel319 Jul 26, 2019
da4e17e
Сделал многое!
sozidatel319 Jul 27, 2019
88295dc
Финальная версия. Все готово.
sozidatel319 Jul 27, 2019
c85a12d
Улучшил интерфейс и вывод. Убрал IntanceOf.
sozidatel319 Jul 28, 2019
07cc097
Заменил for на foreach в классе Team
sozidatel319 Jul 28, 2019
fbb0ff1
Переделал задание с enum!
sozidatel319 Jul 29, 2019
46b6be1
Начинаю работу над уроком 2
sozidatel319 Jul 30, 2019
6116c23
Решил задачу!
sozidatel319 Jul 30, 2019
5c429c7
Внёс корректировку в выдачу ошибкой MyArraySize сообщения.
sozidatel319 Jul 31, 2019
e403fdb
Немного переделал
sozidatel319 Aug 1, 2019
0e3a54c
Приступил к работе над заданием к 3 уроку
sozidatel319 Aug 3, 2019
d475f3e
Решил задачу №1
sozidatel319 Aug 3, 2019
a36ba75
Закончил вторую задачу
sozidatel319 Aug 3, 2019
4b72d78
небольшие правки
sozidatel319 Aug 4, 2019
5d4d03e
последние правки
sozidatel319 Aug 4, 2019
4312796
Сделал графическое оформление и меню с выходом.
sozidatel319 Aug 6, 2019
0d135e9
Создал новый проект.
sozidatel319 Aug 10, 2019
90f8245
Задание выполнено.
sozidatel319 Aug 10, 2019
42a8a38
изменил формулу во втором методе
sozidatel319 Aug 11, 2019
4f432b1
окончательный вариант
sozidatel319 Aug 11, 2019
1616f1a
Сетевой чат
sozidatel319 Aug 14, 2019
bb062ba
Сделал всё через потоки.
sozidatel319 Aug 14, 2019
7816b05
Правки по завершению работы клиента и сервера
sozidatel319 Aug 14, 2019
f07d87c
Урок 7 импорт проекта для работы.
sozidatel319 Aug 16, 2019
c974902
Исправил авторизацию, добавил функцию высвечивающую при входе кто в с…
sozidatel319 Aug 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Lesson2/.idea/description.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Lesson2/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Lesson2/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Lesson2/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Lesson2/.idea/project-template.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Lesson2/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

233 changes: 233 additions & 0 deletions Lesson2/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Lesson2/Lesson2.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

Binary file not shown.
Binary file not shown.
Binary file not shown.
48 changes: 48 additions & 0 deletions Lesson2/src/com/company/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.company;

public class Main {

public static void main(String[] args) {
// write your code here
String[][] arr = {{"5", "2", "3", "4"},
{"1", "2", "4", "5"},
{"1", "2", "4", "4"},
{"1", "2", "3", "4"}};
try {
method(arr);
} catch (MyArraySizeException a) {
a.printStackTrace();
} catch (MyArrayDataExeption e) {
e.printStackTrace();
}
}

public static void method(String[][] arr) throws MyArrayDataExeption, MyArraySizeException {

int sum = 0;
int count;

for (int i = 0; i < arr.length; i++) {
for (int j = 0; j < arr[i].length; j++) {
System.out.print(arr[i][j]);
}
System.out.println("");
}


for (int i = 0; i < arr.length; i++) {
for (int j = 0; j < arr[i].length; j++) {
if (arr[i].length != 4 || arr.length != 4) throw new MyArraySizeException("Поймал MyArraySize");
try {
count = Integer.parseInt(arr[i][j]);
} catch (NumberFormatException e) {
throw new MyArrayDataExeption(i,j);
}
sum += count;
}
}
System.out.println("Сумма: " + sum);
}
}


8 changes: 8 additions & 0 deletions Lesson2/src/com/company/MyArrayDataExeption.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.company;

public class MyArrayDataExeption extends IllegalArgumentException {

public MyArrayDataExeption(int i, int j){
super("Ячейка ошибки " + i + " " + j);
}
}
11 changes: 11 additions & 0 deletions Lesson2/src/com/company/MyArraySizeException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.company;

import java.io.FileNotFoundException;

public class MyArraySizeException extends RuntimeException {

public MyArraySizeException(String s){
super(s);
}

}
1 change: 1 addition & 0 deletions Lesson3/.idea/description.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Lesson3/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Lesson3/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Lesson3/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Lesson3/.idea/project-template.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading