├── .gitignore
└── labs
├── bck
└── reviews101.org.csv
├── data
├── product101.csv
├── product102.csv
├── product103.csv
├── product104.csv
├── product105.csv
├── product106.csv
├── reviews101.csv
├── reviews102.csv
├── reviews103.csv
├── reviews104.csv
├── reviews105.csv
└── reviews106.csv
├── practice10A
└── ProductManagement
│ ├── build.xml
│ ├── dist
│ └── README.TXT
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ ├── Drink.java
│ ├── Food.java
│ ├── Product.java
│ ├── ProductManager.java
│ ├── Rateable.java
│ ├── Rating.java
│ ├── Review.java
│ ├── resources.properties
│ ├── resources_es_US.properties
│ ├── resources_fr_CA.properties
│ ├── resources_fr_FR.properties
│ ├── resources_nl_NL.properties
│ └── resources_ru_RU.properties
├── practice10B
└── ProductManagement
│ ├── build.xml
│ ├── dist
│ └── README.TXT
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ ├── Drink.java
│ ├── Food.java
│ ├── Product.java
│ ├── ProductManager.java
│ ├── Rateable.java
│ ├── Rating.java
│ ├── Review.java
│ ├── resources.properties
│ ├── resources_es_US.properties
│ ├── resources_fr_CA.properties
│ ├── resources_fr_FR.properties
│ ├── resources_nl_NL.properties
│ └── resources_ru_RU.properties
├── practice11
└── ProductManagement
│ ├── build.xml
│ ├── dist
│ └── README.TXT
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ ├── Drink.java
│ ├── Food.java
│ ├── Product.java
│ ├── ProductManager.java
│ ├── Rateable.java
│ ├── Rating.java
│ ├── Review.java
│ ├── resources.properties
│ ├── resources_es_US.properties
│ ├── resources_fr_CA.properties
│ ├── resources_fr_FR.properties
│ ├── resources_nl_NL.properties
│ └── resources_ru_RU.properties
├── practice12
└── ProductManagement
│ ├── build.xml
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ ├── Drink.java
│ ├── Food.java
│ ├── Product.java
│ ├── ProductManager.java
│ ├── ProductManagerException.java
│ ├── Rateable.java
│ ├── Rating.java
│ ├── Review.java
│ ├── config.properties
│ ├── resources.properties
│ ├── resources_es_US.properties
│ ├── resources_fr_CA.properties
│ ├── resources_fr_FR.properties
│ ├── resources_nl_NL.properties
│ └── resources_ru_RU.properties
├── practice13
└── ProductManagement
│ ├── build.xml
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ ├── Drink.java
│ ├── Food.java
│ ├── Product.java
│ ├── ProductManager.java
│ ├── ProductManagerException.java
│ ├── Rateable.java
│ ├── Rating.java
│ ├── Review.java
│ ├── config.properties
│ ├── resources.properties
│ ├── resources_es_US.properties
│ ├── resources_fr_CA.properties
│ ├── resources_fr_FR.properties
│ ├── resources_nl_NL.properties
│ └── resources_ru_RU.properties
├── practice14
└── ProductManagement
│ ├── build.xml
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ ├── Drink.java
│ ├── Food.java
│ ├── Product.java
│ ├── ProductManager.java
│ ├── ProductManagerException.java
│ ├── Rateable.java
│ ├── Rating.java
│ ├── Review.java
│ ├── config.properties
│ ├── resources.properties
│ ├── resources_es_US.properties
│ ├── resources_fr_CA.properties
│ ├── resources_fr_FR.properties
│ ├── resources_nl_NL.properties
│ └── resources_ru_RU.properties
├── practice15A
└── ProductManagement
│ ├── build.xml
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ ├── labs
│ └── pm
│ │ ├── app
│ │ └── Shop.java
│ │ └── data
│ │ ├── Drink.java
│ │ ├── Food.java
│ │ ├── Product.java
│ │ ├── ProductManager.java
│ │ ├── ProductManagerException.java
│ │ ├── Rateable.java
│ │ ├── Rating.java
│ │ ├── Review.java
│ │ ├── config.properties
│ │ ├── resources.properties
│ │ ├── resources_es_US.properties
│ │ ├── resources_fr_CA.properties
│ │ ├── resources_fr_FR.properties
│ │ ├── resources_nl_NL.properties
│ │ └── resources_ru_RU.properties
│ └── module-info.java
├── practice15B-refactored
└── ProductManagement
│ ├── build.xml
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ ├── client
│ ├── ResourceFormatter.java
│ ├── Shop.java
│ ├── resources.properties
│ ├── resources_es_US.properties
│ ├── resources_fr_CA.properties
│ ├── resources_fr_FR.properties
│ ├── resources_nl_NL.properties
│ └── resources_ru_RU.properties
│ ├── file
│ └── service
│ │ ├── ProductFileManager.java
│ │ └── config.properties
│ ├── module-info.java
│ └── pm
│ ├── data
│ ├── Drink.java
│ ├── Food.java
│ ├── Product.java
│ ├── Rateable.java
│ ├── Rating.java
│ └── Review.java
│ └── service
│ ├── ProductManager.java
│ └── ProductManagerException.java
├── practice15B-solution
└── modules
│ └── ProductManagement
│ ├── build.xml
│ ├── dist
│ └── jlink
│ │ └── ProductManagement
│ │ ├── bin
│ │ ├── java
│ │ ├── keytool
│ │ └── shop
│ │ ├── conf
│ │ ├── logging.properties
│ │ ├── net.properties
│ │ └── security
│ │ │ ├── java.policy
│ │ │ ├── java.security
│ │ │ └── policy
│ │ │ ├── README.txt
│ │ │ ├── limited
│ │ │ ├── default_US_export.policy
│ │ │ ├── default_local.policy
│ │ │ └── exempt_local.policy
│ │ │ └── unlimited
│ │ │ ├── default_US_export.policy
│ │ │ └── default_local.policy
│ │ ├── include
│ │ ├── classfile_constants.h
│ │ ├── jni.h
│ │ ├── jvmti.h
│ │ ├── jvmticmlr.h
│ │ └── linux
│ │ │ └── jni_md.h
│ │ ├── legal
│ │ ├── java.base
│ │ │ ├── COPYRIGHT
│ │ │ ├── LICENSE
│ │ │ ├── aes.md
│ │ │ ├── asm.md
│ │ │ ├── c-libutl.md
│ │ │ ├── cldr.md
│ │ │ ├── icu.md
│ │ │ ├── public_suffix.md
│ │ │ └── unicode.md
│ │ └── java.logging
│ │ │ ├── COPYRIGHT
│ │ │ └── LICENSE
│ │ ├── lib
│ │ ├── classlist
│ │ ├── jexec
│ │ ├── jli
│ │ │ └── libjli.so
│ │ ├── jspawnhelper
│ │ ├── jvm.cfg
│ │ ├── libjava.so
│ │ ├── libjimage.so
│ │ ├── libjsig.so
│ │ ├── libnet.so
│ │ ├── libnio.so
│ │ ├── libverify.so
│ │ ├── libzip.so
│ │ ├── modules
│ │ ├── security
│ │ │ ├── blacklisted.certs
│ │ │ ├── cacerts
│ │ │ ├── default.policy
│ │ │ └── public_suffix_list.dat
│ │ ├── server
│ │ │ ├── Xusage.txt
│ │ │ ├── libjsig.so
│ │ │ └── libjvm.so
│ │ └── tzdb.dat
│ │ └── release
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ └── private.properties
│ ├── project.properties
│ └── project.xml
│ └── src
│ ├── labs.client
│ └── classes
│ │ ├── labs
│ │ └── client
│ │ │ ├── ResourceFormatter.java
│ │ │ ├── Shop.java
│ │ │ ├── resources.properties
│ │ │ ├── resources_es_US.properties
│ │ │ ├── resources_fr_CA.properties
│ │ │ ├── resources_fr_FR.properties
│ │ │ ├── resources_nl_NL.properties
│ │ │ └── resources_ru_RU.properties
│ │ └── module-info.java
│ ├── labs.file
│ └── classes
│ │ ├── labs
│ │ └── file
│ │ │ └── service
│ │ │ ├── ProductFileManager.java
│ │ │ └── config.properties
│ │ └── module-info.java
│ └── labs.pm
│ └── classes
│ ├── labs
│ └── pm
│ │ ├── data
│ │ ├── Drink.java
│ │ ├── Food.java
│ │ ├── Product.java
│ │ ├── Rateable.java
│ │ ├── Rating.java
│ │ └── Review.java
│ │ └── service
│ │ ├── ProductManager.java
│ │ └── ProductManagerException.java
│ └── module-info.java
├── practice2
├── script1.txt
└── script2.txt
├── practice3
├── messages.properties
├── messages_ru_RU.properties
└── practice3.txt
├── practice4
└── ProductManagement
│ ├── build.xml
│ ├── dist
│ └── javadoc
│ │ ├── allclasses-index.html
│ │ ├── allclasses.html
│ │ ├── allpackages-index.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── element-list
│ │ ├── help-doc.html
│ │ ├── index-files
│ │ ├── index-1.html
│ │ ├── index-2.html
│ │ ├── index-3.html
│ │ ├── index-4.html
│ │ ├── index-5.html
│ │ └── index-6.html
│ │ ├── index.html
│ │ ├── jquery
│ │ ├── external
│ │ │ └── jquery
│ │ │ │ └── jquery.js
│ │ ├── images
│ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png
│ │ │ ├── ui-bg_glass_65_dadada_1x400.png
│ │ │ ├── ui-bg_glass_75_dadada_1x400.png
│ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png
│ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png
│ │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png
│ │ │ ├── ui-icons_222222_256x240.png
│ │ │ ├── ui-icons_2e83ff_256x240.png
│ │ │ ├── ui-icons_454545_256x240.png
│ │ │ ├── ui-icons_888888_256x240.png
│ │ │ └── ui-icons_cd0a0a_256x240.png
│ │ ├── jquery-3.5.1.js
│ │ ├── jquery-ui.css
│ │ ├── jquery-ui.js
│ │ ├── jquery-ui.min.css
│ │ ├── jquery-ui.min.js
│ │ ├── jquery-ui.structure.css
│ │ ├── jquery-ui.structure.min.css
│ │ ├── jszip-utils
│ │ │ └── dist
│ │ │ │ ├── jszip-utils-ie.js
│ │ │ │ ├── jszip-utils-ie.min.js
│ │ │ │ ├── jszip-utils.js
│ │ │ │ └── jszip-utils.min.js
│ │ └── jszip
│ │ │ └── dist
│ │ │ ├── jszip.js
│ │ │ └── jszip.min.js
│ │ ├── labs
│ │ └── pm
│ │ │ ├── app
│ │ │ ├── Shop.html
│ │ │ ├── class-use
│ │ │ │ └── Shop.html
│ │ │ ├── package-summary.html
│ │ │ ├── package-tree.html
│ │ │ └── package-use.html
│ │ │ └── data
│ │ │ ├── Product.html
│ │ │ ├── class-use
│ │ │ └── Product.html
│ │ │ ├── package-summary.html
│ │ │ ├── package-tree.html
│ │ │ └── package-use.html
│ │ ├── member-search-index.js
│ │ ├── overview-summary.html
│ │ ├── overview-tree.html
│ │ ├── package-search-index.js
│ │ ├── resources
│ │ ├── glass.png
│ │ └── x.png
│ │ ├── script.js
│ │ ├── search.js
│ │ ├── stylesheet.css
│ │ └── type-search-index.js
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ └── Product.java
├── practice5
└── ProductManagement
│ ├── build.xml
│ ├── dist
│ └── javadoc
│ │ ├── allclasses-index.html
│ │ ├── allclasses.html
│ │ ├── allpackages-index.html
│ │ ├── constant-values.html
│ │ ├── deprecated-list.html
│ │ ├── element-list
│ │ ├── help-doc.html
│ │ ├── index-files
│ │ ├── index-1.html
│ │ ├── index-2.html
│ │ ├── index-3.html
│ │ ├── index-4.html
│ │ ├── index-5.html
│ │ └── index-6.html
│ │ ├── index.html
│ │ ├── jquery
│ │ ├── external
│ │ │ └── jquery
│ │ │ │ └── jquery.js
│ │ ├── images
│ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png
│ │ │ ├── ui-bg_glass_65_dadada_1x400.png
│ │ │ ├── ui-bg_glass_75_dadada_1x400.png
│ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png
│ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png
│ │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png
│ │ │ ├── ui-icons_222222_256x240.png
│ │ │ ├── ui-icons_2e83ff_256x240.png
│ │ │ ├── ui-icons_454545_256x240.png
│ │ │ ├── ui-icons_888888_256x240.png
│ │ │ └── ui-icons_cd0a0a_256x240.png
│ │ ├── jquery-3.5.1.js
│ │ ├── jquery-ui.css
│ │ ├── jquery-ui.js
│ │ ├── jquery-ui.min.css
│ │ ├── jquery-ui.min.js
│ │ ├── jquery-ui.structure.css
│ │ ├── jquery-ui.structure.min.css
│ │ ├── jszip-utils
│ │ │ └── dist
│ │ │ │ ├── jszip-utils-ie.js
│ │ │ │ ├── jszip-utils-ie.min.js
│ │ │ │ ├── jszip-utils.js
│ │ │ │ └── jszip-utils.min.js
│ │ └── jszip
│ │ │ └── dist
│ │ │ ├── jszip.js
│ │ │ └── jszip.min.js
│ │ ├── labs
│ │ └── pm
│ │ │ ├── app
│ │ │ ├── Shop.html
│ │ │ ├── class-use
│ │ │ │ └── Shop.html
│ │ │ ├── package-summary.html
│ │ │ ├── package-tree.html
│ │ │ └── package-use.html
│ │ │ └── data
│ │ │ ├── Product.html
│ │ │ ├── class-use
│ │ │ └── Product.html
│ │ │ ├── package-summary.html
│ │ │ ├── package-tree.html
│ │ │ └── package-use.html
│ │ ├── member-search-index.js
│ │ ├── overview-summary.html
│ │ ├── overview-tree.html
│ │ ├── package-search-index.js
│ │ ├── resources
│ │ ├── glass.png
│ │ └── x.png
│ │ ├── script.js
│ │ ├── search.js
│ │ ├── stylesheet.css
│ │ └── type-search-index.js
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ ├── Product.java
│ └── Rating.java
├── practice6
└── ProductManagement
│ ├── build.xml
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ ├── Drink.java
│ ├── Food.java
│ ├── Product.java
│ ├── ProductManager.java
│ └── Rating.java
├── practice7
└── ProductManagement
│ ├── build.xml
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ ├── Drink.java
│ ├── Food.java
│ ├── Product.java
│ ├── ProductManager.java
│ ├── Rateable.java
│ ├── Rating.java
│ ├── Review.java
│ └── resources.properties
├── practice8
└── ProductManagement
│ ├── build.xml
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ ├── Drink.java
│ ├── Food.java
│ ├── Product.java
│ ├── ProductManager.java
│ ├── Rateable.java
│ ├── Rating.java
│ ├── Review.java
│ └── resources.properties
├── practice9
└── ProductManagement
│ ├── build.xml
│ ├── dist
│ └── README.TXT
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ │ ├── config.properties
│ │ ├── private.properties
│ │ └── private.xml
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── labs
│ └── pm
│ ├── app
│ └── Shop.java
│ └── data
│ ├── Drink.java
│ ├── Food.java
│ ├── Product.java
│ ├── ProductManager.java
│ ├── Rateable.java
│ ├── Rating.java
│ ├── Review.java
│ └── resources.properties
├── practices
└── modules
│ └── ProductManagement
│ ├── build.xml
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── project.properties
│ └── project.xml
│ └── src
│ ├── labs.client
│ └── classes
│ │ ├── labs
│ │ └── client
│ │ │ ├── ResourceFormatter.java
│ │ │ ├── Shop.java
│ │ │ ├── resources.properties
│ │ │ ├── resources_es_US.properties
│ │ │ ├── resources_fr_CA.properties
│ │ │ ├── resources_fr_FR.properties
│ │ │ ├── resources_nl_NL.properties
│ │ │ └── resources_ru_RU.properties
│ │ └── module-info.java
│ ├── labs.file
│ └── classes
│ │ ├── labs
│ │ └── file
│ │ │ └── service
│ │ │ ├── ProductFileManager.java
│ │ │ └── config.properties
│ │ └── module-info.java
│ └── labs.pm
│ └── classes
│ ├── labs
│ └── pm
│ │ ├── data
│ │ ├── Drink.java
│ │ ├── Food.java
│ │ ├── Product.java
│ │ ├── Rateable.java
│ │ ├── Rating.java
│ │ └── Review.java
│ │ └── service
│ │ ├── ProductManager.java
│ │ └── ProductManagerException.java
│ └── module-info.java
├── prepJavaSECertification
└── MethodsInInterfaces
│ ├── build.xml
│ ├── manifest.mf
│ ├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── project.properties
│ └── project.xml
│ └── src
│ └── methodsininterfaces
│ └── colors
│ ├── Black.java
│ ├── Colors.java
│ ├── Gold.java
│ └── Red.java
├── reports
└── product101report.txt
└── scripts
└── generate-data.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled class file
2 | *.class
3 |
4 | # Log file
5 | *.log
6 |
7 | # BlueJ files
8 | *.ctxt
9 |
10 | # Mobile Tools for Java (J2ME)
11 | .mtj.tmp/
12 |
13 | # Package Files #
14 | *.jar
15 | *.war
16 | *.nar
17 | *.ear
18 | *.zip
19 | *.tar.gz
20 | *.rar
21 |
22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23 | hs_err_pid*
24 |
--------------------------------------------------------------------------------
/labs/bck/reviews101.org.csv:
--------------------------------------------------------------------------------
1 | 4,Nice hot cup of tea
2 | 2,Rather weak tea
3 | 4,Fine tea
4 | 4,Good tea
5 | 5,Perfect tea
6 | 3,Just add some lemon
--------------------------------------------------------------------------------
/labs/data/product101.csv:
--------------------------------------------------------------------------------
1 | D,101,English Breakfast Tea,1.99,4,2019-09-19
2 |
--------------------------------------------------------------------------------
/labs/data/product102.csv:
--------------------------------------------------------------------------------
1 | D,102,Coffee,1.99,3,2019-09-19
2 |
--------------------------------------------------------------------------------
/labs/data/product103.csv:
--------------------------------------------------------------------------------
1 | F,103,Cake,3.99,4,2019-09-21
2 |
--------------------------------------------------------------------------------
/labs/data/product104.csv:
--------------------------------------------------------------------------------
1 | F,104,Cookie,2.99,3,2019-09-19
2 |
--------------------------------------------------------------------------------
/labs/data/product105.csv:
--------------------------------------------------------------------------------
1 | D,105,Hot Chocolate,2.50,4,2019-09-19
2 |
--------------------------------------------------------------------------------
/labs/data/product106.csv:
--------------------------------------------------------------------------------
1 | F,106,Chocolate,2.50,5,2019-09-22
2 |
--------------------------------------------------------------------------------
/labs/data/reviews101.csv:
--------------------------------------------------------------------------------
1 | 5,This is the best one I ever had
2 | 2,Very small - expected more
3 | 4,I liked it
4 | 4,Good choice
5 | 3,Could have been better
--------------------------------------------------------------------------------
/labs/data/reviews102.csv:
--------------------------------------------------------------------------------
1 | 3,Coffee was ok
2 | 1,Where is the milk?!
3 | 5,It's perfect with ten spoons of sugar!
--------------------------------------------------------------------------------
/labs/data/reviews103.csv:
--------------------------------------------------------------------------------
1 | 5,Very nice cake
2 | 4,It's good, but I've expected more chocolate
3 | 5,This cake is perfect!
--------------------------------------------------------------------------------
/labs/data/reviews104.csv:
--------------------------------------------------------------------------------
1 | 3,Just another cookie
2 | 3,Ok
--------------------------------------------------------------------------------
/labs/data/reviews105.csv:
--------------------------------------------------------------------------------
1 | 4,Tasty
2 | 4,Not bad at all
--------------------------------------------------------------------------------
/labs/data/reviews106.csv:
--------------------------------------------------------------------------------
1 | 2,Too sweet
2 | 3,Better than cookie
3 | 2,Too bitter
4 | 1,I don't get it!
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/dist/README.TXT:
--------------------------------------------------------------------------------
1 | ========================
2 | BUILD OUTPUT DESCRIPTION
3 | ========================
4 |
5 | When you build an Java application project that has a main class, the IDE
6 | automatically copies all of the JAR
7 | files on the projects classpath to your projects dist/lib folder. The IDE
8 | also adds each of the JAR files to the Class-Path element in the application
9 | JAR files manifest file (MANIFEST.MF).
10 |
11 | To run the project from the command line, go to the dist folder and
12 | type the following:
13 |
14 | java -jar "ProductManagement.jar"
15 |
16 | To distribute this project, zip up the dist folder (including the lib folder)
17 | and distribute the ZIP file.
18 |
19 | Notes:
20 |
21 | * If two JAR files on the project classpath have the same name, only the first
22 | JAR file is copied to the lib folder.
23 | * Only JAR files are copied to the lib folder.
24 | If the classpath contains other types of files or folders, these files (folders)
25 | are not copied.
26 | * If a library on the projects classpath also has a Class-Path element
27 | specified in the manifest,the content of the Class-Path element has to be on
28 | the projects runtime path.
29 | * To set a main class in a standard Java project, right-click the project node
30 | in the Projects window and choose Properties. Then click Run and enter the
31 | class name in the Main Class field. Alternatively, you can manually type the
32 | class name in the manifest Main-Class element.
33 |
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice10A/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=false
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Product.java
7 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Rating.java
8 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Food.java
9 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/ProductManager.java
10 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
11 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Drink.java
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/src/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/src/labs/pm/data/Rating.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public enum Rating {
24 | //Black Star: \u2605
25 | //White Starte \u2606
26 |
27 | NOT_RATED("\u2606\u2606\u2606\u2606\u2606"),
28 | ONE_STAR("\u2605\u2606\u2606\u2606\u2606"),
29 | TWO_STAR("\u2605\u2605\u2606\u2606\u2606"),
30 | THREE_STAR("\u2605\u2605\u2605\u2606\u2606"),
31 | FOUR_STAR("\u2605\u2605\u2605\u2605\u2606"),
32 | FIVE_STAR("\u2605\u2605\u2605\u2605\u2605");
33 |
34 | private String stars;
35 |
36 | private Rating(String stars) {
37 | this.stars = stars;
38 | }
39 |
40 | public String getStars() {
41 | return stars;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/src/labs/pm/data/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/src/labs/pm/data/resources_es_US.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Precio: {1}, Clasificaci\u00f3n {2}, Cons\u00famase antes de: {3}
17 | review=Revisar: {0}\t{1}
18 | no.reviews=No revisado
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/src/labs/pm/data/resources_fr_CA.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/src/labs/pm/data/resources_fr_FR.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/src/labs/pm/data/resources_nl_NL.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prijs: {1}, Beoordeling {2}, Tenminste houdbaar tot: {3}
17 | review=Beoordeling: {0}\t{1}
18 | no.reviews=Niet beoordeeld
--------------------------------------------------------------------------------
/labs/practice10A/ProductManagement/src/labs/pm/data/resources_ru_RU.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, \u0446\u0435\u043d\u0430: {1}, \u0420\u0435\u0439\u0442\u0438\u043d\u0433 {2}, \u0423\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u044c \u0434\u043e: {3}
17 | review=\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435: {0}\t{1}
18 | no.reviews=Ne provereno
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/dist/README.TXT:
--------------------------------------------------------------------------------
1 | ========================
2 | BUILD OUTPUT DESCRIPTION
3 | ========================
4 |
5 | When you build an Java application project that has a main class, the IDE
6 | automatically copies all of the JAR
7 | files on the projects classpath to your projects dist/lib folder. The IDE
8 | also adds each of the JAR files to the Class-Path element in the application
9 | JAR files manifest file (MANIFEST.MF).
10 |
11 | To run the project from the command line, go to the dist folder and
12 | type the following:
13 |
14 | java -jar "ProductManagement.jar"
15 |
16 | To distribute this project, zip up the dist folder (including the lib folder)
17 | and distribute the ZIP file.
18 |
19 | Notes:
20 |
21 | * If two JAR files on the project classpath have the same name, only the first
22 | JAR file is copied to the lib folder.
23 | * Only JAR files are copied to the lib folder.
24 | If the classpath contains other types of files or folders, these files (folders)
25 | are not copied.
26 | * If a library on the projects classpath also has a Class-Path element
27 | specified in the manifest,the content of the Class-Path element has to be on
28 | the projects runtime path.
29 | * To set a main class in a standard Java project, right-click the project node
30 | in the Projects window and choose Properties. Then click Run and enter the
31 | class name in the Main Class field. Alternatively, you can manually type the
32 | class name in the manifest Main-Class element.
33 |
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice10B/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=false
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Product.java
7 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Rating.java
8 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Food.java
9 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/ProductManager.java
10 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
11 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Drink.java
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/src/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/src/labs/pm/data/Rating.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public enum Rating {
24 | //Black Star: \u2605
25 | //White Starte \u2606
26 |
27 | NOT_RATED("\u2606\u2606\u2606\u2606\u2606"),
28 | ONE_STAR("\u2605\u2606\u2606\u2606\u2606"),
29 | TWO_STAR("\u2605\u2605\u2606\u2606\u2606"),
30 | THREE_STAR("\u2605\u2605\u2605\u2606\u2606"),
31 | FOUR_STAR("\u2605\u2605\u2605\u2605\u2606"),
32 | FIVE_STAR("\u2605\u2605\u2605\u2605\u2605");
33 |
34 | private String stars;
35 |
36 | private Rating(String stars) {
37 | this.stars = stars;
38 | }
39 |
40 | public String getStars() {
41 | return stars;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/src/labs/pm/data/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/src/labs/pm/data/resources_es_US.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Precio: {1}, Clasificaci\u00f3n {2}, Cons\u00famase antes de: {3}
17 | review=Revisar: {0}\t{1}
18 | no.reviews=No revisado
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/src/labs/pm/data/resources_fr_CA.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/src/labs/pm/data/resources_fr_FR.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/src/labs/pm/data/resources_nl_NL.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prijs: {1}, Beoordeling {2}, Tenminste houdbaar tot: {3}
17 | review=Beoordeling: {0}\t{1}
18 | no.reviews=Niet beoordeeld
--------------------------------------------------------------------------------
/labs/practice10B/ProductManagement/src/labs/pm/data/resources_ru_RU.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, \u0446\u0435\u043d\u0430: {1}, \u0420\u0435\u0439\u0442\u0438\u043d\u0433 {2}, \u0423\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u044c \u0434\u043e: {3}
17 | review=\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435: {0}\t{1}
18 | no.reviews=Ne provereno
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/dist/README.TXT:
--------------------------------------------------------------------------------
1 | ========================
2 | BUILD OUTPUT DESCRIPTION
3 | ========================
4 |
5 | When you build an Java application project that has a main class, the IDE
6 | automatically copies all of the JAR
7 | files on the projects classpath to your projects dist/lib folder. The IDE
8 | also adds each of the JAR files to the Class-Path element in the application
9 | JAR files manifest file (MANIFEST.MF).
10 |
11 | To run the project from the command line, go to the dist folder and
12 | type the following:
13 |
14 | java -jar "ProductManagement.jar"
15 |
16 | To distribute this project, zip up the dist folder (including the lib folder)
17 | and distribute the ZIP file.
18 |
19 | Notes:
20 |
21 | * If two JAR files on the project classpath have the same name, only the first
22 | JAR file is copied to the lib folder.
23 | * Only JAR files are copied to the lib folder.
24 | If the classpath contains other types of files or folders, these files (folders)
25 | are not copied.
26 | * If a library on the projects classpath also has a Class-Path element
27 | specified in the manifest,the content of the Class-Path element has to be on
28 | the projects runtime path.
29 | * To set a main class in a standard Java project, right-click the project node
30 | in the Projects window and choose Properties. Then click Run and enter the
31 | class name in the Main Class field. Alternatively, you can manually type the
32 | class name in the manifest Main-Class element.
33 |
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice11/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=false
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Rateable.java
7 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Product.java
8 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/resources.properties
9 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Review.java
10 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Rating.java
11 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/ProductManager.java
12 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/src/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/src/labs/pm/data/Rating.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public enum Rating {
24 | //Black Star: \u2605
25 | //White Starte \u2606
26 |
27 | NOT_RATED("\u2606\u2606\u2606\u2606\u2606"),
28 | ONE_STAR("\u2605\u2606\u2606\u2606\u2606"),
29 | TWO_STAR("\u2605\u2605\u2606\u2606\u2606"),
30 | THREE_STAR("\u2605\u2605\u2605\u2606\u2606"),
31 | FOUR_STAR("\u2605\u2605\u2605\u2605\u2606"),
32 | FIVE_STAR("\u2605\u2605\u2605\u2605\u2605");
33 |
34 | private String stars;
35 |
36 | private Rating(String stars) {
37 | this.stars = stars;
38 | }
39 |
40 | public String getStars() {
41 | return stars;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/src/labs/pm/data/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/src/labs/pm/data/resources_es_US.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Precio: {1}, Clasificaci\u00f3n {2}, Cons\u00famase antes de: {3}
17 | review=Revisar: {0}\t{1}
18 | no.reviews=No revisado
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/src/labs/pm/data/resources_fr_CA.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/src/labs/pm/data/resources_fr_FR.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/src/labs/pm/data/resources_nl_NL.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prijs: {1}, Beoordeling {2}, Tenminste houdbaar tot: {3}
17 | review=Beoordeling: {0}\t{1}
18 | no.reviews=Niet beoordeeld
--------------------------------------------------------------------------------
/labs/practice11/ProductManagement/src/labs/pm/data/resources_ru_RU.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, \u0446\u0435\u043d\u0430: {1}, \u0420\u0435\u0439\u0442\u0438\u043d\u0433 {2}, \u0423\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u044c \u0434\u043e: {3}
17 | review=\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435: {0}\t{1}
18 | no.reviews=Ne provereno
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice12/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=false
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/ProductManagerException.java
7 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/ProductManager.java
8 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/config.properties
9 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/src/labs/pm/data/ProductManagerException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public class ProductManagerException extends Exception {
24 |
25 | public ProductManagerException() {
26 | super();
27 | }
28 |
29 | public ProductManagerException(String message) {
30 | super(message);
31 | }
32 |
33 |
34 | public ProductManagerException(String message, Throwable cause) {
35 | super(message, cause);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/src/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/src/labs/pm/data/config.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product.data.format={0},{1},{2},{3},{4},{5}
17 | review.data.format={0},{1},{2}
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/src/labs/pm/data/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/src/labs/pm/data/resources_es_US.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Precio: {1}, Clasificaci\u00f3n {2}, Cons\u00famase antes de: {3}
17 | review=Revisar: {0}\t{1}
18 | no.reviews=No revisado
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/src/labs/pm/data/resources_fr_CA.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/src/labs/pm/data/resources_fr_FR.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/src/labs/pm/data/resources_nl_NL.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prijs: {1}, Beoordeling {2}, Tenminste houdbaar tot: {3}
17 | review=Beoordeling: {0}\t{1}
18 | no.reviews=Niet beoordeeld
--------------------------------------------------------------------------------
/labs/practice12/ProductManagement/src/labs/pm/data/resources_ru_RU.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, \u0446\u0435\u043d\u0430: {1}, \u0420\u0435\u0439\u0442\u0438\u043d\u0433 {2}, \u0423\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u044c \u0434\u043e: {3}
17 | review=\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435: {0}\t{1}
18 | no.reviews=Ne provereno
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice13/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=false
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Product.java
7 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Review.java
8 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/config.properties
9 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/ProductManager.java
10 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/src/labs/pm/data/ProductManagerException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public class ProductManagerException extends Exception {
24 |
25 | public ProductManagerException() {
26 | super();
27 | }
28 |
29 | public ProductManagerException(String message) {
30 | super(message);
31 | }
32 |
33 |
34 | public ProductManagerException(String message, Throwable cause) {
35 | super(message, cause);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/src/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/src/labs/pm/data/config.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 | #Product and review data formats
16 | product.data.format={0},{1},{2},{3},{4},{5}
17 | #review.data.format={0},{1},{2}
18 | review.data.format={0},{1}
19 | #Folders
20 | reports.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/reports
21 | data.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/data
22 | temp.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/temp
23 | #File name Formats
24 | report.file=product{0}report.txt
25 | product.data.file=product{0}.csv
26 | reviews.data.file=reviews{0}.csv
27 | temp.file={0}.tmp
28 |
29 |
30 |
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/src/labs/pm/data/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/src/labs/pm/data/resources_es_US.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Precio: {1}, Clasificaci\u00f3n {2}, Cons\u00famase antes de: {3}
17 | review=Revisar: {0}\t{1}
18 | no.reviews=No revisado
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/src/labs/pm/data/resources_fr_CA.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/src/labs/pm/data/resources_fr_FR.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/src/labs/pm/data/resources_nl_NL.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prijs: {1}, Beoordeling {2}, Tenminste houdbaar tot: {3}
17 | review=Beoordeling: {0}\t{1}
18 | no.reviews=Niet beoordeeld
--------------------------------------------------------------------------------
/labs/practice13/ProductManagement/src/labs/pm/data/resources_ru_RU.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, \u0446\u0435\u043d\u0430: {1}, \u0420\u0435\u0439\u0442\u0438\u043d\u0433 {2}, \u0423\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u044c \u0434\u043e: {3}
17 | review=\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435: {0}\t{1}
18 | no.reviews=Ne provereno
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice14/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=false
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Product.java
7 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Review.java
8 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/config.properties
9 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/ProductManager.java
10 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/src/labs/pm/data/ProductManagerException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public class ProductManagerException extends Exception {
24 |
25 | public ProductManagerException() {
26 | super();
27 | }
28 |
29 | public ProductManagerException(String message) {
30 | super(message);
31 | }
32 |
33 |
34 | public ProductManagerException(String message, Throwable cause) {
35 | super(message, cause);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/src/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/src/labs/pm/data/config.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 | #Product and review data formats
16 | product.data.format={0},{1},{2},{3},{4},{5}
17 | #review.data.format={0},{1},{2}
18 | review.data.format={0},{1}
19 | #Folders
20 | reports.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/reports
21 | data.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/data
22 | temp.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/temp
23 | #File name Formats
24 | report.file=product{0}report{1}.txt
25 | product.data.file=product{0}.csv
26 | reviews.data.file=reviews{0}.csv
27 | temp.file={0}.tmp
28 |
29 |
30 |
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/src/labs/pm/data/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/src/labs/pm/data/resources_es_US.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Precio: {1}, Clasificaci\u00f3n {2}, Cons\u00famase antes de: {3}
17 | review=Revisar: {0}\t{1}
18 | no.reviews=No revisado
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/src/labs/pm/data/resources_fr_CA.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/src/labs/pm/data/resources_fr_FR.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/src/labs/pm/data/resources_nl_NL.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prijs: {1}, Beoordeling {2}, Tenminste houdbaar tot: {3}
17 | review=Beoordeling: {0}\t{1}
18 | no.reviews=Niet beoordeeld
--------------------------------------------------------------------------------
/labs/practice14/ProductManagement/src/labs/pm/data/resources_ru_RU.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, \u0446\u0435\u043d\u0430: {1}, \u0420\u0435\u0439\u0442\u0438\u043d\u0433 {2}, \u0423\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u044c \u0434\u043e: {3}
17 | review=\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435: {0}\t{1}
18 | no.reviews=Ne provereno
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15A/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=true
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/ou25th-java11-labs/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/src/labs/pm/data/ProductManagerException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public class ProductManagerException extends Exception {
24 |
25 | public ProductManagerException() {
26 | super();
27 | }
28 |
29 | public ProductManagerException(String message) {
30 | super(message);
31 | }
32 |
33 |
34 | public ProductManagerException(String message, Throwable cause) {
35 | super(message, cause);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/src/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/src/labs/pm/data/config.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 | #Product and review data formats
16 | product.data.format={0},{1},{2},{3},{4},{5}
17 | #review.data.format={0},{1},{2}
18 | review.data.format={0},{1}
19 | #Folders
20 | reports.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/reports
21 | data.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/data
22 | temp.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/temp
23 | #File name Formats
24 | report.file=product{0}report{1}.txt
25 | product.data.file=product{0}.csv
26 | reviews.data.file=reviews{0}.csv
27 | temp.file={0}.tmp
28 |
29 |
30 |
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/src/labs/pm/data/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/src/labs/pm/data/resources_es_US.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Precio: {1}, Clasificaci\u00f3n {2}, Cons\u00famase antes de: {3}
17 | review=Revisar: {0}\t{1}
18 | no.reviews=No revisado
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/src/labs/pm/data/resources_fr_CA.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/src/labs/pm/data/resources_fr_FR.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/src/labs/pm/data/resources_nl_NL.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prijs: {1}, Beoordeling {2}, Tenminste houdbaar tot: {3}
17 | review=Beoordeling: {0}\t{1}
18 | no.reviews=Niet beoordeeld
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/src/labs/pm/data/resources_ru_RU.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, \u0446\u0435\u043d\u0430: {1}, \u0420\u0435\u0439\u0442\u0438\u043d\u0433 {2}, \u0423\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u044c \u0434\u043e: {3}
17 | review=\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435: {0}\t{1}
18 | no.reviews=Ne provereno
--------------------------------------------------------------------------------
/labs/practice15A/ProductManagement/src/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | module labs.pm {
19 | requires java.logging;
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-refactored/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=true
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/ou25th-java11-labs/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/src/labs/client/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
19 | report=/home/redhat/git/makker/ou25th-java11-labs/labs/reports/product{0}report.txt
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/src/labs/client/resources_es_US.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Precio: {1}, Clasificaci\u00f3n {2}, Cons\u00famase antes de: {3}
17 | review=Revisar: {0}\t{1}
18 | no.reviews=No revisado
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/src/labs/client/resources_fr_CA.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/src/labs/client/resources_fr_FR.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/src/labs/client/resources_nl_NL.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prijs: {1}, Beoordeling {2}, Tenminste houdbaar tot: {3}
17 | review=Beoordeling: {0}\t{1}
18 | no.reviews=Niet beoordeeld
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/src/labs/client/resources_ru_RU.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, \u0446\u0435\u043d\u0430: {1}, \u0420\u0435\u0439\u0442\u0438\u043d\u0433 {2}, \u0423\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u044c \u0434\u043e: {3}
17 | review=\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435: {0}\t{1}
18 | no.reviews=Ne provereno
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/src/labs/file/service/config.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 | #Product and review data formats
16 | product.data.format={0},{1},{2},{3},{4},{5}
17 | #review.data.format={0},{1},{2}
18 | review.data.format={0},{1}
19 | #Folders
20 | reports.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/reports
21 | data.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/data
22 | temp.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/temp
23 | #File name Formats
24 | report.file=product{0}report{1}.txt
25 | product.data.file=product{0}.csv
26 | reviews.data.file=reviews{0}.csv
27 | temp.file={0}.tmp
28 |
29 |
30 |
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/src/labs/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | module labs.pm {
19 | requires java.logging;
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/src/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice15B-refactored/ProductManagement/src/labs/pm/service/ProductManagerException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.service;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public class ProductManagerException extends Exception {
24 |
25 | public ProductManagerException() {
26 | super();
27 | }
28 |
29 | public ProductManagerException(String message) {
30 | super(message);
31 | }
32 |
33 |
34 | public ProductManagerException(String message, Throwable cause) {
35 | super(message, cause);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/bin/java:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/bin/java
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/bin/keytool:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/bin/keytool
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/bin/shop:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | JLINK_VM_OPTIONS=
3 | DIR=`dirname $0`
4 | $DIR/java $JLINK_VM_OPTIONS -m labs.client/labs.client.Shop $@
5 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/conf/security/policy/limited/default_US_export.policy:
--------------------------------------------------------------------------------
1 | // Default US Export policy file.
2 |
3 | grant {
4 | // There is no restriction to any algorithms.
5 | permission javax.crypto.CryptoAllPermission;
6 | };
7 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/conf/security/policy/limited/default_local.policy:
--------------------------------------------------------------------------------
1 | // Some countries have import limits on crypto strength. This policy file
2 | // is worldwide importable.
3 |
4 | grant {
5 | permission javax.crypto.CryptoPermission "DES", 64;
6 | permission javax.crypto.CryptoPermission "DESede", *;
7 | permission javax.crypto.CryptoPermission "RC2", 128,
8 | "javax.crypto.spec.RC2ParameterSpec", 128;
9 | permission javax.crypto.CryptoPermission "RC4", 128;
10 | permission javax.crypto.CryptoPermission "RC5", 128,
11 | "javax.crypto.spec.RC5ParameterSpec", *, 12, *;
12 | permission javax.crypto.CryptoPermission "RSA", *;
13 | permission javax.crypto.CryptoPermission *, 128;
14 | };
15 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/conf/security/policy/limited/exempt_local.policy:
--------------------------------------------------------------------------------
1 | // Some countries have import limits on crypto strength, but may allow for
2 | // these exemptions if the exemption mechanism is used.
3 |
4 | grant {
5 | // There is no restriction to any algorithms if KeyRecovery is enforced.
6 | permission javax.crypto.CryptoPermission *, "KeyRecovery";
7 |
8 | // There is no restriction to any algorithms if KeyEscrow is enforced.
9 | permission javax.crypto.CryptoPermission *, "KeyEscrow";
10 |
11 | // There is no restriction to any algorithms if KeyWeakening is enforced.
12 | permission javax.crypto.CryptoPermission *, "KeyWeakening";
13 | };
14 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/conf/security/policy/unlimited/default_US_export.policy:
--------------------------------------------------------------------------------
1 | // Default US Export policy file.
2 |
3 | grant {
4 | // There is no restriction to any algorithms.
5 | permission javax.crypto.CryptoAllPermission;
6 | };
7 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/conf/security/policy/unlimited/default_local.policy:
--------------------------------------------------------------------------------
1 | // Country-specific policy file for countries with no limits on crypto strength.
2 |
3 | grant {
4 | // There is no restriction to any algorithms.
5 | permission javax.crypto.CryptoAllPermission;
6 | };
7 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/include/linux/jni_md.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
3 | * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4 | *
5 | *
6 | *
7 | *
8 | *
9 | *
10 | *
11 | *
12 | *
13 | *
14 | *
15 | *
16 | *
17 | *
18 | *
19 | *
20 | *
21 | *
22 | *
23 | *
24 | */
25 |
26 | #ifndef _JAVASOFT_JNI_MD_H_
27 | #define _JAVASOFT_JNI_MD_H_
28 |
29 | #ifndef __has_attribute
30 | #define __has_attribute(x) 0
31 | #endif
32 | #if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility)
33 | #ifdef ARM
34 | #define JNIEXPORT __attribute__((externally_visible,visibility("default")))
35 | #define JNIIMPORT __attribute__((externally_visible,visibility("default")))
36 | #else
37 | #define JNIEXPORT __attribute__((visibility("default")))
38 | #define JNIIMPORT __attribute__((visibility("default")))
39 | #endif
40 | #else
41 | #define JNIEXPORT
42 | #define JNIIMPORT
43 | #endif
44 |
45 | #define JNICALL
46 |
47 | typedef int jint;
48 | #ifdef _LP64
49 | typedef long jlong;
50 | #else
51 | typedef long long jlong;
52 | #endif
53 |
54 | typedef signed char jbyte;
55 |
56 | #endif /* !_JAVASOFT_JNI_MD_H_ */
57 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/legal/java.base/COPYRIGHT:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/legal/java.base/COPYRIGHT
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/legal/java.base/LICENSE:
--------------------------------------------------------------------------------
1 | Please refer to https://java.com/otnlicense
2 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/legal/java.logging/COPYRIGHT:
--------------------------------------------------------------------------------
1 | ../java.base/COPYRIGHT
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/legal/java.logging/LICENSE:
--------------------------------------------------------------------------------
1 | ../java.base/LICENSE
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/jexec:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/jexec
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/jli/libjli.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/jli/libjli.so
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/jspawnhelper:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/jspawnhelper
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/jvm.cfg:
--------------------------------------------------------------------------------
1 | -server KNOWN
2 | -client IGNORE
3 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libjava.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libjava.so
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libjimage.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libjimage.so
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libjsig.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libjsig.so
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libnet.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libnet.so
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libnio.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libnio.so
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libverify.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libverify.so
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libzip.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/libzip.so
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/modules:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/modules
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/security/cacerts:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/security/cacerts
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/security/public_suffix_list.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/security/public_suffix_list.dat
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/server/Xusage.txt:
--------------------------------------------------------------------------------
1 | -Xmixed mixed mode execution (default)
2 | -Xint interpreted mode execution only
3 | -Xbootclasspath:
4 | set search path for bootstrap classes and resources
5 | -Xbootclasspath/a:
6 | append to end of bootstrap class path
7 | -Xbootclasspath/p:
8 | prepend in front of bootstrap class path
9 | -Xnoclassgc disable class garbage collection
10 | -Xlog: control JVM logging, use -Xlog:help for details
11 | -Xbatch disable background compilation
12 | -Xms set initial Java heap size
13 | -Xmx set maximum Java heap size
14 | -Xss set java thread stack size
15 | -Xfuture enable strictest checks, anticipating future default
16 | -Xrs reduce use of OS signals by Java/VM (see documentation)
17 | -Xcheck:jni perform additional checks for JNI functions
18 | -Xshare:off do not attempt to use shared class data
19 | -Xshare:auto use shared class data if possible (default)
20 | -Xshare:on require using shared class data, otherwise fail.
21 |
22 | The -X options are non-standard and subject to change without notice.
23 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/server/libjsig.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/server/libjsig.so
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/server/libjvm.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/server/libjvm.so
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/tzdb.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/lib/tzdb.dat
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/dist/jlink/ProductManagement/release:
--------------------------------------------------------------------------------
1 | JAVA_VERSION="11.0.10"
2 | MODULES="java.base java.logging labs.pm labs.client labs.file"
3 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d81475e1
2 | build.xml.script.CRC32=5bda8fc4
3 | build.xml.stylesheet.CRC32=32069288@1.9
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d81475e1
7 | nbproject/build-impl.xml.script.CRC32=ec369f53
8 | nbproject/build-impl.xml.stylesheet.CRC32=496e4d3b@1.9
9 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice15B-solution/modules/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=true
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2semodule
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.client/classes/labs/client/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
19 | report=/home/redhat/git/makker/ou25th-java11-labs/labs/reports/product{0}report.txt
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.client/classes/labs/client/resources_es_US.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Precio: {1}, Clasificaci\u00f3n {2}, Cons\u00famase antes de: {3}
17 | review=Revisar: {0}\t{1}
18 | no.reviews=No revisado
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.client/classes/labs/client/resources_fr_CA.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.client/classes/labs/client/resources_fr_FR.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.client/classes/labs/client/resources_nl_NL.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prijs: {1}, Beoordeling {2}, Tenminste houdbaar tot: {3}
17 | review=Beoordeling: {0}\t{1}
18 | no.reviews=Niet beoordeeld
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.client/classes/labs/client/resources_ru_RU.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, \u0446\u0435\u043d\u0430: {1}, \u0420\u0435\u0439\u0442\u0438\u043d\u0433 {2}, \u0423\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u044c \u0434\u043e: {3}
17 | review=\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435: {0}\t{1}
18 | no.reviews=Ne provereno
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.client/classes/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | module labs.client {
19 | requires java.logging;
20 | requires labs.pm;
21 | uses labs.pm.service.ProductManager;
22 | }
23 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.file/classes/labs/file/service/config.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 | #Product and review data formats
16 | product.data.format={0},{1},{2},{3},{4},{5}
17 | #review.data.format={0},{1},{2}
18 | review.data.format={0},{1}
19 | #Folders
20 | reports.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/reports
21 | data.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/data
22 | temp.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/temp
23 | #File name Formats
24 | report.file=product{0}report{1}.txt
25 | product.data.file=product{0}.csv
26 | reviews.data.file=reviews{0}.csv
27 | temp.file={0}.tmp
28 |
29 |
30 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.file/classes/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | module labs.file {
19 | requires java.logging;
20 | requires labs.pm;
21 | provides labs.pm.service.ProductManager with labs.file.service.ProductFileManager;
22 | }
23 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.pm/classes/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.pm/classes/labs/pm/service/ProductManagerException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.service;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public class ProductManagerException extends Exception {
24 |
25 | public ProductManagerException() {
26 | super();
27 | }
28 |
29 | public ProductManagerException(String message) {
30 | super(message);
31 | }
32 |
33 |
34 | public ProductManagerException(String message, Throwable cause) {
35 | super(message, cause);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/labs/practice15B-solution/modules/ProductManagement/src/labs.pm/classes/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | module labs.pm {
19 | exports labs.pm.service;
20 | exports labs.pm.data;
21 | }
22 |
--------------------------------------------------------------------------------
/labs/practice2/script1.txt:
--------------------------------------------------------------------------------
1 | char someChar = 'Q';
2 | if (someChar >= 'a' && someChar <= 'z') {
3 | someChar -= 32;
4 | } else {
5 | if (someChar >= 'A' && someChar <= 'Z') {
6 | someChar += 32;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/labs/practice2/script2.txt:
--------------------------------------------------------------------------------
1 | //int period = 1;
2 | //int period = 3;
3 | int period = 4;
4 | float amount = 10;
5 | float rate = 0.05F;
6 |
7 | switch (period) {
8 | case 4:
9 | amount += amount * 0.2F;
10 | break;
11 | case 3:
12 | amount += amount * rate;
13 | case 2:
14 | amount += amount * rate;
15 | case 1:
16 | amount += amount * rate;
17 | }
18 |
--------------------------------------------------------------------------------
/labs/practice3/messages.properties:
--------------------------------------------------------------------------------
1 | offer={0}, price: {1} (applied {2} discount), valid until {3}
2 | dateFormat = EE', 'd' of 'MMMM yyyy' at 'HH:mm z
3 |
--------------------------------------------------------------------------------
/labs/practice3/messages_ru_RU.properties:
--------------------------------------------------------------------------------
1 | offer={0}, цена: {1} (применять {2} скидка), действительна до {3}
2 | dateFormat = EE', 'd MMMM yyyy' в 'HH:mm z
3 |
--------------------------------------------------------------------------------
/labs/practice4/ProductManagement/dist/javadoc/allclasses.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | All Classes
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/labs/practice5/ProductManagement/dist/javadoc/package-search-index.js:
--------------------------------------------------------------------------------
1 | packageSearchIndex = [{"l":"All Packages","url":"allpackages-index.html"},{"l":"labs.pm.app"},{"l":"labs.pm.data"}]
--------------------------------------------------------------------------------
/labs/practice5/ProductManagement/dist/javadoc/resources/glass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice5/ProductManagement/dist/javadoc/resources/glass.png
--------------------------------------------------------------------------------
/labs/practice5/ProductManagement/dist/javadoc/resources/x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice5/ProductManagement/dist/javadoc/resources/x.png
--------------------------------------------------------------------------------
/labs/practice5/ProductManagement/dist/javadoc/type-search-index.js:
--------------------------------------------------------------------------------
1 | typeSearchIndex = [{"l":"All Classes","url":"allclasses-index.html"},{"p":"labs.pm.data","l":"Product"},{"p":"labs.pm.app","l":"Shop"}]
--------------------------------------------------------------------------------
/labs/practice5/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice5/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice5/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice5/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice5/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=false
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice5/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Product.java
7 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Rating.java
8 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/labs/practice5/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice6/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice6/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice6/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice6/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice6/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=false
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice6/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Product.java
7 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Rating.java
8 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Food.java
9 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/ProductManager.java
10 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
11 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Drink.java
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/labs/practice6/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice6/ProductManagement/src/labs/pm/data/ProductManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | import java.math.BigDecimal;
20 | import java.time.LocalDate;
21 |
22 | /**
23 | *
24 | * @author redhat
25 | */
26 | public class ProductManager {
27 |
28 | public Product createProduct(int id, String name, BigDecimal price, Rating rating, LocalDate bestBefore) {
29 | return new Food(id, name, price, rating, bestBefore);
30 | }
31 |
32 | public Product createProduct(int id, String name, BigDecimal price, Rating rating) {
33 | return new Drink(id, name, price, rating);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/labs/practice7/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice7/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice7/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice7/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice7/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=false
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice7/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Product.java
7 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Rating.java
8 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Food.java
9 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/ProductManager.java
10 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
11 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Drink.java
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/labs/practice7/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice7/ProductManagement/src/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice7/ProductManagement/src/labs/pm/data/Review.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public class Review {
24 |
25 | private Rating rating;
26 | private String comments;
27 |
28 | public Review(Rating rating, String comments) {
29 | this.rating = rating;
30 | this.comments = comments;
31 | }
32 |
33 | public Rating getRating() {
34 | return rating;
35 | }
36 |
37 | public String getComments() {
38 | return comments;
39 | }
40 |
41 | @Override
42 | public String toString() {
43 | return "Review{" + "rating=" + rating + ", comments=" + comments + '}';
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/labs/practice7/ProductManagement/src/labs/pm/data/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
--------------------------------------------------------------------------------
/labs/practice8/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice8/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice8/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice8/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice8/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=false
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice8/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Product.java
7 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Rating.java
8 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Food.java
9 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/ProductManager.java
10 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
11 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Drink.java
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/labs/practice8/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice8/ProductManagement/src/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice8/ProductManagement/src/labs/pm/data/Review.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public class Review {
24 |
25 | private Rating rating;
26 | private String comments;
27 |
28 | public Review(Rating rating, String comments) {
29 | this.rating = rating;
30 | this.comments = comments;
31 | }
32 |
33 | public Rating getRating() {
34 | return rating;
35 | }
36 |
37 | public String getComments() {
38 | return comments;
39 | }
40 |
41 | @Override
42 | public String toString() {
43 | return "Review{" + "rating=" + rating + ", comments=" + comments + '}';
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/labs/practice8/ProductManagement/src/labs/pm/data/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
--------------------------------------------------------------------------------
/labs/practice9/ProductManagement/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/practice9/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d066806a
2 | build.xml.script.CRC32=19380c7f
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d066806a
7 | nbproject/build-impl.xml.script.CRC32=b36e3910
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/practice9/ProductManagement/nbproject/private/config.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makker-nl/ou25th-java11-labs/42ff2401e9a617cb9d0653754ebeed1079c2eb0d/labs/practice9/ProductManagement/nbproject/private/config.properties
--------------------------------------------------------------------------------
/labs/practice9/ProductManagement/nbproject/private/private.properties:
--------------------------------------------------------------------------------
1 | compile.on.save=true
2 | do.depend=false
3 | do.jar=true
4 | do.jlink=false
5 | javac.debug=true
6 | javadoc.preview=true
7 | jlink.strip=false
8 | user.properties.file=/home/redhat/.netbeans/11.3/build.properties
9 |
--------------------------------------------------------------------------------
/labs/practice9/ProductManagement/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Product.java
7 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Rating.java
8 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Food.java
9 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/ProductManager.java
10 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/app/Shop.java
11 | file:/home/redhat/git/makker/java11/labs/practices/ProductManagement/src/labs/pm/data/Drink.java
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/labs/practice9/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practice9/ProductManagement/src/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practice9/ProductManagement/src/labs/pm/data/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=d81475e1
2 | build.xml.script.CRC32=5bda8fc4
3 | build.xml.stylesheet.CRC32=32069288@1.9
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=d81475e1
7 | nbproject/build-impl.xml.script.CRC32=ec369f53
8 | nbproject/build-impl.xml.stylesheet.CRC32=496e4d3b@1.9
9 |
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2semodule
4 |
5 |
6 | ProductManagement
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.client/classes/labs/client/resources.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Price: {1}, Rating {2}, Best Before: {3}
17 | review=Review: {0}\t{1}
18 | no.reviews=Not reviewed
19 | report=/home/redhat/git/makker/ou25th-java11-labs/labs/reports/product{0}report.txt
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.client/classes/labs/client/resources_es_US.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Precio: {1}, Clasificaci\u00f3n {2}, Cons\u00famase antes de: {3}
17 | review=Revisar: {0}\t{1}
18 | no.reviews=No revisado
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.client/classes/labs/client/resources_fr_CA.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.client/classes/labs/client/resources_fr_FR.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prix: {1}, Notation {2}, \u00c0 consommer de pr\u00e9f\u00e9rence avant: {3}
17 | review=Revue: {0}\t{1}
18 | no.reviews=Pas r\u00e9vis\u00e9
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.client/classes/labs/client/resources_nl_NL.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, Prijs: {1}, Beoordeling {2}, Tenminste houdbaar tot: {3}
17 | review=Beoordeling: {0}\t{1}
18 | no.reviews=Niet beoordeeld
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.client/classes/labs/client/resources_ru_RU.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | product={0}, \u0446\u0435\u043d\u0430: {1}, \u0420\u0435\u0439\u0442\u0438\u043d\u0433 {2}, \u0423\u043f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u044c \u0434\u043e: {3}
17 | review=\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435: {0}\t{1}
18 | no.reviews=Ne provereno
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.client/classes/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | module labs.client {
19 | requires java.logging;
20 | requires labs.pm;
21 | uses labs.pm.service.ProductManager;
22 | }
23 |
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.file/classes/labs/file/service/config.properties:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2021 redhat
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 3 of the License, or
6 | # (at your option) any later version.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 | #Product and review data formats
16 | product.data.format={0},{1},{2},{3},{4},{5}
17 | #review.data.format={0},{1},{2}
18 | review.data.format={0},{1}
19 | #Folders
20 | reports.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/reports
21 | data.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/data
22 | temp.folder=/home/redhat/git/makker/ou25th-java11-labs/labs/temp
23 | #File name Formats
24 | report.file=product{0}report{1}.txt
25 | product.data.file=product{0}.csv
26 | reviews.data.file=reviews{0}.csv
27 | temp.file={0}.tmp
28 |
29 |
30 |
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.file/classes/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | module labs.file {
19 | requires java.logging;
20 | requires labs.pm;
21 | provides labs.pm.service.ProductManager with labs.file.service.ProductFileManager;
22 | }
23 |
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.pm/classes/labs/pm/data/Rateable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.data;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | @FunctionalInterface
24 | public interface Rateable {
25 |
26 | public static final Rating DEFAULT_RATING = Rating.NOT_RATED;
27 |
28 | public abstract T applyRating(Rating rating);
29 |
30 | public default T applyRating(int stars) {
31 | return applyRating(convert(stars));
32 | }
33 |
34 | public default Rating getRating() {
35 | return DEFAULT_RATING;
36 | }
37 |
38 | public static Rating convert(int stars) {
39 | return (stars >= 0 && stars <= 5) ? Rating.values()[stars] : DEFAULT_RATING;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.pm/classes/labs/pm/service/ProductManagerException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 | package labs.pm.service;
18 |
19 | /**
20 | *
21 | * @author redhat
22 | */
23 | public class ProductManagerException extends Exception {
24 |
25 | public ProductManagerException() {
26 | super();
27 | }
28 |
29 | public ProductManagerException(String message) {
30 | super(message);
31 | }
32 |
33 |
34 | public ProductManagerException(String message, Throwable cause) {
35 | super(message, cause);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/labs/practices/modules/ProductManagement/src/labs.pm/classes/module-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2021 redhat
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | module labs.pm {
19 | exports labs.pm.service;
20 | exports labs.pm.data;
21 | }
22 |
--------------------------------------------------------------------------------
/labs/prepJavaSECertification/MethodsInInterfaces/manifest.mf:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | X-COMMENT: Main-Class will be added automatically by build
3 |
4 |
--------------------------------------------------------------------------------
/labs/prepJavaSECertification/MethodsInInterfaces/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=4b729414
2 | build.xml.script.CRC32=c8057e2e
3 | build.xml.stylesheet.CRC32=f85dc8f2@1.94.0.48
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=4b729414
7 | nbproject/build-impl.xml.script.CRC32=071a12d4
8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.94.0.48
9 |
--------------------------------------------------------------------------------
/labs/prepJavaSECertification/MethodsInInterfaces/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | MethodsInInterfaces
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/labs/prepJavaSECertification/MethodsInInterfaces/src/methodsininterfaces/colors/Black.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 | package methodsininterfaces.colors;
7 |
8 | /**
9 | *
10 | * @author redhat
11 | */
12 | public interface Black {
13 | default void getColor(){
14 | System.out.print("Black");
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/labs/prepJavaSECertification/MethodsInInterfaces/src/methodsininterfaces/colors/Gold.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 | package methodsininterfaces.colors;
7 |
8 | /**
9 | *
10 | * @author redhat
11 | */
12 | public interface Gold {
13 | static void getColor(){
14 | System.out.print("Gold");
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/labs/prepJavaSECertification/MethodsInInterfaces/src/methodsininterfaces/colors/Red.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this license header, choose License Headers in Project Properties.
3 | * To change this template file, choose Tools | Templates
4 | * and open the template in the editor.
5 | */
6 | package methodsininterfaces.colors;
7 |
8 | /**
9 | *
10 | * @author redhat
11 | */
12 | public interface Red extends Black {
13 | default void getColor(){
14 | System.out.print("Red");
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/labs/reports/product101report.txt:
--------------------------------------------------------------------------------
1 | English Breakfast Tea, Price: £1.99, Rating ★★★★☆, Best Before: 4/10/21
2 | Review: ★★★★★ This is the best one I ever had
3 | Review: ★★★★☆ I liked it
4 | Review: ★★★★☆ Good choice
5 | Review: ★★★☆☆ Could have been better
6 | Review: ★★☆☆☆ Very small - expected more
7 | re
8 |
--------------------------------------------------------------------------------
/labs/scripts/generate-data.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #products
3 | for i in $(seq 101 164); do P=("F" "D") && N=("ICECREAM" "SHAKE") && echo "${P[0+$RANDOM%2]},$i,${N[0+$RANDOM%2]}_$i,$((1+$RANDOM%10)).99,$((1+$RANDOM%5)),2022-01-01" > product$i.csv; done
4 | #reviews
5 | for i in $(seq 101 164); do for n in $(seq 1 $((1+$RANDOM%5))); do LIST=("Not Bad" "Ok" "Hot" "Good" "Fizzy") && echo "$((1+$RANDOM%5)), ${LIST[0+$RANDOM%5]}" >> reviews$i.csv; done; done
6 |
7 |
--------------------------------------------------------------------------------