njs
zxgwkYM6{lye27H(0NpR49ip$ikNyJ;zr^T1#``b5!sUI8zQW}E=ug~pnSUWB@kg5W
z_-kbMpufhoJ#@+M&F}Rs*M(5DPG}ZAw1=r;1VdCbPE8XW7jO}axP&EKK^`d-kRj=5
zlAOU~suKZ&OgO;@VjYj_Y0D_#3$8!rzXx4IeT>HHBTV%&~3QhhCn=<+t!hUuE8*I38sM2X*;cUVT)D)wbQT<9f6TjU!>x-
z+{WHIKN~VJ%x{zVFgkZt|FZXX5sMy1(l
z)tsWs3FV3wlK$%qracQ2wL)di{1BnFxV+L=MM
zzC!y>G6J`73bYXbCAc0T82*ZZ93^apKoUKWL=Pkz36dHFS&anA
zMT4aJRq;XY6Uc)LK)A|W0V@(DJqWT936hTnNe_ZNC6M9;ApS52EJcEh4uX^-L6)OI
zLR0Ejq(UH@7l80Aaz$3av%z1%qoB%}6SLf{9N9bMh)ArT4n5%TJ7@=w~yKas#PM
z{x|0HzmPn}RQ@NDCz#^_B<*8p%10=1juDr$=#Ta;sl6tg-B7GdFIEPt^zTF94!u$l
MTX@W2?@G+Ie_Nd10RR91
literal 0
HcmV?d00001
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/build/classes/users/UserCollection.class b/OOPClss/2_JavaUserDefinedExceptionSampleApp/build/classes/users/UserCollection.class
new file mode 100644
index 0000000000000000000000000000000000000000..0daf7aa00c728a18f1a9c9230491eace40ac2220
GIT binary patch
literal 882
zcmbVKT~8B16g{(B*bi4ITUtR>gd((ntf)^eAu%MpxPgaC4ZdyLbs4hkCev9H|C29j
zViQUH0sbiCoo!8*ga_lxoqJE_o;l~<`Stt9PXPOPX+wiA@iy!wgt$T050h>vxT+^$MPBeBL!-np
zojI|YB8q9^ks!ua=@MyYU^#o9*o00w{V$4Jgyb|-MyJ0$0=tHBK7#cP_E*@~sGhs7yXZFD#t2K_
zvGVROy6UdEO}9BgzZAqRiVY$L>ZnjQhb3%a8LzN{Hlfb=8Ej*RDhs=KI+3tTr;?!Q
ipH+lnQu2V+Qm2MJc!XJa_79!S8=d<_C&TlC|HU6ES-Zmk
literal 0
HcmV?d00001
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/build/classes/users/UserNotFoundException.class b/OOPClss/2_JavaUserDefinedExceptionSampleApp/build/classes/users/UserNotFoundException.class
new file mode 100644
index 0000000000000000000000000000000000000000..290f8f316e6d8d228a7a42899eb044c390fd15c4
GIT binary patch
literal 691
zcmaKp-A>y;5QWbqkeJ{m!6ZPTv@U-NK_%jrR9t|{Rm2T6Qg14mcoi0f-N;@e9t$LX
zq$2SEJQQNq2`VCp3y*ikv)`FBeti1(0ALGid1MH)r@?v9=mo0VI5d$|-Q7g?LJ<`}
z7;`a>93l5pDrt5I+1h&BfkP-Bod`dPMWli=;cwgKf{RJG+#K}#LWP7Mwbom9bA6;V
zlxsRD63Tw4MeHkWd~qRTvuVL)7gO*Ej?se&36|!@?}y`8&i*3H6=11;5BhV5te3yV#0Ed!Cl0qL-C?@Eaf7+5^zJu~
zMZN=+m{(^06nxHR1{BVhIAdO_My#?7Z>ZJaH}SXe`ZeY*`H+Fd<
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set src.dir
+ Must set test.src.dir
+ Must set build.dir
+ Must set dist.dir
+ Must set build.classes.dir
+ Must set dist.javadoc.dir
+ Must set build.test.classes.dir
+ Must set build.test.results.dir
+ Must set build.classes.excludes
+ Must set dist.jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No tests executed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set JVM to use for profiling in profiler.info.jvm
+ Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
+
+ java -jar "${dist.jar.resolved}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must set fix.includes
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set profile.class
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+ Some tests failed; see details above.
+
+
+
+ Must select some files in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+ Must select one file in the IDE or set test.class
+
+
+
+ Must select one file in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/genfiles.properties b/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/genfiles.properties
new file mode 100644
index 0000000..e7337e3
--- /dev/null
+++ b/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=a03a820a
+build.xml.script.CRC32=02ee4d09
+build.xml.stylesheet.CRC32=f85dc8f2@1.93.0.48
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=a03a820a
+nbproject/build-impl.xml.script.CRC32=92d6f372
+nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/private/config.properties b/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/private/config.properties
new file mode 100644
index 0000000..e69de29
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/private/private.properties b/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/private/private.properties
new file mode 100644
index 0000000..63106a1
--- /dev/null
+++ b/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/private/private.properties
@@ -0,0 +1,6 @@
+compile.on.save=true
+do.depend=false
+do.jar=true
+javac.debug=true
+javadoc.preview=true
+user.properties.file=C:\\Users\\SSE\\AppData\\Roaming\\NetBeans\\11.2\\build.properties
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/private/private.xml b/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/private/private.xml
new file mode 100644
index 0000000..4b5e3c2
--- /dev/null
+++ b/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/private/private.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+ file:/D:/Course%20materials/Spring%2021/CSC2303/0_Units/unit%206_exceptions/group%20activity/skeletons/skeletons/2_JavaUserDefinedExceptionSampleApp/src/tests/Testing.java
+ file:/D:/Course%20materials/Spring%2021/CSC2303/0_Units/unit%206_exceptions/group%20activity/skeletons/skeletons/2_JavaUserDefinedExceptionSampleApp/src/users/UserCollection.java
+
+
+
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/project.properties b/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/project.properties
new file mode 100644
index 0000000..e6bba81
--- /dev/null
+++ b/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/project.properties
@@ -0,0 +1,87 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.processors.list=
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+application.title=JavaUserDefinedExceptionSampleApp
+application.vendor=mourhir
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+ ${run.classpath}
+debug.modulepath=\
+ ${run.modulepath}
+debug.test.classpath=\
+ ${run.test.classpath}
+debug.test.modulepath=\
+ ${run.test.modulepath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/JavaUserDefinedExceptionSampleApp.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+endorsed.classpath=
+excludes=
+includes=**
+jar.compress=true
+javac.classpath=
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.modulepath=
+javac.processormodulepath=
+javac.processorpath=\
+ ${javac.classpath}
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit.classpath}:\
+ ${libs.junit_4.classpath}
+javac.test.modulepath=\
+ ${javac.modulepath}
+javac.test.processorpath=\
+ ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+main.class=users.ProcessLogin
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+mkdist.disabled=false
+platform.active=default_platform
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.modulepath=\
+ ${javac.modulepath}
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+run.test.modulepath=\
+ ${javac.test.modulepath}
+source.encoding=UTF-8
+src.dir=src
+test.src.dir=test
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/project.xml b/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/project.xml
new file mode 100644
index 0000000..f8314ce
--- /dev/null
+++ b/OOPClss/2_JavaUserDefinedExceptionSampleApp/nbproject/project.xml
@@ -0,0 +1,15 @@
+
+
+ org.netbeans.modules.java.j2seproject
+
+
+ JavaUserDefinedExceptionSampleApp
+
+
+
+
+
+
+
+
+
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/tests/Authentication.java b/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/tests/Authentication.java
new file mode 100644
index 0000000..6a07901
--- /dev/null
+++ b/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/tests/Authentication.java
@@ -0,0 +1,97 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package tests;
+
+import java.util.Scanner;
+import users.User;
+import users.UserCollection;
+
+import users.UserNotFoundException;
+
+/**
+ *
+ * @author Administrator
+ */
+public class Authentication {
+
+ private static Scanner sc;
+ private static UserCollection coll;
+
+ public static void main(String[] args) {
+ coll = new UserCollection();
+ sc = new Scanner(System.in);
+
+ loop:
+ while (true) {
+ System.out.print("To register type 1, to login type 2 : ");
+ int choice = sc.nextInt();
+ switch (choice) {
+ //test the registration process
+ case 1:
+ registerNewUser();
+ break;
+
+ //test the process login
+ case 2:
+ processLogin();
+ break;
+ default:
+ break loop;
+ }
+
+ }
+ sc.close();
+ }
+
+ private static void registerNewUser() {
+
+ while (true) {
+ //prompt the user
+ System.out.print("Please provide your first name: ");
+ String fname = sc.next();
+ System.out.print("Please provide your last name: ");
+ String lanme = sc.next();
+ System.out.print("Please choose a user name: ");
+ String uname = sc.next();
+ System.out.print("Please provide a password: ");
+ String pass = sc.next();
+ User u = new User(uname, pass, uname, uname);
+
+ try{
+ if(UserCollection.register(u)){
+ System.out.println("User registered successfully");
+ }
+ }
+ catch(UserExistsException e){
+ System.out.println("Registration Failed Username"+e.getUsername()+": already exists in the system.");
+ }
+
+ }
+
+ }
+
+ private static void processLogin() {
+
+ //prompt the user
+ System.out.print("Please provide a user name : ");
+ String uname = sc.next();
+ System.out.print("Please provide a password : ");
+ String pass = sc.next();
+
+ User u = new User(uname, pass, uname, uname);
+ try{
+ if(UserCollection.login(u)){
+ System.out.println("Successful");
+ }
+ }
+ catch (UserNotFoundException e){
+ System.out.println("Login fialed"+e.getMessage());
+ }
+
+
+ }
+
+}
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/User.java b/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/User.java
new file mode 100644
index 0000000..52edcf9
--- /dev/null
+++ b/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/User.java
@@ -0,0 +1,98 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package users;
+
+/**
+ *
+ * @author mourhir
+ */
+public class User {
+
+ private String uname;
+ private String pass;
+
+ private String FN;
+ private String LN;
+
+ public User( String FN, String LN,String uname, String pass) {
+ this.uname = uname;
+ this.pass = pass;
+ this.FN = FN;
+ this.LN = LN;
+ }
+
+ public User(String uname) {
+ this.uname = uname;
+ }
+
+ /**
+ * @return the uname
+ */
+ public String getUname() {
+ return uname;
+ }
+
+ /**
+ * @param uname the uname to set
+ */
+ public void setUname(String uname) {
+ this.uname = uname;
+ }
+
+ /**
+ * @return the pass
+ */
+ public String getPass() {
+ return pass;
+ }
+
+ /**
+ * @param pass the pass to set
+ */
+ public void setPass(String pass) {
+ this.pass = pass;
+ }
+
+ /**
+ * @return the FN
+ */
+ public String getFN() {
+ return FN;
+ }
+
+ /**
+ * @param FN the FN to set
+ */
+ public void setFN(String FN) {
+ this.FN = FN;
+ }
+
+ /**
+ * @return the LN
+ */
+ public String getLN() {
+ return LN;
+ }
+
+ /**
+ * @param LN the LN to set
+ */
+ public void setLN(String LN) {
+ this.LN = LN;
+ }
+
+ public boolean authenticate(String pass) {
+ return this.pass.equals(pass);
+ }
+
+ @Override
+ public boolean equals(Object obj) {//inherited from java.lang.Object
+ return (obj != null
+ && obj instanceof User
+ && ((User) obj).getUname().equals(this.uname));
+
+ }
+
+}
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/UserCollection.java b/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/UserCollection.java
new file mode 100644
index 0000000..86e362b
--- /dev/null
+++ b/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/UserCollection.java
@@ -0,0 +1,51 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package users;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Scanner;
+
+
+/**
+ *
+ * @author Administrator
+ */
+public class UserCollection {
+
+ public static ArrayList usersList;
+
+ public UserCollection() {
+ usersList = new ArrayList();
+ //hardcoded, should be removed later
+ usersList.add(new User("totoFN", "totoLN", "toto", "toto"));
+ usersList.add(new User("fooFN", "fooLN", "foo", "foo"));
+
+ }
+
+ public static boolean register() {
+ Scanner u = new Scanner(System.in);
+
+ if(UserList.contains(u)){
+ throw UserNotFoundException("User already registerd in the system.");
+ }
+ else{
+ usersList.add(u);
+ return true;
+ }
+ }
+
+ public static boolean login(User theUser) throws UserNotFoundException{
+ for(User user: usersList){
+ if(user.equals(theUser)){
+ return user.authenticate(theUser.getPass());
+ }
+ }
+ throw new UserNotFoundException(theUser.getUname());
+ }
+
+}
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/UserExistsException.java b/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/UserExistsException.java
new file mode 100644
index 0000000..b9a71dd
--- /dev/null
+++ b/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/UserExistsException.java
@@ -0,0 +1,12 @@
+package users;
+
+public class UserExistsException extends Exception{
+ private String username;
+ public UserExistsException(String username){
+ this.username=username;
+ }
+
+ public String getUsername(){
+ return username;
+ }
+}
\ No newline at end of file
diff --git a/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/UserNotFoundException.java b/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/UserNotFoundException.java
new file mode 100644
index 0000000..13ce1e0
--- /dev/null
+++ b/OOPClss/2_JavaUserDefinedExceptionSampleApp/src/users/UserNotFoundException.java
@@ -0,0 +1,25 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package users;
+
+import static users.UserCollection.usersList;
+
+
+public class UserNotFoundException extends Exception {
+
+ private String username;
+
+ public UserNotFoundException(String username) {
+ super("The username :" + username + " does not exist.");
+ this.username = username;
+ }
+
+
+ public String getUname() {
+ return username;
+ }
+
+
+}
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/build.xml b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/build.xml
new file mode 100644
index 0000000..32f38ed
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/build.xml
@@ -0,0 +1,73 @@
+
+
+
+
+
+
+
+
+
+
+ Builds, tests, and runs the project CollectionsSampleApplicationSkeleton.
+
+
+
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/build/built-jar.properties b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/build/built-jar.properties
new file mode 100644
index 0000000..07fa988
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/build/built-jar.properties
@@ -0,0 +1,4 @@
+#Fri, 08 Apr 2016 08:48:38 +0000
+
+
+D\:\\course\ Materials\\Spring16\\CSC2303\\2_Laboratories\\lab9_Collections\ lab\ skeleton\ application\\CollectionsSampleApplicationSkeleton=
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/build/classes/LMS/StudentSystem.class b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/build/classes/LMS/StudentSystem.class
new file mode 100644
index 0000000000000000000000000000000000000000..d91ac2abdf1f48ad0af160242624da9672a35e8a
GIT binary patch
literal 550
zcmZ`#!A`
zk?UQ{w2f?rrOJgWY@q~`(E5K&3kHgW+D4az>Z-N7(UiA>BVJ{JS4>=%Y3$`v-{iN<
zQI{>T&7Uqnuk2{B_${Ph1zYS}%LHtr!chrT)EH6ZGro$vK|Eh0^0HCqq#}0lt9r~b
Y>XbjAJuHxWgRZn`Op=p3p`T}ggK*S8{Qp8lXLs54pwSueEL5ahAF(EPZ0eC3H*{X!Z
za{lh*`|iH)pRWUedrVUdaFJk=;8Gwoa<2p?i=BLzc`Z$quWhSM^&l{)-lTwd5{MtQ
z(RN1Z`esAZyxG!pzR*T3`+cF>7g^MPO;gHxBU|nGQ4H;??p#D?`>iszV}c(Tk*=G*
zE!DGj?(C@Fxh@$_FccX7H&Oblx+-?6w75dRn?MW@BJxv=gfHv6J;anO_Z*0BKOsK+
Yw-GU>42+NwGe1W-#TglIBnBA&0;u0W82|tP
literal 0
HcmV?d00001
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/build/classes/students/StudentCollection.class b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/build/classes/students/StudentCollection.class
new file mode 100644
index 0000000000000000000000000000000000000000..62ea5607cdd2fd46a7492ac69e25a49362aa0910
GIT binary patch
literal 1560
zcma)6-A)rh7(LTM3#BL`R6tZvlr12Q8ug+CV;~xn1}`v}csI058Pe{O-6@85@27Hi~#!#HPSlta~j#(6PW&<3ygx
zT2HG^t)XIF7Z~4H?Lg{Y6rJM}3(FtTnRsi5UV#74#YQzcjb+!Z?CHUP0JurUNQq}=5=jQZiSa`R52ZK9p9dnzNT!>Ddsp~<~KB_$z+5SSPw
zj!X+)TC0)yLHh|AyH9vYW#h{BeO(M$}!#F*~?g{k!
zcmU(07-an8;R#z1%gFHo0fOHMMmZO_%Atr7*JR{a;>ion1~a<$6XJ)3OmHj_3e3=S
z7G(?%aOE8?xI~hRIjyseWm4^6}$cq&j%w0
literal 0
HcmV?d00001
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/dist/CollectionsSampleApplicationSkeleton.jar b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/dist/CollectionsSampleApplicationSkeleton.jar
new file mode 100644
index 0000000000000000000000000000000000000000..54cd0badea5b9a0bdbeaf4d8a81985b598663ac7
GIT binary patch
literal 3551
zcmb_eU2ofD6h2PVCUKkfBc)#};IYxAYm>H&!Dy$UtZPTrq^*>yd|e_Ure2JnuR0dERrdI}n$N
zl0=i+-+V-&D@AcCZ5HmVIK`stb#Y5I0oE$sMR}V_iwhpX4_8OQo&7!*!*k>Sj*NDyO<(
zC>2dnYc;K=s4drOLcOXQ#+g#VucaHcv>Yg`D-G3YxN61F^yZ17H8s-}{_-r7meX<&
zjA-2A2u86~Ug2ei0^6NY1uPdK66~HnXhta
zUcCJ656rI7yi7whouC<+Vl~09k|@4u)ijAli@K@pwVD;pKIFJbG*Pq=;Um@7dF+3TyA9ouC{yGRokI)D
z@g|}x(Ny;H;$!uRx?-qi9YVHl);EMJ)vmL0k7(Knc{V&k
zDUv0c>%YtqN>Eaw@h+4SjRny5D~}Nsx`t2=A;c2QLJe;N;$6o7Fh(nQN_Y<5dPdSO
zc!|*n{)fcJQA*=|#1o(^G>TD*#%LU0Sa}IID|ad8LW&4BWgwJ9DYm^{ha0|zf2Y`|
z&uHLRinDJid^%E7rc=&2|(L~oq#U?tJ{1HF-e%h0iLIR_!>7COU*2JNSfd>c0+YqwL0mNQI
zir@*O9=YYLdAS`Hv2N!!jqI{IXE;V<=Oh00KhM9P!6xEcfj|^vP=S%yuW;;_6O>C(
z9>CgqSd&*nf;fu0<03SvvR*e;w`C(eHzL#bx?_3&6&3p>d?JIDec0HJ*=`(*pJ7w6
z1anGzfo<{t#x^&qu-R>g31-OARJ+=cC}C=+tPhWM&GjvP
zthQN5)l*LDnG%AqkLI5I9(x%Z9Ns%pF(rjA7Th
zmd6khO}6F2+#f0GDL)jUn($a%l=lU!eo>(_$8w=#6Nvgu2qFy%{WfM;CPd;~=zNxP
z0~805GO2eL`xw-iDc-}AWn%+B^1mQ=k0xe>=9D)JR%e=EiE*$xJI&xYxXi}4Bv+$IMaI0J%1@ghfF
z^{^s4dKy;qo9Oc{qiwYB6U+R`2kFyIxT%f;h&D`tkt7!Gcqfz7KC`?dJZdA_0t7a`
dME?=B5h6d)<{#`1GI1gAN%{}K|Kd`l{{g5|!3Y2V
literal 0
HcmV?d00001
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/dist/README.TXT b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/dist/README.TXT
new file mode 100644
index 0000000..fa93c8e
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/dist/README.TXT
@@ -0,0 +1,32 @@
+========================
+BUILD OUTPUT DESCRIPTION
+========================
+
+When you build an Java application project that has a main class, the IDE
+automatically copies all of the JAR
+files on the projects classpath to your projects dist/lib folder. The IDE
+also adds each of the JAR files to the Class-Path element in the application
+JAR files manifest file (MANIFEST.MF).
+
+To run the project from the command line, go to the dist folder and
+type the following:
+
+java -jar "CollectionsSampleApplicationSkeleton.jar"
+
+To distribute this project, zip up the dist folder (including the lib folder)
+and distribute the ZIP file.
+
+Notes:
+
+* If two JAR files on the project classpath have the same name, only the first
+JAR file is copied to the lib folder.
+* Only JAR files are copied to the lib folder.
+If the classpath contains other types of files or folders, these files (folders)
+are not copied.
+* If a library on the projects classpath also has a Class-Path element
+specified in the manifest,the content of the Class-Path element has to be on
+the projects runtime path.
+* To set a main class in a standard Java project, right-click the project node
+in the Projects window and choose Properties. Then click Run and enter the
+class name in the Main Class field. Alternatively, you can manually type the
+class name in the manifest Main-Class element.
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/manifest.mf b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/manifest.mf
new file mode 100644
index 0000000..328e8e5
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/manifest.mf
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/build-impl.xml b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/build-impl.xml
new file mode 100644
index 0000000..56e15f4
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/build-impl.xml
@@ -0,0 +1,1419 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set src.dir
+ Must set test.src.dir
+ Must set build.dir
+ Must set dist.dir
+ Must set build.classes.dir
+ Must set dist.javadoc.dir
+ Must set build.test.classes.dir
+ Must set build.test.results.dir
+ Must set build.classes.excludes
+ Must set dist.jar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No tests executed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set JVM to use for profiling in profiler.info.jvm
+ Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
+
+ java -jar "${dist.jar.resolved}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+
+ Must set fix.includes
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set profile.class
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+ Some tests failed; see details above.
+
+
+
+ Must select some files in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+ Some tests failed; see details above.
+
+
+
+
+ Must select one file in the IDE or set test.class
+
+
+
+ Must select one file in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/genfiles.properties b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/genfiles.properties
new file mode 100644
index 0000000..ea0d743
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/genfiles.properties
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=b5adcbc2
+build.xml.script.CRC32=98bf525b
+build.xml.stylesheet.CRC32=8064a381@1.79.1.48
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=b5adcbc2
+nbproject/build-impl.xml.script.CRC32=8756d95a
+nbproject/build-impl.xml.stylesheet.CRC32=05530350@1.79.1.48
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/private/private.properties b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/private/private.properties
new file mode 100644
index 0000000..18cf70f
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/private/private.properties
@@ -0,0 +1,2 @@
+compile.on.save=true
+user.properties.file=C:\\Users\\Administrator\\AppData\\Roaming\\NetBeans\\8.1\\build.properties
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/private/private.xml b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/private/private.xml
new file mode 100644
index 0000000..807fc81
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/private/private.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+ file:/D:/course%20Materials/Spring16/CSC2303/2_Laboratories/lab9_Collections%20lab%20skeleton%20application/CollectionsSampleApplicationSkeleton/src/students/StudentCollection.java
+ file:/D:/course%20Materials/Spring16/CSC2303/2_Laboratories/lab9_Collections%20lab%20skeleton%20application/CollectionsSampleApplicationSkeleton/src/LMS/StudentSystem.java
+ file:/D:/course%20Materials/Spring16/CSC2303/2_Laboratories/lab9_Collections%20lab%20skeleton%20application/CollectionsSampleApplicationSkeleton/src/students/Student.java
+
+
+
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/project.properties b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/project.properties
new file mode 100644
index 0000000..32645da
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/project.properties
@@ -0,0 +1,72 @@
+annotation.processing.enabled=true
+annotation.processing.enabled.in.editor=false
+annotation.processing.processor.options=
+annotation.processing.processors.list=
+annotation.processing.run.all.processors=true
+annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+build.generated.sources.dir=${build.dir}/generated-sources
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+# Uncomment to specify the preferred debugger connection transport:
+#debug.transport=dt_socket
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/CollectionsSampleApplicationSkeleton.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+excludes=
+includes=**
+jar.compress=false
+javac.classpath=
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.processorpath=\
+ ${javac.classpath}
+javac.source=1.5
+javac.target=1.5
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit.classpath}:\
+ ${libs.junit_4.classpath}
+javac.test.processorpath=\
+ ${javac.test.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=${source.encoding}
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+main.class=hashtableimplementation.Main
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+platform.active=default_platform
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+source.encoding=UTF-8
+src.dir=src
+test.src.dir=test
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/project.xml b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/project.xml
new file mode 100644
index 0000000..ec61e7c
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/nbproject/project.xml
@@ -0,0 +1,14 @@
+
+ org.netbeans.modules.java.j2seproject
+
+
+ CollectionsSampleApplicationSkeleton
+
+
+
+
+
+
+
+
+
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/src/LMS/StudentSystem.java b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/src/LMS/StudentSystem.java
new file mode 100644
index 0000000..fb04f72
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/src/LMS/StudentSystem.java
@@ -0,0 +1,46 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package LMS;
+
+import students.Student;
+import students.StudentCollection;
+
+
+/**
+ *
+ * @author mourhir
+ */
+public class StudentSystem {
+
+ public static StudentCollection studentColl = new StudentCollection();
+
+ public static void main(String[] args) {
+
+ //create more students and add to the collection
+
+ // call the tostring
+
+
+ //modify the gpa of one of the students make it 3.5
+
+
+ //call the tostring to double check the modifiation
+
+ //find all students with gpa 4.0 and display them
+
+ //sort alphabetically
+
+ //call the tostring
+
+ //sort based on GPA
+
+ //call the tostring
+
+ //remove one of the students added above
+
+ //call the tostring
+
+ }
+}
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/src/students/Student.java b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/src/students/Student.java
new file mode 100644
index 0000000..3cf095d
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/src/students/Student.java
@@ -0,0 +1,54 @@
+
+package students;
+
+public class Student {
+
+ private String name;
+ private double gpa;
+ private int id;
+
+ public Student(String name, double gpa, int id){
+ this.gpa=gpa;
+ this.name=name;
+ this.id = id;
+ }
+
+
+
+ public void setName(String name){
+ this.name=name;
+ }
+
+ public String getName(){
+ return name;
+ }
+
+ public void setGpa(double gpa){
+ this.gpa=gpa;
+ }
+
+ public double getGPA(){
+ return gpa;
+ }
+
+ public void setId(int id){
+ this.id=id;
+ }
+
+ public int getID(){
+ return id;
+ }
+
+ @Override
+ public String toString(){
+ return("The student: "+this.name+"has an id of: "+this.id+" and has a gpa of: "+this.gpa);
+ }
+
+ @Override
+ public boolean equals(String name, double gpa){
+ if((this.name == name)&&(this.gpa==gpa)){
+ return true;
+ }
+ return false;
+ }
+}
diff --git a/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/src/students/StudentCollection.java b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/src/students/StudentCollection.java
new file mode 100644
index 0000000..1ee6ada
--- /dev/null
+++ b/OOPClss/CollectionsSampleApplicationSkeleton (extract.me)/CollectionsSampleApplicationSkeleton/src/students/StudentCollection.java
@@ -0,0 +1,59 @@
+
+package students;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.ListIterator;
+
+public class StudentCollection {
+
+ List students;
+
+ public StudentCollection(List students) {
+ students s1= new ArrayList<>();
+ }
+
+ public boolean addstudent(Student stud) {
+ students.add(stud);
+ }
+
+ public boolean removeStudent(Student stud){
+ students.remove(stud);
+ }
+
+ public boolean searchStudent(Student stud){
+
+ }
+
+ public void modifyStudent(Student search, Student newStud) {
+
+ }
+
+ public Student getStudentWithName(String name) {
+ return null;
+ }
+
+ public void modifyStudent(String name, Student newStud) {
+
+ }
+
+ public ArrayList findStudentsWithGpa(double gpa){
+ return null;
+
+ }
+
+ public void sortStudents(Comparator comp) {
+
+ }
+
+ public ListIterator getStudents() {
+ return null;
+ }
+
+ @Override
+ public String toString(){
+ return null;
+
+ }
+}
diff --git a/OOPClss/DataStructures/Arrays.java b/OOPClss/DataStructures/Arrays.java
new file mode 100644
index 0000000..0449fac
--- /dev/null
+++ b/OOPClss/DataStructures/Arrays.java
@@ -0,0 +1,12 @@
+import java.util.*;
+
+public class Arrays{
+ ArrayList names= new ArrayList<>();
+ names.add("Alice");
+ names.add("Bobby");
+
+
+ public static void main(String [] args){
+
+ }
+}
\ No newline at end of file
diff --git a/OOPClss/DataStructures/MyContainer.java b/OOPClss/DataStructures/MyContainer.java
new file mode 100644
index 0000000..9d86af5
--- /dev/null
+++ b/OOPClss/DataStructures/MyContainer.java
@@ -0,0 +1,9 @@
+public class MyContainer{
+ private ArrayListmyarr = new ArrayList<>();
+
+ public add(T item){
+ myarr.add(item);
+ }
+
+
+}
\ No newline at end of file
diff --git a/OOPClss/EcommerceApp/.gitignore b/OOPClss/EcommerceApp/.gitignore
new file mode 100644
index 0000000..f68d109
--- /dev/null
+++ b/OOPClss/EcommerceApp/.gitignore
@@ -0,0 +1,29 @@
+### IntelliJ IDEA ###
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store
\ No newline at end of file
diff --git a/OOPClss/EcommerceApp/.idea/.gitignore b/OOPClss/EcommerceApp/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/OOPClss/EcommerceApp/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/OOPClss/EcommerceApp/.idea/misc.xml b/OOPClss/EcommerceApp/.idea/misc.xml
new file mode 100644
index 0000000..454992c
--- /dev/null
+++ b/OOPClss/EcommerceApp/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OOPClss/EcommerceApp/.idea/modules.xml b/OOPClss/EcommerceApp/.idea/modules.xml
new file mode 100644
index 0000000..c3a2f9c
--- /dev/null
+++ b/OOPClss/EcommerceApp/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OOPClss/EcommerceApp/.idea/vcs.xml b/OOPClss/EcommerceApp/.idea/vcs.xml
new file mode 100644
index 0000000..b2bdec2
--- /dev/null
+++ b/OOPClss/EcommerceApp/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OOPClss/EcommerceApp/EcommerceApp.iml b/OOPClss/EcommerceApp/EcommerceApp.iml
new file mode 100644
index 0000000..c90834f
--- /dev/null
+++ b/OOPClss/EcommerceApp/EcommerceApp.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OOPClss/EcommerceApp/src/Main.java b/OOPClss/EcommerceApp/src/Main.java
new file mode 100644
index 0000000..d5238c9
--- /dev/null
+++ b/OOPClss/EcommerceApp/src/Main.java
@@ -0,0 +1,5 @@
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello, World!");
+ }
+}
\ No newline at end of file
diff --git a/OOPClss/EcommerceApp/src/com/address/Address.java b/OOPClss/EcommerceApp/src/com/address/Address.java
new file mode 100644
index 0000000..273b6d9
--- /dev/null
+++ b/OOPClss/EcommerceApp/src/com/address/Address.java
@@ -0,0 +1,28 @@
+package com.address;
+
+public class Address {
+ private String address;
+ private String city;
+ private String state;
+ private String zipcode;
+
+ public Address(String address, String city, String state, String zipcode) {
+ this.address = address;
+ this.city = city;
+ this.state = state;
+ this.zipcode = zipcode;
+ }
+
+
+ @Override
+ public String toString() {
+ return "Address{" +
+ "address='" + address + '\'' +
+ ", city='" + city + '\'' +
+ ", state='" + state + '\'' +
+ ", zipcode='" + zipcode + '\'' +
+ '}';
+ }
+
+
+}
diff --git a/OOPClss/EcommerceApp/src/com/cart/Cart.java b/OOPClss/EcommerceApp/src/com/cart/Cart.java
new file mode 100644
index 0000000..b16b04e
--- /dev/null
+++ b/OOPClss/EcommerceApp/src/com/cart/Cart.java
@@ -0,0 +1,32 @@
+package com.cart;
+import com.cartItem.CartItem;
+import com.customer.Customer;
+
+import java.util.ArrayList;
+
+
+public class Cart {
+ private Customer customer;
+ private ArrayListitems = new ArrayList<>();
+
+ public Cart(Customer customer){
+ this.customer=customer;
+ }
+
+
+ public void addItem(CartItem item){
+ if(item != null){
+ items.add(item);
+ }
+ }
+
+
+ @Override
+ public String toString() {
+ return "Cart{" +
+ "customer=" + customer +
+ ", items=" + items +
+ '}';
+ }
+
+}
diff --git a/OOPClss/EcommerceApp/src/com/cartItem/CartItem.java b/OOPClss/EcommerceApp/src/com/cartItem/CartItem.java
new file mode 100644
index 0000000..c3b5268
--- /dev/null
+++ b/OOPClss/EcommerceApp/src/com/cartItem/CartItem.java
@@ -0,0 +1,26 @@
+package com.cartItem;
+
+
+import com.product.Product;
+
+public class CartItem {
+ private Product product;
+ private int quantity;
+
+
+ public CartItem(Product product, int quantity){
+ this.product=product;
+ this.quantity=quantity;
+ }
+
+ @Override
+ public String toString() {
+ return "CartItem{" +
+ "product=" + product +
+ ", quantity=" + quantity +
+ '}';
+ }
+
+
+
+}
diff --git a/OOPClss/EcommerceApp/src/com/customer/Customer.java b/OOPClss/EcommerceApp/src/com/customer/Customer.java
new file mode 100644
index 0000000..3d5e93f
--- /dev/null
+++ b/OOPClss/EcommerceApp/src/com/customer/Customer.java
@@ -0,0 +1,59 @@
+package com.customer;
+import com.address.Address;
+
+public class Customer {
+ private int id;
+ private String name;
+ private String email;
+ private Address billingAddress;
+
+
+ public Customer(int id, String name, String email, Address billingAddress){
+ this.id=id;
+ this.name=name;
+ this.email=email;
+ this.billingAddress=billingAddress;
+ }
+
+ public Address getBillingAddress(){
+ return billingAddress;
+ }
+
+ public void setBillingAddress(Address billingAddress){
+ this.billingAddress=billingAddress;
+ }
+
+ public int getId(){
+ return id;
+ }
+
+ public void setId(int id){
+ this.id=id;
+ }
+
+ public String getName(){
+ return name;
+ }
+
+ public void setName(String name){
+ this.name=name;
+ }
+
+ public String getEmail(){
+ return email;
+ }
+
+ public void setEmail(String email){
+ this.email=email;
+ }
+
+ @Override
+ public String toString() {
+ return "Customer{" +
+ "id=" + id +
+ ", name='" + name + '\'' +
+ ", email='" + email + '\'' +
+ ", billingAddress=" + billingAddress +
+ '}';
+ }
+}
diff --git a/OOPClss/EcommerceApp/src/com/order/Order.java b/OOPClss/EcommerceApp/src/com/order/Order.java
new file mode 100644
index 0000000..23341a0
--- /dev/null
+++ b/OOPClss/EcommerceApp/src/com/order/Order.java
@@ -0,0 +1,50 @@
+ package com.order;
+ import com.orderitem.OrderItem;
+ import com.customer.Customer;
+
+ import java.time.LocalDate;
+ import java.util.ArrayList;
+
+ public class Order {
+ private int orderId;
+ private LocalDate date;
+ private Customer customer;
+ private ArrayList items;
+
+ public Order(int orderId, LocalDate date, Customer customer, ArrayList item){
+ if (orderId <= 0) {
+ throw new IllegalArgumentException("Order ID must be positive");
+ }
+ if (date == null) {
+ throw new IllegalArgumentException("Date cannot be null");
+ }
+ if (customer == null) {
+ throw new IllegalArgumentException("Customer cannot be null");
+ }
+
+ this.orderId=orderId;
+ this.date=date;
+ this.customer=customer;
+ this.items=item;
+ }
+
+ public Order(int orderId, Customer customer){
+ this(orderId, LocalDate.now(), customer, new ArrayList<>());
+ }
+
+ public int getOrderId(){
+ return orderId;
+ }
+
+ public LocalDate getDate(){
+ return date;
+ }
+
+ public Customer getCustomer(){
+ return customer;
+ }
+
+ public ArrayList getItems(){
+ return new ArrayList<>(items);
+ }
+ }
diff --git a/OOPClss/EcommerceApp/src/com/orderitem/OrderItem.java b/OOPClss/EcommerceApp/src/com/orderitem/OrderItem.java
new file mode 100644
index 0000000..d975b9c
--- /dev/null
+++ b/OOPClss/EcommerceApp/src/com/orderitem/OrderItem.java
@@ -0,0 +1,22 @@
+package com.orderitem;
+
+public class OrderItem {
+ private String productName;
+ private double price;
+
+ public OrderItem(String productName, double price){
+ this.productName=productName;
+ this.price=price;
+ }
+
+ @Override
+ public String toString() {
+ return "OrderItem{" +
+ "productName='" + productName + '\'' +
+ ", price=" + price +
+ '}';
+ }
+
+}
+
+
diff --git a/OOPClss/EcommerceApp/src/com/payment/Payment.java b/OOPClss/EcommerceApp/src/com/payment/Payment.java
new file mode 100644
index 0000000..b592880
--- /dev/null
+++ b/OOPClss/EcommerceApp/src/com/payment/Payment.java
@@ -0,0 +1,31 @@
+package com.payment;
+
+
+import java.time.LocalDate;
+import com.paymentmethod.PaymentMethod;
+
+
+public class Payment {
+ private int paymentId;
+ private double amount;
+ private LocalDate date;
+ private PaymentMethod method;
+
+ public Payment(int paymentId, double amount, LocalDate date, PaymentMethod method){
+ this.paymentId=paymentId;
+ this.amount=amount;
+ this.date=date;
+ this.method=method;
+ }
+
+ @Override
+ public String toString() {
+ return "Payment{" +
+ "paymentId=" + paymentId +
+ ", amount=" + amount +
+ ", date=" + date +
+ ", method=" + method +
+ '}';
+ }
+
+}
diff --git a/OOPClss/EcommerceApp/src/com/paymentmethod/PaymentMethod.java b/OOPClss/EcommerceApp/src/com/paymentmethod/PaymentMethod.java
new file mode 100644
index 0000000..fe7f8e3
--- /dev/null
+++ b/OOPClss/EcommerceApp/src/com/paymentmethod/PaymentMethod.java
@@ -0,0 +1,34 @@
+package com.paymentmethod;
+
+import com.payment.Payment;
+
+public enum PaymentMethod {
+ CASH("Cash on delivery",0.00),
+ CREDIT_CARD("Credit Card Payment",2.5),
+ PAYPAL("Paypal Payment",3.0);
+
+ private final String description;
+ private final double processingFeePercentage;
+
+ PaymentMethod(String description,double processingFeePercentage){
+ this.description=description;
+ this.processingFeePercentage=processingFeePercentage;
+ }
+
+ public String getDescription(){
+ return description;
+ }
+
+ public double getProcessingFeePercentage(){
+ return processingFeePercentage;
+ }
+
+
+ @Override
+ public String toString() {
+ return description +" (Fee: "+processingFeePercentage +"%)";
+ }
+
+
+
+}
diff --git a/OOPClss/EcommerceApp/src/com/product/Product.java b/OOPClss/EcommerceApp/src/com/product/Product.java
new file mode 100644
index 0000000..4e103db
--- /dev/null
+++ b/OOPClss/EcommerceApp/src/com/product/Product.java
@@ -0,0 +1,27 @@
+package com.product;
+
+public class Product {
+ private String sku;
+ private String name;
+ private double price;
+ private int quantityInStock;
+
+ public Product(String sku, String name, double price, int quantityInStock){
+ this.sku=sku;
+ this.name=name;
+ this.price=price;
+ this.quantityInStock=quantityInStock;
+ }
+
+ @Override
+ public String toString() {
+ return "Product{" +
+ "sku='" + sku + '\'' +
+ ", name='" + name + '\'' +
+ ", price=" + price +
+ ", quantityInStock=" + quantityInStock +
+ '}';
+ }
+
+
+}
diff --git a/OOPClss/Enhancedglovoapp/.gitignore b/OOPClss/Enhancedglovoapp/.gitignore
new file mode 100644
index 0000000..f68d109
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/.gitignore
@@ -0,0 +1,29 @@
+### IntelliJ IDEA ###
+out/
+!**/src/main/**/out/
+!**/src/test/**/out/
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+bin/
+!**/src/main/**/bin/
+!**/src/test/**/bin/
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store
\ No newline at end of file
diff --git a/OOPClss/Enhancedglovoapp/.idea/.gitignore b/OOPClss/Enhancedglovoapp/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/OOPClss/Enhancedglovoapp/.idea/misc.xml b/OOPClss/Enhancedglovoapp/.idea/misc.xml
new file mode 100644
index 0000000..454992c
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OOPClss/Enhancedglovoapp/.idea/modules.xml b/OOPClss/Enhancedglovoapp/.idea/modules.xml
new file mode 100644
index 0000000..3b47df7
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OOPClss/Enhancedglovoapp/.idea/vcs.xml b/OOPClss/Enhancedglovoapp/.idea/vcs.xml
new file mode 100644
index 0000000..b2bdec2
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OOPClss/Enhancedglovoapp/Enhancedglovoapp.iml b/OOPClss/Enhancedglovoapp/Enhancedglovoapp.iml
new file mode 100644
index 0000000..c90834f
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/Enhancedglovoapp.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OOPClss/Enhancedglovoapp/src/admin.java b/OOPClss/Enhancedglovoapp/src/admin.java
new file mode 100644
index 0000000..db04f32
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/src/admin.java
@@ -0,0 +1,24 @@
+import java.util.List;
+
+public class admin extends user implements manageable {
+ private int adminId;
+ private List permissions;
+
+ @Override
+ public void manageOrder() {
+
+ }
+
+ @Override
+ public void manageProfile() {
+
+ }
+
+ public void handleDispute(){
+
+ }
+
+ public void monitorOrder(){
+
+ }
+}
diff --git a/OOPClss/Enhancedglovoapp/src/customer.java b/OOPClss/Enhancedglovoapp/src/customer.java
new file mode 100644
index 0000000..e353570
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/src/customer.java
@@ -0,0 +1,58 @@
+public class customer extends user implements manageable {
+ private String address;
+ private String paymentInfo;
+ public order currentOrder;
+
+ public String getAddress(){
+ return address;
+ }
+
+ public void setAddress(String address){
+ this.address=address;
+ }
+
+ public String getPaymentInfo(){
+ return paymentInfo;
+ }
+
+ public void setPaymentInfo(String paymentInfo){
+ this.paymentInfo=paymentInfo;
+ }
+
+ @Override
+ public String toString() {
+ return "Customer{" +
+ "address='" + address + '\'' +
+ ", paymentInfo='" + paymentInfo + '\'' +
+ '}';
+ }
+
+ @Override
+ public void manageOrder(){
+ if(currentOrder != null ¤tOrder.getStatus()==orderStatus.PENDING)
+ {
+ currentOrder.setStatus(orderStatus.DELIVERED);
+ }
+ }
+
+ @Override
+ public void manageProfile(){
+
+ }
+
+ public void placeOrder(){
+
+ }
+
+ public order getCurrentOrder(){
+ return currentOrder;
+ }
+
+ public void setCurrentOrder(order currentOrder){
+ this.currentOrder= currentOrder;
+ }
+
+
+
+
+}
diff --git a/OOPClss/Enhancedglovoapp/src/deliveryPerson.java b/OOPClss/Enhancedglovoapp/src/deliveryPerson.java
new file mode 100644
index 0000000..5dfa63f
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/src/deliveryPerson.java
@@ -0,0 +1,93 @@
+import java.time.LocalDate;
+import java.util.List;
+
+public class deliveryPerson extends user {
+ private String vehicleType;
+ private boolean availability;
+ private LocalDate deliveryTime;
+
+ public deliveryPerson(String name, String phoneNumber, String email, String password, String vehicleType, boolean availability,LocalDate deliveryTime){
+ super.setName(name);
+ super.setPhoneNumber(phoneNumber);
+ super.setEmail(email);
+ super.setPassword(password);
+ this.vehicleType=vehicleType;
+ this.availability=availability;
+ this.deliveryTime=deliveryTime;
+ }
+
+ public void setVehicleType(String vehicleType){
+ this.vehicleType=vehicleType;
+ }
+
+ public String getVehicleType(){
+ return vehicleType;
+ }
+
+ public void setAvailability(boolean availability){
+ this.availability=availability;
+ }
+
+ public boolean getAvailability(){
+ return availability;
+ }
+
+ public void setDeliveryTime(LocalDate deliveryTime){
+ this.deliveryTime=deliveryTime;
+ }
+
+ public LocalDate getDeliveryTime(){
+ return deliveryTime;
+ }
+
+ @Override
+ public String toString() {
+ return "A Person is delivering your order with a: {" +
+ "vehicleType='" + vehicleType + '\'' +
+ ", availability=" + availability +
+ ", deliveryTime=" + deliveryTime +
+ '}';
+ }
+
+
+ public List getOrders(){
+ return orders;
+ }
+
+ public void setOrders(List orders){
+ this.orders=order;
+ }
+
+ public void addOrder(order order) {
+ if (orders != null) {
+ orders.add(order);
+ }
+ }
+
+ public void deliverOrder() {
+ if (availability && orders != null) {
+ for (order order : orders) {
+ if (order.getStatus() == orderStatus.PENDING) {
+ order.setStatus(orderStatus.DELIVERED); // Update status to DELIVERED
+ System.out.println("Order " + order.getOrderId() + " delivered.");
+ }
+ }
+ availability = false; // Mark as unavailable after delivery
+ } else {
+ System.out.println("Delivery person unavailable or no orders assigned.");
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "DeliveryPerson{" +
+ "name='" + getName() + '\'' +
+ ", vehicleType='" + vehicleType + '\'' +
+ ", availability=" + availability +
+ ", deliveryTime=" + deliveryTime +
+ ", orders=" + orders +
+ '}';
+ }
+}
+
+
diff --git a/OOPClss/Enhancedglovoapp/src/main.java b/OOPClss/Enhancedglovoapp/src/main.java
new file mode 100644
index 0000000..9a22436
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/src/main.java
@@ -0,0 +1,5 @@
+public class main {
+ public static void main(String[] args) {
+ System.out.println("Hello, World!");
+ }
+}
\ No newline at end of file
diff --git a/OOPClss/Enhancedglovoapp/src/manageable.java b/OOPClss/Enhancedglovoapp/src/manageable.java
new file mode 100644
index 0000000..77048d1
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/src/manageable.java
@@ -0,0 +1,4 @@
+public interface manageable {
+ public void manageOrder();
+ public void manageProfile();
+}
diff --git a/OOPClss/Enhancedglovoapp/src/order.java b/OOPClss/Enhancedglovoapp/src/order.java
new file mode 100644
index 0000000..ad8846b
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/src/order.java
@@ -0,0 +1,62 @@
+import java.time.LocalDate;
+
+public class order {
+ private int orderId;
+ private LocalDate orderDate;
+ private String deliveryAddress;
+ private orderStatus status;
+
+ public order(int orderId, LocalDate orderDate, String deliveryAddress, orderStatus status){
+ this.orderId=orderId;
+ this.orderDate=orderDate;
+ this.deliveryAddress=deliveryAddress;
+ this.status=status;
+ }
+
+ @Override
+ public String toString() {
+ return "order{" +
+ "orderId=" + orderId +
+ ", orderDate=" + orderDate +
+ ", deliveryAddress='" + deliveryAddress + '\'' +
+ ", status=" + status +
+ '}';
+ }
+
+
+ public int getOrderId(){
+ return orderId;
+ }
+
+ public void setOrderId(int orderId){
+ this.orderId=orderId;
+ }
+
+ public LocalDate getOrderDate(){
+ return orderDate;
+ }
+
+ public void setOrderDate(LocalDate orderDate){
+ this.orderDate=orderDate;
+ }
+
+ public String getDeliveryAddress(){
+ return deliveryAddress;
+ }
+
+ public void setDeliveryAddress(String deliveryAddress){
+ this.deliveryAddress=deliveryAddress;
+ }
+
+ public orderStatus getStatus(){
+ return status;
+ }
+
+ public void setStatus(orderStatus status){
+ this.status=status;
+ }
+
+
+
+
+}
diff --git a/OOPClss/Enhancedglovoapp/src/orderItem.java b/OOPClss/Enhancedglovoapp/src/orderItem.java
new file mode 100644
index 0000000..b8ad577
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/src/orderItem.java
@@ -0,0 +1,46 @@
+import java.time.LocalDate;
+
+public class orderItem extends order {
+ private int itemId;
+ private int quantity;
+ private double price;
+
+ public orderItem(int itemId, int quantity, double price){
+ super(orderId,orderDate,deliveryAddress, status)
+ this.itemId=itemId;
+ this.quantity=quantity;
+ this.price=price;
+ }
+
+ public void setItemId(int itemId){
+ this.itemId=itemId;
+ }
+
+ public int getItemId(){
+ return itemId;
+ }
+
+ public int getQuantity(){
+ return quantity;
+ }
+
+ public void setQuantity(int quantity){
+ this.quantity=quantity;
+ }
+
+ public double getPrice(){
+ return price;
+ }
+
+ public void setPrice(double price){
+ this.price=price;
+ }
+
+
+ public double getTotalPrice(double price, int quantity){
+ return((quantity)*price);
+ }
+ public String toString(){
+ return("An order has been place with an item id of:"+this.itemId+"and a price of: "+this.price+" and "+this.quantity+" number of items of this have been ordered");
+ }
+}
diff --git a/OOPClss/Enhancedglovoapp/src/orderStatus.java b/OOPClss/Enhancedglovoapp/src/orderStatus.java
new file mode 100644
index 0000000..cff44c6
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/src/orderStatus.java
@@ -0,0 +1,3 @@
+public enum orderStatus {
+ PENDING, DISPATCHED, DELIVERED;
+}
diff --git a/OOPClss/Enhancedglovoapp/src/restaurantOwner.java b/OOPClss/Enhancedglovoapp/src/restaurantOwner.java
new file mode 100644
index 0000000..030139a
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/src/restaurantOwner.java
@@ -0,0 +1,39 @@
+import java.util.List;
+
+public class restaurantOwner extends user implements manageable {
+ private List menu;
+ private double rating;
+ private String address;
+
+ public double getRating(){
+ return rating;
+ }
+
+ public void setRating(double rating) {
+ this.rating = rating;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public restaurantOwner(String address, double rating, List menu){
+ this.address=address;
+ this.rating = rating;
+ this.menu=menu;
+ }
+
+ @Override
+ public void manageOrder() {
+
+ }
+
+ @Override
+ public void manageProfile() {
+
+ }
+}
diff --git a/OOPClss/Enhancedglovoapp/src/user.java b/OOPClss/Enhancedglovoapp/src/user.java
new file mode 100644
index 0000000..0d99baa
--- /dev/null
+++ b/OOPClss/Enhancedglovoapp/src/user.java
@@ -0,0 +1,57 @@
+public class user {
+ private String name;
+ private String phoneNumber;
+ private String email;
+ private String password;
+
+ @Override
+ public String toString() {
+ return "User{" +
+ "name='" + name + '\'' +
+ ", phoneNumber='" + phoneNumber + '\'' +
+ ", email='" + email + '\'' +
+ ", password='" + password + '\'' +
+ '}';
+ }
+
+ public String getName(){
+ return name;
+ }
+
+ public void setName(String name){
+ this.name = name;
+ }
+
+ public String getPhoneNumber() {
+ return phoneNumber;
+ }
+
+ public void setPhoneNumber(String phoneNumber) {
+ this.phoneNumber = phoneNumber;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public void login(){
+
+ }
+
+ public void logout(){
+
+ }
+
+}
diff --git a/OOPClss/Generics/Car.class b/OOPClss/Generics/Car.class
new file mode 100644
index 0000000000000000000000000000000000000000..c4156b68d0954f4e64eece5d972e95ddcdddb8cb
GIT binary patch
literal 1480
zcmbVM+fEZf82+ZT-L`IlLOGPPP;|Q-DxRgp3!4xdK`$T}
z#KwdRAHat)e$y>b+r}8PnfYh_`R4mi^Y71JS3dw$v5`RxeH!9A5=aUR9$Oby*|FTi
z^1JXnp1~5qFsdXX+hPG}Q
zcS7HG4=V~aq+?j25~tpQbd+X9$7oYi_Z-h3qIcsu3YZWWQ%qIQty|%HJ3Qhl2rV}Z
z1l}06Zu)=Gl)6Cz>;KKR$8f6*L||accIDgi(|zghTKf()+Mx_TH1os!)wmC?_i>|E
z;!OqEZssa)^z=*JhyWu-x8I5)r6^P)xm4iRlG>_DW~9AdhF(+$fy|C~?$_m}t^7=}
zl&h*%d<3sNFAPH8I@^}vk#`WJP!>pwIrSN$G?2tv1`qK_!(&yWCj!OWD%VbP@X<@Iv?sSk
zQMDXr#|~vhK(D#3^s9~)1TxU@Twt*)re3aUSQnW2JCscn#f7_k=`p_TIA?YcS25Kt
zP05C6O11%I2J8+@a-QODleh%sg!vu9oNPcdmmA2MD-Gn#LcD?eSDp$?D-4pHQ?!xh
zmq9-*4bxTuSt4dI+v1$26htP>Z_qy9Tu(NYgPiB+Ze)I*=9SyYrs-Q#>hA&M>Dma9
z^H^x%+o`i(I;h79Dq^vVdWivbQcsauk=^S_o$I7lq22FIo$I7tAa#*=qbGH~liDD(
z)SJ33_fbNYNxee6c|*O*YN%X~s$6qqIdUBND~ti1w${*xC8A?kCXcG6zypp|JmpTk
LjAwX(3JSjg@-HY}
literal 0
HcmV?d00001
diff --git a/OOPClss/Generics/Car.java b/OOPClss/Generics/Car.java
new file mode 100644
index 0000000..9d9ff4c
--- /dev/null
+++ b/OOPClss/Generics/Car.java
@@ -0,0 +1,52 @@
+public class Car {
+ private int year;
+ private String make;
+ private String model;
+ private String color;
+
+ public Car(int year, String make,String model,String color)
+ {
+ this.year=year;
+ this.make=make;
+ this.model=model;
+ this.color=color;
+ }
+
+ public int getYear(){
+ return year;
+ }
+
+ public void setYear(int year){
+ this.year=year;
+ }
+
+ public String getMake(){
+ return make;
+ }
+
+ public void setMake(String make){
+ this.make=make;
+ }
+ public String getModel(){
+ return model;
+ }
+
+ public void setModel(String model){
+ this.model=model;
+ }
+
+
+ public String getColor(){
+ return color;
+ }
+
+ public void setColor(String color){
+ this.color=color;
+ }
+
+ @Override
+ public String toString() {
+ return year + " " + make + " " + model + " (" + color + ")";
+ }
+
+}
\ No newline at end of file
diff --git a/OOPClss/Generics/GenericsP1.class b/OOPClss/Generics/GenericsP1.class
new file mode 100644
index 0000000000000000000000000000000000000000..bc832c7877940894e6cf6d7d57e9da2275cc4286
GIT binary patch
literal 2788
zcmaJ@Yf}?f7=BK;Y>Yu5AQob46x0MzytYaZg&>#~gc`)6wRB0Au(IsZ?1qZH-*4Lc
zht9Mg+L_MuOFy)oDk`1&z5l_#()KyK3kgCy%pA^n&wG8|=e(Q0{=WYwfE2z~5D*9r
zX{J`tv-a5G5Ckg2s6w?sb&qc9PA>)VbYdceAhsw7$;+(*b=TBIwaZY=eAnpoH7)B1
zRKyb#3Tg!QlGddRAL-bju8)R-iGfE~r`ES&GdUZ6`LZ#d>3h
zLI|T?28jr4j}MnzWt@U;=97tuEzGeojO}O=2(G#i5NQRE2{gDCMMpQf`U(YgX;`4L94*Fk~4WtC~W<%bvz?bUk