esoe 2 years ago
parent
commit
acb6af7f9c
  1. 4
      book/pom.xml
  2. 5
      book/ru/molokoin/App.java
  3. BIN
      book/src/main/doc/j110-lab1.pdf
  4. 5
      book/src/main/java/ru/molokoin/App.java
  5. 68
      book/src/main/java/ru/molokoin/Book.java
  6. 32
      book/src/main/java/ru/molokoin/Publisher.java
  7. BIN
      book/target/classes/ru/molokoin/App.class
  8. BIN
      book/target/classes/ru/molokoin/Book.class
  9. BIN
      book/target/classes/ru/molokoin/Publisher.class
  10. 1
      country/src/main/java/ru/molokoin/Country.java
  11. BIN
      country/target/classes/ru/molokoin/Country.class

4
book/pom.xml

@ -12,8 +12,8 @@ @@ -12,8 +12,8 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<!-- country info -->
<groupId>ru.molokoin.education</groupId>
<!-- book info -->
<groupId>ru.molokoin</groupId>
<artifactId>book</artifactId>
<version>1.0</version>
<packaging>jar</packaging>

5
book/ru/molokoin/App.java

@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
package book.ru.molokoin;
public class App {
}

BIN
book/src/main/doc/j110-lab1.pdf

Binary file not shown.

5
book/src/main/java/ru/molokoin/App.java

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
package ru.molokoin;
public class App {
}

68
book/src/main/java/ru/molokoin/Book.java

@ -0,0 +1,68 @@ @@ -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;
}
}

32
book/src/main/java/ru/molokoin/Publisher.java

@ -0,0 +1,32 @@ @@ -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;
}
}

BIN
book/target/classes/ru/molokoin/App.class

Binary file not shown.

BIN
book/target/classes/ru/molokoin/Book.class

Binary file not shown.

BIN
book/target/classes/ru/molokoin/Publisher.class

Binary file not shown.

1
country/src/main/java/ru/molokoin/Country.java

@ -27,7 +27,6 @@ public class Country extends Area{ @@ -27,7 +27,6 @@ public class Country extends Area{
a.print();
country.getCapital().print();
System.out.println("-------------------------------------------");
}
public void getDanse(){
//плотность населения в стране

BIN
country/target/classes/ru/molokoin/Country.class

Binary file not shown.
Loading…
Cancel
Save