diff --git a/book/pom.xml b/book/pom.xml index 3a3f50f..1ea63f9 100644 --- a/book/pom.xml +++ b/book/pom.xml @@ -12,8 +12,8 @@ 4.0.0 - - ru.molokoin.education + + ru.molokoin book 1.0 jar diff --git a/book/ru/molokoin/App.java b/book/ru/molokoin/App.java deleted file mode 100644 index 3a3d130..0000000 --- a/book/ru/molokoin/App.java +++ /dev/null @@ -1,5 +0,0 @@ -package book.ru.molokoin; - -public class App { - -} diff --git a/book/src/main/doc/j110-lab1.pdf b/book/src/main/doc/j110-lab1.pdf new file mode 100644 index 0000000..9d2d108 Binary files /dev/null and b/book/src/main/doc/j110-lab1.pdf differ diff --git a/book/src/main/java/ru/molokoin/App.java b/book/src/main/java/ru/molokoin/App.java new file mode 100644 index 0000000..909dec3 --- /dev/null +++ b/book/src/main/java/ru/molokoin/App.java @@ -0,0 +1,5 @@ +package ru.molokoin; + +public class App { + +} diff --git a/book/src/main/java/ru/molokoin/Book.java b/book/src/main/java/ru/molokoin/Book.java new file mode 100644 index 0000000..edcd534 --- /dev/null +++ b/book/src/main/java/ru/molokoin/Book.java @@ -0,0 +1,68 @@ +package ru.molokoin; + +public class Book { + private String name; + private Publisher publisher; + private int year; + private String[] authors; + + public String getAuthorByIndex(int index){ + String author = getAuthors()[index]; + return author; + } + //количество авторов книги + public int getAuthorsCount(){ + //TODO проверить наличие массива - null + //предусмотреть, чтобы массив не содержал пустых полей + return getAuthors().length; + } + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + /** + * @param publisher the publisher to set + */ + public void setPublisher(Publisher publisher) { + this.publisher = publisher; + } + /** + * @param year the year to set + */ + public void setYear(int year) { + this.year = year; + } + /** + * @param author the author to set + */ + public void setAuthors(String[] authors) { + this.authors = authors; + } + /** + * @return the name + */ + public String getName() { + return name; + } + /** + * @return the publisher + */ + public Publisher getPublisher() { + return publisher; + } + /** + * @return the year + */ + public int getYear() { + return year; + } + /** + * @return the author + */ + public String[] getAuthors() { + return authors; + } + +} diff --git a/book/src/main/java/ru/molokoin/Publisher.java b/book/src/main/java/ru/molokoin/Publisher.java new file mode 100644 index 0000000..833b7fd --- /dev/null +++ b/book/src/main/java/ru/molokoin/Publisher.java @@ -0,0 +1,32 @@ +package ru.molokoin; + +public class Publisher { + private String name; + private String sity; + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + /** + * @param sity the sity to set + */ + public void setSity(String sity) { + this.sity = sity; + } + /** + * @return the name + */ + public String getName() { + return name; + } + /** + * @return the sity + */ + public String getSity() { + return sity; + } + +} diff --git a/book/target/classes/ru/molokoin/App.class b/book/target/classes/ru/molokoin/App.class new file mode 100644 index 0000000..68c31f5 Binary files /dev/null and b/book/target/classes/ru/molokoin/App.class differ diff --git a/book/target/classes/ru/molokoin/Book.class b/book/target/classes/ru/molokoin/Book.class new file mode 100644 index 0000000..9324267 Binary files /dev/null and b/book/target/classes/ru/molokoin/Book.class differ diff --git a/book/target/classes/ru/molokoin/Publisher.class b/book/target/classes/ru/molokoin/Publisher.class new file mode 100644 index 0000000..10b6bdb Binary files /dev/null and b/book/target/classes/ru/molokoin/Publisher.class differ diff --git a/country/src/main/java/ru/molokoin/Country.java b/country/src/main/java/ru/molokoin/Country.java index b870f28..2f4be8a 100644 --- a/country/src/main/java/ru/molokoin/Country.java +++ b/country/src/main/java/ru/molokoin/Country.java @@ -27,7 +27,6 @@ public class Country extends Area{ a.print(); country.getCapital().print(); System.out.println("-------------------------------------------"); - } public void getDanse(){ //плотность населения в стране diff --git a/country/target/classes/ru/molokoin/Country.class b/country/target/classes/ru/molokoin/Country.class index ab6412a..b360f98 100644 Binary files a/country/target/classes/ru/molokoin/Country.class and b/country/target/classes/ru/molokoin/Country.class differ