From a315ad5a4443e5d835865fe07822b7b592a6b6e8 Mon Sep 17 00:00:00 2001 From: avkov Date: Tue, 16 Dec 2014 22:33:36 +0200 Subject: [PATCH] Added Coursework -ADDED: Atanas Avkov Coursework files --- .../Coursework/ZAD2 V/zad2v/build.xml | 73 + .../build/classes/.netbeans_automatic_build | 0 .../build/classes/.netbeans_update_resources | 0 .../build/classes/zad2v/RandomGenerator.class | Bin 0 -> 415 bytes .../zad2v/build/classes/zad2v/Zad2v.class | Bin 0 -> 1416 bytes .../Coursework/ZAD2 V/zad2v/manifest.mf | 3 + .../ZAD2 V/zad2v/nbproject/build-impl.xml | 1413 +++++++++++++++++ .../zad2v/nbproject/genfiles.properties | 8 + .../nbproject/private/private.properties | 2 + .../zad2v/nbproject/private/private.xml | 9 + .../ZAD2 V/zad2v/nbproject/project.properties | 73 + .../ZAD2 V/zad2v/nbproject/project.xml | 15 + .../ZAD2 V/zad2v/src/zad2v/Zad2v.java | 58 + .../Coursework/ZAD5 EGN/EGN/build.xml | 73 + .../build/classes/.netbeans_automatic_build | 0 .../build/classes/.netbeans_update_resources | 0 .../ZAD5 EGN/EGN/build/classes/egn/EGN.class | Bin 0 -> 2900 bytes .../ZAD5 EGN/EGN/build/classes/egn/EGN.rs | 1 + .../Coursework/ZAD5 EGN/EGN/manifest.mf | 3 + .../ZAD5 EGN/EGN/nbproject/build-impl.xml | 1413 +++++++++++++++++ .../EGN/nbproject/genfiles.properties | 8 + .../EGN/nbproject/private/private.properties | 2 + .../EGN/nbproject/private/private.xml | 9 + .../ZAD5 EGN/EGN/nbproject/project.properties | 73 + .../ZAD5 EGN/EGN/nbproject/project.xml | 15 + .../Coursework/ZAD5 EGN/EGN/src/egn/EGN.java | 118 ++ 26 files changed, 3369 insertions(+) create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build.xml create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/.netbeans_automatic_build create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/.netbeans_update_resources create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/zad2v/RandomGenerator.class create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/zad2v/Zad2v.class create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/manifest.mf create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/build-impl.xml create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/genfiles.properties create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/private/private.properties create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/private/private.xml create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/project.properties create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/project.xml create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/src/zad2v/Zad2v.java create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build.xml create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/.netbeans_automatic_build create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/.netbeans_update_resources create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/egn/EGN.class create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/egn/EGN.rs create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/manifest.mf create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/build-impl.xml create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/genfiles.properties create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/private/private.properties create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/private/private.xml create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/project.properties create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/project.xml create mode 100644 1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/src/egn/EGN.java diff --git a/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build.xml b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build.xml new file mode 100644 index 0000000..fe8dd3e --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project zad2v. + + + diff --git a/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/.netbeans_automatic_build b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/.netbeans_update_resources b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/zad2v/RandomGenerator.class b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/zad2v/RandomGenerator.class new file mode 100644 index 0000000000000000000000000000000000000000..f0765ed4d03328c59d62a42df59f38f199dfd133 GIT binary patch literal 415 zcmZusO-sW-5Pg%RjmBtewN|JHk8KYY6hTnD2udV)Q0c)_x6OhpX;NZR#oy$`i-HG# zfImu{Nef;)?96-f@!rn&&*v9_18jS6u;IbRri-SFEkgCgBql#4*q!cx;GCtACe%Wc z=&NEf(%G#V#awBG=~%@Bl^NlSqLbg7M?x!nQPKXaf31=zom}WdXDUy#V}hIL=R8Pq zLZuS~-GFnPKIx1=f{W=?uy>Od*;t<&G4k$2YwtnLl#dFkK76zY&3`Qjbs6jzxrrC{ zd_#wwu*+9Ed^KS4V`aPm)IJ literal 0 HcmV?d00001 diff --git a/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/zad2v/Zad2v.class b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/build/classes/zad2v/Zad2v.class new file mode 100644 index 0000000000000000000000000000000000000000..622b20897c67cda01f9cc0cdffe94b5b2e08a8d4 GIT binary patch literal 1416 zcmaJ=-%}e^6#i}!vSC?h3=P<{(XHB=v_P~VRiFq(XrrN2(9Tqzmh7FlHM^U+yJ5g* z{|uje@l|~YjyU$cj{j2iyStg8wM_Tn{y6uX?|kPwXP-U)<1Ya7_|n8AJ~UCnEd%of zESSjRBLj;j^4gxq?NNM;PYf)XFtx?RasexPzoVB`6Q5$OfOP|R4QvSHSG>TBR|T@Q z`XhndM(9d`3oS2@5BmOrR9`sqP?Nt?wQ8)?woty)F~P zcf3Ggs_j{v;LWYxfk|TTW)z;7Bi`NPM2xnBFYx7;vIp? zS>3x#;rVj&s4aW37c%YU*Fiha;Tzd9{!V#~li3->{ZrqAf4ZMfU_x~^0fKF1gAmwji|*5{Um zZ9FirW8t9&pMMQg--{wP)K-a@b`-NuX;a2hN(o_s;#uyUgD0}h4wY-?&xH}lqqwPi z$WAxwB>qD1-f_ePoR6@tAyNb{Y&_&x#jHv?KD(QDdOaDq0#`UIuVfjPO~2XmD7?m> zQ<^?^CeVx8^vW@p+yJZ=ii^3ZV1Ko_mHnMn1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/genfiles.properties b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/genfiles.properties new file mode 100644 index 0000000..8d9717b --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=4845f82a +build.xml.script.CRC32=fc5372a6 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=4845f82a +nbproject/build-impl.xml.script.CRC32=9cb83f7c +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/private/private.properties b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/private/private.properties new file mode 100644 index 0000000..d81ce63 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Avkov\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/private/private.xml b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/private/private.xml new file mode 100644 index 0000000..3ab6ec6 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/private/private.xml @@ -0,0 +1,9 @@ + + + + + + file:/D:/Обучение/Софтуерни%20Технологии/Y1-T1/Структури%20от%20данни%20и%20ООП/EXAMS/ZAD2%20V/zad2v/src/zad2v/Zad2v.java + + + diff --git a/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/project.properties b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/project.properties new file mode 100644 index 0000000..ae81bc4 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/project.properties @@ -0,0 +1,73 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/zad2v.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=zad2v.Zad2v +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/project.xml b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/project.xml new file mode 100644 index 0000000..c2745bb --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + zad2v + + + + + + + + + diff --git a/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/src/zad2v/Zad2v.java b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/src/zad2v/Zad2v.java new file mode 100644 index 0000000..f3accf1 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD2 V/zad2v/src/zad2v/Zad2v.java @@ -0,0 +1,58 @@ +package zad2v; + +import java.util.Random; + +public class Zad2v { + + public static void main(String[] args) { + + int[] arr = generateArray(6); + double average = getAverage(arr); + System.out.println("average ->" + average); + } + + /* + * Generiram masiva s random generator ot -100 do 100 + */ + private static int[] generateArray(int elementsCount) { + + RandomGenerator rg = new RandomGenerator(); + int[] toReturn = new int[elementsCount]; + int counter = 0; + int element; + + while (counter < elementsCount) { + element = rg.nextInt(-100, 100); + toReturn[counter] = element; + System.out.println(counter + " => " + element); + counter++; + } + return toReturn; + } + + /* + * Tuk trqbva da napravim funkcia ili s drugi dumi metod chrez koito da izpulnbil uslovieto na zadachata no tui kato + * predstava si niamam kakvo e cheten indeks...... + */ + private static double getOddIndex(int[] arr) { + int elementsSum = 0; + int elementsCount = 0; + for (int i = 0; i < arr.length; i++) { + if (/*uslovieto kato razberem kakvo e cheten indeks go formulirame tuk :D*/) { + /*Tuka volizat operaciite*/ + } + } + + } + +} + +/* + * Ekstendvam Random + */ +class RandomGenerator extends Random { + + public int nextInt(int lower, int upper) { + return nextInt((upper - lower + 1)) + lower; + } +} diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build.xml b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build.xml new file mode 100644 index 0000000..bf880a9 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project EGN. + + + diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/.netbeans_automatic_build b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/.netbeans_update_resources b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/egn/EGN.class b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/egn/EGN.class new file mode 100644 index 0000000000000000000000000000000000000000..021ad46f460ba04e918cd177399b03b14d727d50 GIT binary patch literal 2900 zcmZ`*S$Evz8GhthB+E)Xc#9KfQC9465;tLKYo`gpSul*9v<`+O6p&|>vFsUX&}fF3 zwzNP}D9{yJNZ1bCs=|v*)KHhxi#jeESTwN}FUf>V7sr)Ywr64ei!XlRoFx?@f)@=7DqdB^wNkkPH1j-33$q*GA| z=y-@lVQJ{ltIjwjuOJS8XmjYC24mI>qq$?wqJ~V1?PE^lj7W+o-4mV^-=NHX zLE6GF_FDKUex~D+h0FM(j@K=`A;dFyfY7Y1hlcwUskIOm#_%UG^`?e_$)MypcHODF z1vhf-N-eAhQDD=fZQ(7vZQ;-Oi-n_jRKuV><<_N4z7p7OuTc&nKd1+zwyj|Y4eXwrYYt z{wmn~4S%&T9SiT`pE~|!;XS->;R>!YG$p56U~L&$?Zw5( z$wEPJWETB*MDOkv3m-@XAL1Pi8^-5?y1QT>APkjYUo~<CPq+8J7s&}Ln30XeuY z)SQyqpe?Dy^ zz*{>G^3xY9pW?fXw9X~8<-S0of#mQKQg_UBAxU;OpFJ?qi}mPJCi`MFJcx(LPoe`4 z^TahIyCycSjUmAw;Pup(NI!8C`q?jF+(7#z9d(%vbnI=w%F*AttLPTm`W4!>8*<`HNO|@%C&{0qJIzve)Y-X4Uun{Q?AOo9U z*zMTD@9r+_B&@rb)E;iU`*8$=I7!$~5%@EN{5-jNg1$fqLZVqGo-Y&4SD5@|CN5ap z^pV1=3J%cfJbsQ*0+PXtw0VfI{X$8lZzH4QFpGI)nFUJltm6^hfWB>gy#$gQGzOAe zHKE`h&Nk4SF+V{n@p*O$eOH@@4Y}c)=s$Y{8ynbkMTp7ISCicVgXhC6`w>>@D7t92 z2gjNINv8N1(|f$7qQfd&0jCS&IK}`ZToZ{7;}&{!>Y1_^n}JmsmbA~d#GwI+?KAXc z2O1by!e$lQB~81w{7p+ReZ&TsqLEXq!D(#Zc?+gj188GKPBJKI=xvxFa##uA7TUC) z@2GFePHqP9wL%-%+sr?gO=QvyY?-`?t!KNo-GDu{kHz1fy9RSKxiQ(m&f)9S-NZWW zWX0oth#@*hpw6>S&yf2p`LmRG9=qYN`gs-MgY>?ee>qI5vDn)L%V5t;DX=ow%*;j! z$|eGM8o#6m0dOPQmT4}jN_<>Be+5m)beie#L)=W~Iu&JNj${)Dm#`t1P0DL>m?`YK zf({vg-Rx+&v(Dc^~9m#y8Gv56cdC?6P@|Zi&NN=Kq-i`@6zP2-&4ownlBW obLqO-xjM)ANtM%jcKHlXap$f>;(KgmBk;GglW{*q2W@!z|5bN#lK=n! literal 0 HcmV?d00001 diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/egn/EGN.rs b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/egn/EGN.rs new file mode 100644 index 0000000..c402d76 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/build/classes/egn/EGN.rs @@ -0,0 +1 @@ +test.Test3 diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/manifest.mf b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/build-impl.xml b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/build-impl.xml new file mode 100644 index 0000000..457c1b7 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/genfiles.properties b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/genfiles.properties new file mode 100644 index 0000000..c080be3 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=0a1f6b03 +build.xml.script.CRC32=9937e6bf +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=0a1f6b03 +nbproject/build-impl.xml.script.CRC32=8c206b0e +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/private/private.properties b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/private/private.properties new file mode 100644 index 0000000..d81ce63 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Avkov\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/private/private.xml b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/private/private.xml new file mode 100644 index 0000000..0dfc210 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/private/private.xml @@ -0,0 +1,9 @@ + + + + + + file:/D:/Обучение/Софтуерни%20Технологии/Y1-T1/Структури%20от%20данни%20и%20ООП/EXAMS/ZAD5%20EGN/EGN/src/egn/EGN.java + + + diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/project.properties b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/project.properties new file mode 100644 index 0000000..4e3da90 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/project.properties @@ -0,0 +1,73 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/EGN.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=egn.EGN +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/project.xml b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/project.xml new file mode 100644 index 0000000..f192090 --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + EGN + + + + + + + + + diff --git a/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/src/egn/EGN.java b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/src/egn/EGN.java new file mode 100644 index 0000000..01dd8ac --- /dev/null +++ b/1401417004_AtanasAvkov/Coursework/ZAD5 EGN/EGN/src/egn/EGN.java @@ -0,0 +1,118 @@ +/* +* Zada4a 5 +* Sastavete programa, koqto sravnqva dve EGN-ta i izvejda saob6tenie, koi ot pritejatelite im e po-mlad. +* Izgotvil Atanas Avkov +* FMI 1vi kurs Softuerni tehnologii (2g.) FAK # 1401417004 +* LICENSE: MIT +*/ + +package egn; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Scanner; + +public class EGN { + + public static void main(String[] args) { + String[] egnArr = getEGNs(); + System.out.println(); + compareEGNs(egnArr); + } + + private static String[] getEGNs() { + String[] egnArr = new String[2]; + String egn; + Scanner in = new Scanner(System.in); +/* +* Eto edin cikul :D +*/ + while (true) { + System.out.print("Molia vavedete purvoto EGN "); + egn = in.nextLine(); + while (!isValid(egn)) { + System.out.print(" Nevalidno EGN! Molia vavedete otnovo: "); + egn = in.nextLine(); + } + if (isValid(egn)) { + egnArr[0] = egn; + System.out.println("EGN-to koeto vavedohte e validno. "); + System.out.print("Molia vavedete vtoro EGN: "); + egn = in.nextLine(); + while (!isValid(egn)) { + System.out.print(" Nevalidno EGN molia vuvedete EGN otnovo: "); + egn = in.nextLine(); + } + if (isValid(egn)) { + egnArr[1] = egn; + System.out.println("Validno vtoro EGN "); + break; + } + } + } + in.close(); + return egnArr; + } +/* +* proverka za validnost +*/ + private static boolean isValid(String egn) { + + if (egn.length() != 10) { + return false; + } + if (!isInteger(egn)) { + return false; + } + + Date birthDay = parse(egn); + + if (birthDay.after(new Date())) { + return false; + } + return true; + } + + private static boolean isInteger(String input) { + for (int i = 0; i < input.length(); i++) { + if (!Character.isDigit(input.charAt(i))) { + return false; + } + } + return true; + } +/* +* Dparsvame datite +*/ + private static Date parse(String egn) { + + Date parsed = new Date(); + String dateString = egn.substring(0, 6); + SimpleDateFormat format = new SimpleDateFormat("yyMMdd"); + try { + parsed = format.parse(dateString); + + } catch (ParseException e) { + e.printStackTrace(); + } + return parsed; + } +/* +* sravnqvame stringovete +*/ + private static void compareEGNs(String[] egnArr) { + Date date1 = parse(egnArr[0]); + Date date2 = parse(egnArr[1]); + + if (date1.before(date2)) { + System.out.println("Chovek 1 e po-star ot 2"); + } + if (date1.after(date2)) { + System.out.println("Chovek 2 e po-star 1"); + } + if (date1.equals(date2)) { + System.out.println("I dvamata sa na edna i su6ta vuzrast"); + } + } +} \ No newline at end of file