final
This commit is contained in:
30
ora9/proj1/untitled/.gitignore
vendored
Normal file
30
ora9/proj1/untitled/.gitignore
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
### IntelliJ IDEA ###
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
.kotlin
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
bin/
|
||||
!**/src/main/**/bin/
|
||||
!**/src/test/**/bin/
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
||||
3
ora9/proj1/untitled/.idea/.gitignore
generated
vendored
Normal file
3
ora9/proj1/untitled/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
6
ora9/proj1/untitled/.idea/misc.xml
generated
Normal file
6
ora9/proj1/untitled/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_25" default="true" project-jdk-name="25" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
ora9/proj1/untitled/.idea/modules.xml
generated
Normal file
8
ora9/proj1/untitled/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/untitled.iml" filepath="$PROJECT_DIR$/untitled.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
ora9/proj1/untitled/.idea/vcs.xml
generated
Normal file
6
ora9/proj1/untitled/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
51
ora9/proj1/untitled/konyv.txt
Normal file
51
ora9/proj1/untitled/konyv.txt
Normal file
@@ -0,0 +1,51 @@
|
||||
1116152201;Tíz kicsi néger;9789630788984;EURÓPA KÖNYVKIADÓ KFT.;2010.08.01;2090;krimi;266
|
||||
1116152202;A váratlan vendég;9789635490479;EURÓPA KÖNYVKIADÓ KFT.;2004.08.01;1406;krimi;200
|
||||
1116152203;És eljő a halál...;9789630786430;EURÓPA KÖNYVKIADÓ KFT.;2007.08.01;1900;krimi;292
|
||||
1116152204;Tűzvarázs;9789639300347;FABYEN KIADÓ;2010.08.01;1836;krimi;488
|
||||
1116152205;A bankár;9789632544137;ULPIUS-HÁZ KÖNYVKIADÓ KFT.;2011.09.22;2799;krimi;400
|
||||
1116152206;Vészbejárat;9789639300279;Fabyen Kiadó;2008.08.01;2095;krimi;472
|
||||
1116152207;Ébredj velem!;9639300200;Tóthágas Kiadó;2007.08.01;1668;krimi;490
|
||||
1116152208;Holtak könyvtára;9789639973114;GEOPEN KÖNYVKIADÓ KFT.;2010.08.01;3316;krimi;400
|
||||
1116152209;A vád tanúja;963841345X;Hunga-Print;1994.08.01;3000;krimi;254
|
||||
1116152210;A tűzgyújtó;9789630786836;EURÓPA KÖNYVKIADÓ KFT.;2010.08.01;3040;krimi;520
|
||||
1116152211;Álomcsapda;9630779501;EURÓPA KÖNYVKIADÓ KFT.;2006.08.01;1870;sci-fi;752
|
||||
1116152212;Hasznos holmik;9630778246;EURÓPA KÖNYVKIADÓ KFT.;2005.08.01;1683;horror;720
|
||||
1116152213;Dolores;9600781875;EURÓPA KÖNYVKIADÓ KFT.;2006.08.01;2125;thriller;264
|
||||
1116152214;Fagyos éden;9789639828605;METROPOLIS MEDIA GROUP;2010.08.01;3791;sci-fi;460
|
||||
1116152215;Fény a horizonton;9789639566873;CHERUBION KÖNYVKIADÓ ÉS SZOLG.;2010.08.01;1753;sci-fi;344
|
||||
1116152216;Fényözön;9639346888;Cherubion Könyvkiadó;2003.08.01;1444;sci-fi;392
|
||||
1116152217;A vénusz óceánjai;9637429174;Cédrus Kiadó;1992.08.01;1036;sci-fi;158
|
||||
1116152218;A biológia rövid története;11111111111;Gondolat Kiadó;1972.08.01;1200;természettudomány;278
|
||||
1116152219;A Hold tragédiája;22222222222;Kozmosz Könyvek;1979.08.01;1500;szépirodalom;310
|
||||
1116152220;Hazám, hazám, te mindenem;9789632511993;SZALAY-PANNON-LITERATÚRA KFT.;2010.08.01;2660;történelem;128
|
||||
1116152221;Az Osztrák-Magyar Monarchia tengerészeti repülői 1911-1918;9789633275092;ZRÍNYI KIADÓ;2010.08.01;4741;történelem;112
|
||||
1116152222;A magyar királyi honvédség légvédelme 1920-1945;9789633274989;EURÓPA KÖNYVKIADÓ KFT.;2010.08.01;4741;történelem;150
|
||||
1116152223;Napóleon;9500274612;EURÓPA KÖNYVKIADÓ KFT.;2004.04.01;2300;történelem;653
|
||||
1116152224;Napóleon;963280256X;Gondolat;1975.08.01;1500;történelem;783
|
||||
1116152225;A Föld enciklopédiája;9789630961615;KOSSUTH KIADÓ ZRT.;2010.08.01;9491;természettudomány;608
|
||||
1116152226;Éjféltájt;9789630786249;EURÓPA KÖNYVKIADÓ KFT.;2008.08.01;1900;krimi;272
|
||||
1116152227;Az élet erőpróbái;9638227117;PARK KÖNYVKIADÓ KFT.;1994.08.01;1701;természettudomány;326
|
||||
1116152228;Az élő bolygó - a föld mai arculata;9635300077;PARK KÖNYVKIADÓ KFT.;1994.08.01;2081;természettudomány;324
|
||||
1116152229;Az első édenkert;9630267217;PARK KÖNYVKIADÓ KFT.;1989.08.01;1200;természettudomány;238
|
||||
1116152230;Az óceán;9789639693456;Mérték Kiadó;2007.08.01;11042;természettudomány;512
|
||||
1116152231;Az univerzum;963-967-800-7;IKAR Kiadó;2007.08.01;11042;természettudomány;512
|
||||
1116152232;A gyevi törvény - Tanulságos mesék, mondák Mátyás királyról;9789639581197;NAGYKÖNYV KIADÓ;2010.08.01;1511;mesekönyv;48
|
||||
1116152233;A nagyhatalmú sündisznócska;9789633468814; HOLNAP KIADÓ KFT.;2010.08.01;1615;mesekönyv;14
|
||||
1116152234;Aranykoporsó;9789630779180;EURÓPA KÖNYVKIADÓ KFT.;2005.08.01;808;szépirodalom;472
|
||||
1116152235;1848 - a magyar szabadságharcz 1848-49-ben;9789630960519;KOSSUTH KIADÓ ZRT.;2009.08.01;6641;történelem;476
|
||||
1116152236;A kőszívű ember fiai;9789636451004;EURÓPA KÖNYVKIADÓ KFT.;2006.08.01;758;szépirodalom;442
|
||||
1116152237;A .NET 4.0 és a Visual Studio 2010;9789639863170;SZAK KIADÓ KFT.;2010.08.01;8550;informatika;572
|
||||
1116152238;Java-fejtörők - Csapdák, buktatók és szélsőséges esetek;9789639637702;KISKAPU KIADÓ;2010.08.01;5220;informatika;270
|
||||
1116152239;Az XML-kézikönyv;9789639131712;EURÓPA KÖNYVKIADÓ KFT.;2005.08.01;10260;informatika;758
|
||||
1116152240;Java alapú webszolgáltatások - XML, SOAP, WSDL, UDDI;9789639301047;KISKAPU KIADÓ;2002.08.01;4741;informatika;644
|
||||
1116152241;Refactoring - Kódjavítás újratervezéssel;9639637130;Kiskapu Kiadó;2006.08.01;5525;informatika;372
|
||||
1116152242;Domain-Specific Languages;9780321712943;Addison-Wesley Professional;2010.10.03;8735;informatika;640
|
||||
1116152243;Design Patterns: Elements of Reusable Object-Oriented Software;9780201633610;Addison-Wesley Professional;1994.11.10;5980;informatika;416
|
||||
1116152244;Programtervezési minták - Újrahasznosítható elemek objektumközpontú programokhoz;9639301779;Kiskapu - Addison-Wesley;2004.08.01;5980;informatika;421
|
||||
1116152245;Nostradamus;9637905146;Média Kiadó;1991.08.01;260;;362
|
||||
1116152246;A Biblia kódja;9639069817;Vince Kiadó Kft.;1999.08.01;1495;;239
|
||||
1116152247;A vaskirály;33333333333;;;;;
|
||||
1116152248;A megfojtott királyné;44444444444;;;;;
|
||||
1116152249;Az ősi törvény;55555555555;;;;;
|
||||
1116152250;Liliom és oroszlán;66666666666;;;;;
|
||||
1116152251;Az országvesztő;77777777777;;;;;
|
||||
71
ora9/proj1/untitled/src/hu/unideb/inf/pks/Konyv.java
Normal file
71
ora9/proj1/untitled/src/hu/unideb/inf/pks/Konyv.java
Normal file
@@ -0,0 +1,71 @@
|
||||
package hu.unideb.inf.pks;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class Konyv {
|
||||
private String konyvAzon;
|
||||
private String cim;
|
||||
private String isbn;
|
||||
private String kiado;
|
||||
private LocalDate kiadasDatuma;
|
||||
private int ar;
|
||||
private String tema;
|
||||
private int oldalszam;
|
||||
|
||||
public Konyv(String konyvAzon, String cim, String isbn, String kiado, LocalDate kiadasDatuma, int ar, String tema, int oldalszam) {
|
||||
this.konyvAzon = konyvAzon;
|
||||
this.cim = cim;
|
||||
this.isbn = isbn;
|
||||
this.kiado = kiado;
|
||||
this.kiadasDatuma = kiadasDatuma;
|
||||
this.ar = ar;
|
||||
this.tema = tema;
|
||||
this.oldalszam = oldalszam;
|
||||
}
|
||||
|
||||
public String getKonyvAzon() {
|
||||
return konyvAzon;
|
||||
}
|
||||
|
||||
public String getTema() {
|
||||
return tema;
|
||||
}
|
||||
|
||||
public int getOldalszam() {
|
||||
return oldalszam;
|
||||
}
|
||||
|
||||
public int getAr() {
|
||||
return ar;
|
||||
}
|
||||
|
||||
public LocalDate getKiadasDatuma() {
|
||||
return kiadasDatuma;
|
||||
}
|
||||
|
||||
public String getKiado() {
|
||||
return kiado;
|
||||
}
|
||||
|
||||
public String getIsbn() {
|
||||
return isbn;
|
||||
}
|
||||
|
||||
public String getCim() {
|
||||
return cim;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Konyv{" +
|
||||
"konyvAzon='" + konyvAzon + '\'' +
|
||||
", tema='" + tema + '\'' +
|
||||
", oldalszam=" + oldalszam +
|
||||
", ar=" + ar +
|
||||
", kiadasDatuma=" + kiadasDatuma +
|
||||
", kiado='" + kiado + '\'' +
|
||||
", isbn='" + isbn + '\'' +
|
||||
", cim='" + cim + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
50
ora9/proj1/untitled/src/hu/unideb/inf/pks/Runner.java
Normal file
50
ora9/proj1/untitled/src/hu/unideb/inf/pks/Runner.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package hu.unideb.inf.pks;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Runner {
|
||||
static void main() {
|
||||
ArrayList<Konyv> konyvek = new ArrayList<>();
|
||||
|
||||
try {
|
||||
Scanner sc = new Scanner(new File("konyv.txt"));
|
||||
|
||||
while(sc.hasNextLine()){
|
||||
String line = sc.nextLine();
|
||||
String[] sp = line.split(";");
|
||||
|
||||
for(String item : sp){
|
||||
System.out.println(item);
|
||||
}
|
||||
|
||||
if(sp.length < 8){
|
||||
continue;
|
||||
}
|
||||
konyvek.add(new Konyv(sp[0], sp[1], sp[2], sp[3], LocalDate.parse(sp[4], DateTimeFormatter.ofPattern("yyyy.MM.dd")), Integer.parseInt(sp[5]), sp[6], Integer.parseInt(sp[7])));
|
||||
}
|
||||
|
||||
}catch (FileNotFoundException e){
|
||||
System.out.println(e.getMessage());
|
||||
}
|
||||
|
||||
System.out.println("cucc\n\n");
|
||||
System.out.println(konyvek.stream().count());
|
||||
konyvek.stream().filter(k -> k.getTema().equals("krimi")).forEach(k -> System.out.println(k));
|
||||
|
||||
System.out.println("\n\n methond reference");
|
||||
konyvek.stream().forEach(System.out::println);
|
||||
|
||||
System.out.println(konyvek.stream().mapToInt(Konyv::getAr).sum());
|
||||
|
||||
System.out.println(konyvek.stream().mapToInt(Konyv::getAr).average().getAsDouble());
|
||||
|
||||
System.out.println("\ntema");
|
||||
konyvek.stream().map(Konyv::getTema).distinct().forEach(System.out::println);
|
||||
|
||||
}
|
||||
}
|
||||
11
ora9/proj1/untitled/untitled.iml
Normal file
11
ora9/proj1/untitled/untitled.iml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?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>
|
||||
Reference in New Issue
Block a user