From 32fdc1b739ed78f09e09d763d30ee2759dce5daa Mon Sep 17 00:00:00 2001 From: Chandima Anuradha <33199476+canuradha@users.noreply.github.com> Date: Mon, 30 Dec 2019 16:04:27 +0530 Subject: [PATCH] Updates (#2) * Session 8 minor changes * Session3 Answers added * Session4 code Rebasing * Session 4 Minor Corrections * Session5 minor Changes --- Session3/Group/school/Driver.java | 12 + Session3/Group/school/School.java | 57 + Session3/Group/school/student/Student.java | 53 + Session3/Individual/Main.java | 32 + Session3/Individual/matrix/Matrix.java | 100 ++ .../src/lk/ac/pdn => }/AccessLevel.java | 2 - Session4/Main.java | 28 + .../src/lk/ac/pdn => }/Personnel.java | 2 - .../bin/lk/ac/pdn/AccessLevel.class | Bin 1530 -> 0 bytes .../bin/lk/ac/pdn/Main.class | Bin 1022 -> 0 bytes .../bin/lk/ac/pdn/Personnel.class | Bin 2875 -> 0 bytes .../src/lk/ac/pdn/Main.java | 33 - Session6/Group/SecretService/build.xml | 74 -- .../SecretService/build/built-jar.properties | 4 - .../classes/lk/intel/SecretService.class | Bin 1085 -> 0 bytes .../build/classes/lk/intel/agent/Agent.class | Bin 1826 -> 0 bytes .../intel/service_record/ServiceRecord.class | Bin 1710 -> 0 bytes Session6/Group/SecretService/manifest.mf | 3 - .../SecretService/nbproject/build-impl.xml | 1041 ----------------- .../nbproject/genfiles.properties | 8 - .../nbproject/private/private.properties | 2 - .../nbproject/private/private.xml | 4 - .../nbproject/project.properties | 71 -- .../Group/SecretService/nbproject/project.xml | 15 - .../src/lk/intel/SecretService.java | 25 - Session6/Individual/SecretService/build.xml | 74 -- .../SecretService/build/built-jar.properties | 4 - .../classes/lk/intel/SecretService.class | Bin 1085 -> 0 bytes .../build/classes/lk/intel/agent/Agent.class | Bin 1826 -> 0 bytes .../intel/service_record/ServiceRecord.class | Bin 1710 -> 0 bytes Session6/Individual/SecretService/manifest.mf | 3 - .../SecretService/nbproject/build-impl.xml | 1041 ----------------- .../nbproject/genfiles.properties | 8 - .../nbproject/private/private.properties | 2 - .../nbproject/private/private.xml | 4 - .../nbproject/project.properties | 71 -- .../SecretService/nbproject/project.xml | 15 - .../src/lk/intel/agent/Agent.java | 71 -- .../intel/service_record/ServiceRecord.java | 65 - .../lk/intel/SecretService.java | 9 +- .../lk/intel/agent/Agent.java | 24 +- .../intel/service_record/ServiceRecord.java | 17 +- 42 files changed, 299 insertions(+), 2675 deletions(-) create mode 100644 Session3/Group/school/Driver.java create mode 100644 Session3/Group/school/School.java create mode 100644 Session3/Group/school/student/Student.java create mode 100644 Session3/Individual/Main.java create mode 100644 Session3/Individual/matrix/Matrix.java rename Session4/{StringEnumPasswordApp/src/lk/ac/pdn => }/AccessLevel.java (90%) create mode 100644 Session4/Main.java rename Session4/{StringEnumPasswordApp/src/lk/ac/pdn => }/Personnel.java (97%) delete mode 100644 Session4/StringEnumPasswordApp/bin/lk/ac/pdn/AccessLevel.class delete mode 100644 Session4/StringEnumPasswordApp/bin/lk/ac/pdn/Main.class delete mode 100644 Session4/StringEnumPasswordApp/bin/lk/ac/pdn/Personnel.class delete mode 100644 Session4/StringEnumPasswordApp/src/lk/ac/pdn/Main.java delete mode 100644 Session6/Group/SecretService/build.xml delete mode 100644 Session6/Group/SecretService/build/built-jar.properties delete mode 100644 Session6/Group/SecretService/build/classes/lk/intel/SecretService.class delete mode 100644 Session6/Group/SecretService/build/classes/lk/intel/agent/Agent.class delete mode 100644 Session6/Group/SecretService/build/classes/lk/intel/service_record/ServiceRecord.class delete mode 100644 Session6/Group/SecretService/manifest.mf delete mode 100644 Session6/Group/SecretService/nbproject/build-impl.xml delete mode 100644 Session6/Group/SecretService/nbproject/genfiles.properties delete mode 100644 Session6/Group/SecretService/nbproject/private/private.properties delete mode 100644 Session6/Group/SecretService/nbproject/private/private.xml delete mode 100644 Session6/Group/SecretService/nbproject/project.properties delete mode 100644 Session6/Group/SecretService/nbproject/project.xml delete mode 100644 Session6/Group/SecretService/src/lk/intel/SecretService.java delete mode 100644 Session6/Individual/SecretService/build.xml delete mode 100644 Session6/Individual/SecretService/build/built-jar.properties delete mode 100644 Session6/Individual/SecretService/build/classes/lk/intel/SecretService.class delete mode 100644 Session6/Individual/SecretService/build/classes/lk/intel/agent/Agent.class delete mode 100644 Session6/Individual/SecretService/build/classes/lk/intel/service_record/ServiceRecord.class delete mode 100644 Session6/Individual/SecretService/manifest.mf delete mode 100644 Session6/Individual/SecretService/nbproject/build-impl.xml delete mode 100644 Session6/Individual/SecretService/nbproject/genfiles.properties delete mode 100644 Session6/Individual/SecretService/nbproject/private/private.properties delete mode 100644 Session6/Individual/SecretService/nbproject/private/private.xml delete mode 100644 Session6/Individual/SecretService/nbproject/project.properties delete mode 100644 Session6/Individual/SecretService/nbproject/project.xml delete mode 100644 Session6/Individual/SecretService/src/lk/intel/agent/Agent.java delete mode 100644 Session6/Individual/SecretService/src/lk/intel/service_record/ServiceRecord.java rename Session6/{Individual/SecretService/src => SecretService}/lk/intel/SecretService.java (81%) rename Session6/{Group/SecretService/src => SecretService}/lk/intel/agent/Agent.java (72%) rename Session6/{Group/SecretService/src => SecretService}/lk/intel/service_record/ServiceRecord.java (78%) diff --git a/Session3/Group/school/Driver.java b/Session3/Group/school/Driver.java new file mode 100644 index 0000000..7f3d8cf --- /dev/null +++ b/Session3/Group/school/Driver.java @@ -0,0 +1,12 @@ +package school; + +public class Driver{ + public static void main(String ar[]){ + School sc1 = new School("School ABC", "Colombo Road, Kandy", 5); + sc1.addStudent("Student 1", 16, 3.2); + sc1.addStudent("Student 2", 18, 3.8); + sc1.addStudent("Student 3", 16, 2.7); + + sc1.display(); + } +} \ No newline at end of file diff --git a/Session3/Group/school/School.java b/Session3/Group/school/School.java new file mode 100644 index 0000000..65fa63d --- /dev/null +++ b/Session3/Group/school/School.java @@ -0,0 +1,57 @@ +package school; + +import student.Student; + +public class School{ + private String sName; + private String address; + private Student students []; + + public School(String sn, String ad, int scount){ + this.sName = sn; + this.address = ad; + this.students = new Student[scount]; + } + + public void setName(String name){ + this.sName = name; + } + + public String getName(){ + return this.sName; + } + + public void setAddress(String addr){ + this.address = addr; + } + + public String getAddress(){ + return this.address; + } + + public void addStudent(String name, int age, double gpa){ + for(int i =0; i< students.length; i++){ + if(i == students.length-1 && students[i] != null){ + System.out.println("Students full"); + break; + } + if(students[i] == null){ + students[i] = new Student(name, age, gpa); + break; + } + } + } + + public void display(){ + System.out.println("School Name: " + this.sName + "\nAddress: " + this.address + "\nStudent Details: "); + for(Student s : students){ + if(s != null){ + s.display(); + } + System.out.println(""); + } + if(students[0] != null) + System.out.println("Average GPA: " + students[0].calAverage(students)); + } + +} \ No newline at end of file diff --git a/Session3/Group/school/student/Student.java b/Session3/Group/school/student/Student.java new file mode 100644 index 0000000..1d42077 --- /dev/null +++ b/Session3/Group/school/student/Student.java @@ -0,0 +1,53 @@ +package student; + +public class Student{ + private String name; + private int age; + private double gpa; + + public Student(String n, int a, double g){ + this.name = n; + this.age = a; + this.gpa = g; + } + + public void setName(String nme){ + this.name = nme; + } + + public String getName(){ + return this.name; + } + + public void setAge(int ag){ + this.age = ag; + } + + public int getAge(){ + return this.age; + } + + public void setGPA(double gp){ + this.gpa = gp; + } + + public double getGPA(){ + return this.gpa; + } + + public double calAverage(Student s []){ + double avg = 0.0; + + for (Student stu : s){ + if(stu != null) + avg += stu.getGPA(); + } + return avg/s.length; + + } + + public void display(){ + System.out.println("Name: " + this.name + "\nAge: " + this.age + "\ngpa: " + this.gpa); + } + +} \ No newline at end of file diff --git a/Session3/Individual/Main.java b/Session3/Individual/Main.java new file mode 100644 index 0000000..0c1e644 --- /dev/null +++ b/Session3/Individual/Main.java @@ -0,0 +1,32 @@ +package Individual; + +import Individual.matrix.Matrix; + +public class Main +{ + public static void main(String[] args) + { + Matrix m1 = new Matrix(2, 3); + m1.init_matrix(); + m1.print(); + System.out.println("-----------------------------------------------"); + + Matrix m2 = new Matrix(2, 3); + m2.init_matrix(); + m2.print(); + System.out.println("-----------------------------------------------"); + + Matrix m3 = new Matrix(1, 2); + m3.init_matrix(); + m3.print(); + System.out.println("-----------------------------------------------"); + + System.out.println("m1 + m2: "); + m1.add_matrix(m2); + System.out.println("-----------------------------------------------"); + + System.out.println("m1 + m3: "); + m1.add_matrix(m3); + System.out.println("-----------------------------------------------"); + } +} diff --git a/Session3/Individual/matrix/Matrix.java b/Session3/Individual/matrix/Matrix.java new file mode 100644 index 0000000..4cba196 --- /dev/null +++ b/Session3/Individual/matrix/Matrix.java @@ -0,0 +1,100 @@ +package Individual.matrix; + +import java.util.Arrays; +import java.util.Scanner; + +/** + * The Matrix class represents a matrix using a 2D Java array. + * + * A Matrix object will have set dimensions defined at creation time. + */ +public class Matrix +{ + double[][] matrix; + Scanner scanner = new Scanner(System.in); // Not required in the assignment, but will be used to test the program. + + /** + * The constructor method. + * + * Creates a Matrix object containing an array of the specified dimensions + * @param m Number of rows of the matrix. + * @param n Number of columns of the matrix. + */ + public Matrix(int m, int n) + { + this.matrix = new double[m][n]; + } + + /** + * Method to print out the Matrix. + */ + public void print() + { + // We will be using two nested loops to access each element of the 2D array. The first loop iterates through + // rows, while the second loop iterates through the columns. "matrix.length" yields the number of rows and + // "matrix[i].length" yields the number of columns in row i. + for (int i = 0; i < this.matrix.length; i++) + { + for (int j = 0; j < this.matrix[i].length; j++) + { + System.out.print(this.matrix[i][j] + " "); // Note the use of the print method instead of the println + // method. + } + System.out.println(); // Print a new line at the end of each row. + } + } + + /** + * Method to get the dimensions of the matrix of the Matrix object. + * @return Integer array containing the dimensions of the matrix. + */ + public int[] get_dimensions() + { + int[] dims = new int[2]; + dims[0] = this.matrix.length; + dims[1] = this.matrix[0].length; + + return dims; + } + + /** + * Method to add another matrix to the current matrix. + * @param m2 The Matrix to be added to the current matrix. + */ + public void add_matrix(Matrix m2) + { + // Checking whether the dimensions allow matrix addition. + if (Arrays.equals(this.get_dimensions(), m2.get_dimensions())) // Arrays.equals() checks the equality of arrays + { + for (int i = 0; i < this.matrix.length; i++) + { + for (int j = 0; j < this.matrix[i].length; j++) + { + this.matrix[i][j] += m2.matrix[i][j]; + } + } + this.print(); + } + else + { + System.out.println("Matrix dimensions do not match."); + } + } + + /** + * Method to initialize values for the matrix. + * + * Not required for the assignment, but will be used to test the program. + */ + public void init_matrix() + { + for (int i = 0; i < this.matrix.length; i++) + { + for (int j = 0; j < this.matrix[i].length; j++) + { + System.out.println("Enter value for (" + i + ", " + j + "): "); + this.matrix[i][j] = scanner.nextInt(); + } + } + } +} diff --git a/Session4/StringEnumPasswordApp/src/lk/ac/pdn/AccessLevel.java b/Session4/AccessLevel.java similarity index 90% rename from Session4/StringEnumPasswordApp/src/lk/ac/pdn/AccessLevel.java rename to Session4/AccessLevel.java index d4ccc36..703a12c 100644 --- a/Session4/StringEnumPasswordApp/src/lk/ac/pdn/AccessLevel.java +++ b/Session4/AccessLevel.java @@ -1,5 +1,3 @@ -package lk.ac.pdn; - public enum AccessLevel{ FULL_ACCESS("***"), LIMITED_ACCESS("**"), diff --git a/Session4/Main.java b/Session4/Main.java new file mode 100644 index 0000000..f86a463 --- /dev/null +++ b/Session4/Main.java @@ -0,0 +1,28 @@ +public class Main{ + + public void validateRegNo(String regNo) { + if(regNo.length()==8 && (regNo.charAt(0)=='S' || regNo.charAt(0)=='s') && (regNo.charAt(1)=='/') && (regNo.charAt(4)=='/') && Character.isDigit(regNo.charAt(2)) && Character.isDigit(regNo.charAt(3)) && Character.isDigit(regNo.charAt(5)) && Character.isDigit(regNo.charAt(6)) && Character.isDigit(regNo.charAt(7))){ + System.out.println("Valid RegNo"); + } + else { + System.out.println("Invalid RegNo"); + } + } + + public static void main(String[] args) + { + + final String accessLevel= AccessLevel.FULL_ACCESS.symbol; + AccessLevel.checkAccess(accessLevel); + //AccessLevel.checkAccess(s); + Personnel p1 = new Personnel(); + + if (p1.validateLogin()) + System.out.println("Success"); + else + System.out.println("Failed"); + + + } + +} diff --git a/Session4/StringEnumPasswordApp/src/lk/ac/pdn/Personnel.java b/Session4/Personnel.java similarity index 97% rename from Session4/StringEnumPasswordApp/src/lk/ac/pdn/Personnel.java rename to Session4/Personnel.java index 8d43139..6ff499f 100644 --- a/Session4/StringEnumPasswordApp/src/lk/ac/pdn/Personnel.java +++ b/Session4/Personnel.java @@ -1,5 +1,3 @@ -package lk.ac.pdn; - import java.security.SecureRandom; import java.util.Arrays; import java.util.Scanner; diff --git a/Session4/StringEnumPasswordApp/bin/lk/ac/pdn/AccessLevel.class b/Session4/StringEnumPasswordApp/bin/lk/ac/pdn/AccessLevel.class deleted file mode 100644 index 761709b5900e6e5ca12e3e5f369ec85a86aebe84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1530 zcmZ`(+foxj5IvL4=CWBXS%E-65QCa5mxu~ph)N6rQU<7EfvVtxwJa+HHVNiJ6`$fi z@SvbVX-WC)M_Kl40<1vturt%sr%#{mp8Way;|#zv%zNQt=(Kj@x)I;oEXI?DVOA-==*xy(u-U1bg@=o2+Xc#v+t9sR9e#*LfIRkQv}Rr7BVa8nG4t8a#~wi z&ZL|+PvxMnQL-46>?My@E$53{6e5sbTwNGiOJ-NoMAiMSDVHx{SovbU`ien_#?~0z zsnVwDgXn`oCRJ4>Fm%Z1L>Gf6(eRB%ud`;Zn__EzLU+p$;qk%iLob6%Rk`uD3@^(Bw`AznnqJQHvu%_hAj&h0F?8LO zSUrtl8GcBlu)3YEkfvztdcssWW7{-#>%FA*-ViRfE@2#xy?DgXezo>8o?wCsWqz#b z7P0&nU}DptHXUKc%Y7cgL)aI)fOiaK47QMBXkj-{4rw7<2x=;AgiBP>ayarGV&7D zuTVeJrk<3?Hn!P`$aRNC7(d3qLA)k=^a z7H&y29Q8go4g?2IlL*Xy)*NN55j(?7`h(eJw}OV_RdbnA43n7Rh%+R*k=wQ{n@v+5 zOIOD<5)31Sx2E}VJD=aREQVwcOAj`uk|lLq!7TOFJgJp^SCxB#RwLY19rL(Gne78< zA9b=&5$TKQ%s$5g!&JAvJ=tjbo+n)mDa4exuHy!7GK?Mz*Qtm=ntoMvok(YT67KlE zD}|TSa2sikI}DTE+RmLiGFWEN%N=Y{gg zM2FGwjXfH2K%xy(5V)?w-LQ+ECjPH(7*A=; z1>v}|LTeU{DjmSoC0nK;i|$4lBK54Q@{)Pdxr|zYu#bwO9v&9QPJg@M-7sjD-)h*h zK->&5b>C~M5iEhGKtBNxA&m~0B&U}_Uq;`-Hia!brz&2MT}R{(G923+DNf!z I*&=xP5BMPE6951J diff --git a/Session4/StringEnumPasswordApp/bin/lk/ac/pdn/Personnel.class b/Session4/StringEnumPasswordApp/bin/lk/ac/pdn/Personnel.class deleted file mode 100644 index ec66e553f2db30f9b087c2fd17516fa8c77d63ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2875 zcmZ`*`F9gl7`@XZB!m%KN|j=PhzLzei3@_XrAkYYVp=MN*4B;buViNz#_$InB)5=3DN)-}n0WzkmD%-~s#?MV*31^Hf^X z)5WZn9ukggTb3}R2rH;RsZD8VQ?qjEBNHcu?kQL~X*jMos1<~QwV8$eVb3wFT&IGV zsa5x5C096>e{^+TbMqoQq`B^C+sP^jyP8RJN%PfSkU)P1}X2g^*X)@~S z8e?)8Y2dNs8D@GoSd=cibknd5uUkQ=H910yy>?bau}(pQAK~KjD{(8xP?Gm3UX<|Dv77Ja57jk}3!QCc!(wv`losw-3`M`X75s<;ok z2&pB`Fp71p$>pTSu$xE+K}hy1F~slyK@OIS72-P*F?2AfqoQ5-K`(5?(S`0P_AMpG zmz9bK@emOg&y+ONy&>E{nVrdT33rc*2v*3^0TofKh~glXb)!ssN`{#gj`Vm)ML!M` ziz&@4i6fH=wk^h@YJ7Rpar7Z0xw>1922~uv5JS|8MPX6j?Tf8c5nX1b5(stGhodTn zCDJj^4$jN)j;k1vi>o|4W1kjIujUGw-D4_ZGP`jF8~p5Cp_d%Pn@$hQfjFvJS-TL& z7`DpClPaFV)67z`*l&@@aBF|EUs}>s#IZ{H(j^oOy@^}PB4vmQCROB+=f|>|Z$RpQ zbL^B}PO4am6)~6!wjaxjM3r_oF>RL;z7#|@k+l<+?IjADr{{Oljh8nh+lv}Qtv|`K zuNq->>9$4r7lvy6CFEE+1ua1yHwA|lZW;D8{nUU~tW;m0M5_x^Do*1J$<*_jv%dmX zZyaawY!v6JCFR#jFHdMXt53yqIM0|2b}f%{iEwXnToU_&)W(Yp=4QAqDBvtEsVXrU*Jn_236gkvusC5ecw>uRbdg!uW==cZse!b+V24Zx)>Y zrjY$N%Z6`2#VvfsWuNCe%)+ck1MRHkY^QGxSbZIhW7p6$i`#$0=3lu}M_-^Nh0k@^ z;;(=+HviyTr9fNK)6c0{+<6UmtxcBEb`6`$xF;j0_t&Naa=NEB9hB3(wP{DVy*XS) z=Vgqi+GemnwPOaosq5$)Yn#Kvvv_1j83ScJTE?*%j9$ms*eo9Jh@_e$4cqI>cwz=8 z{L`u5abgY={GdJfU=Csi##OA6{!Y=K%q!&QHOQ+2xSbhnBtDxs+ss*ldES8(pZDNS z?8R2>$2J^BD+?rvW85jA9aBW@0`A3Eym_u*H-6$jDiWXW01ck8IBUcwK0^xkUiCSu zqt$8HJQbo{14WL)wAPAe;P9-=ubNRePot42lqkAtf0FRH>}?h34^*IcB}%jKGSS`P z(C)}pjHa3*Wt8@{%whU6cC|ExPrSdcrT*-ThnETC=%t9#6iJow`jz<~+sMK%j55Hm+t*VM^>mO*J4{_1$Hs%j#Kg3@i zAMzQdl270xjsnc~ATm$qyln_rA2mwJ&XcRk0=oeh8XM+mY{?nA`IsaHh43dG$ig}< zweo3Ao0&GMYP5{cE@SUf5f4b{7bI8FC?&@=!&h@GJcqA-3CTwdvn@mmWIjgD*TBOD z^1p@MJc)C71m}s-MIV<$5KKi&Yl!f7L`dPe?Y@HQe6_@&{DUFp&7JRQw+=u22MLmx A^Z)<= diff --git a/Session4/StringEnumPasswordApp/src/lk/ac/pdn/Main.java b/Session4/StringEnumPasswordApp/src/lk/ac/pdn/Main.java deleted file mode 100644 index 106d220..0000000 --- a/Session4/StringEnumPasswordApp/src/lk/ac/pdn/Main.java +++ /dev/null @@ -1,33 +0,0 @@ -package lk.ac.pdn; - -import java.lang.String; - -public class Main{ - //s/14/569 - -// public void validateRegNo(String regNo) { -// if(regNo.length()==8 && (regNo.charAt(0)=='S' || regNo.charAt(0)=='s') && (regNo.charAt(1)=='/') && (regNo.charAt(4)=='/') && Character.isDigit(regNo.charAt(2)) && Character.isDigit(regNo.charAt(3)) && Character.isDigit(regNo.charAt(5)) && Character.isDigit(regNo.charAt(6)) && Character.isDigit(regNo.charAt(7))){ -// System.out.println("Valid RegNo"); -// } -// else { -// System.out.println("Invalid RegNo"); -// } -// } - - public static void main(String[] args) - { - - final String accessLevel= AccessLevel.FULL_ACCESS.symbol; - AccessLevel.checkAccess(accessLevel); - //AccessLevel.checkAccess(s); - Personnel p1 = new Personnel(); - - if (p1.validateLogin()) - System.out.println("Success"); - else - System.out.println("Failed"); - - - } - -} diff --git a/Session6/Group/SecretService/build.xml b/Session6/Group/SecretService/build.xml deleted file mode 100644 index 5525ee5..0000000 --- a/Session6/Group/SecretService/build.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - Builds, tests, and runs the project SecretService. - - - diff --git a/Session6/Group/SecretService/build/built-jar.properties b/Session6/Group/SecretService/build/built-jar.properties deleted file mode 100644 index 1c8e52b..0000000 --- a/Session6/Group/SecretService/build/built-jar.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Thu, 26 Dec 2019 20:32:07 +0530 - - -C\:\\Users\\Hp-Pc\\Documents\\NetBeansProjects\\SecretService= diff --git a/Session6/Group/SecretService/build/classes/lk/intel/SecretService.class b/Session6/Group/SecretService/build/classes/lk/intel/SecretService.class deleted file mode 100644 index d3141573f9dc82e580ff5032a6e2e4de0f14c74a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1085 zcmaJ=?QRl56g{&*m##o@3yAfrezZ`iUHYL_sjY1jqXw%H(}eiL3^2uMmtC_gO?(Sq zMSqmUCO&|V;zJnkENv;4xIcDw&OP_sbMMUl`t#!_fF*1hFfpqm7ezjbxe&D92L?10 zbQGhQH=yIbj)f>J0|rVev^Y+A%TcTtcz}mGR&_jL7+aH$^w$|e`MF(&@V46&3=hA3c zkK*x8-^n}CaJ?o&ZXk3L`RD~9G9Fm&6DiZEx?Qg!p39*5p|%!OxfmvqVo05Je$E&T zvs79ojaR%aI@4RO(^T}w)W~S3YP?c(ec^D&pWb$D*Acc#dBQMrR^fk+8T4~$th(TdGk^-m0ao}wo^Pp{5uln#1WE%T2rI~B#|JCSu&X; sb4Ai$Mkc6V=-0q?+#p^8v$%;{CL5l6$!Uz~gf^8f$< diff --git a/Session6/Group/SecretService/build/classes/lk/intel/agent/Agent.class b/Session6/Group/SecretService/build/classes/lk/intel/agent/Agent.class deleted file mode 100644 index 2c0f58b0ec08cf2b5b99feff9b60629da60f9335..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1826 zcmaJ>Yf}?R6g{2SB*TE11W?fxA83f;APPPgA0Ub%C=sgsWDS!RTPHKA$;8s%;9v2> zt|hTbtM&)%kJ{SX-BXhQ!F;&=xVO(e_uM=A_rIV20GP#=i4x`tC}Lik8`9jA=9Y=u zxFgNo0{+B;fqNzjn9Jk7TpvjD(8MB^@_3ZTvOGUF@Wj9hL*5PQe9dWahT`gb=c8kL zj=y8qqEPrdcgP=d$J742sIRpf+dO1o^m4Gp!;iw{A$NnY&Tw(n`(O({;+`FQ-e{Ly z(}5c*kT7$1g)gE7hDzmN%7Zs6Q(Fv~MdHbDWL5ZFvv}ofdx~}7I^LEO3VDt%GtoQI zVi@gGa(1{M*$<>81}WDk6G|h9`ap|E8%dobeOO5f13SG@<;v7Sstj3zT3I5#6-7Hs zZ{#sunIg%IW*9Vrh*)Pr$N#`E)DW$f2>e>xb$N>zQygU)bn5j-pPD=r+;?S-P3lIp zM@9y-7PLc`FAJ%HsVci78)#u1GZxAiu`nvl7>-#ujuQr+T6iXXtC%tH+`<~x8OHW^ z{b5^pb=l<&C zB+bd8NH{~EcZt6K3`k6j&@Lr=s#a>NTB)ktKVSB8&9CgdxgNqTADSTh;F|K^)|-jI)%Nsogo+rPS^`aY)nc zBre367sw-hIhi%x&1I_FTNe(a>BhN!t!r)FI@6l2ZCYney z8?M{VL95B_Yt!J2*gm7O;~55boR-&qXF87AvGzKizqPxxB480pKT_ z8y)*p3waOy8}g8@Y%B(r)QydonM)%;9(TC=VX$H|L*WJJ_*v{hwN{U%)hluV0rvXq zT#C!@2;l;R2OK98WRc1Q1dk(Kk!yYtr5hwT0iEdgRIQG_Rq(Poq;<@|cf1_-ea^HD zn_psDhIt?cvY6`mMHzC-=XjC2!TCMm_8cEI)U3)_@%K|)t|)F8K8QhhB~uX*?gM!eYl$jU#!j>uD8X97P577L$NbY2;!6H$ z8Wbu2RKZEc_bSbVG`sK-UKyX{E^^MdR-j+?Bb5WMUZhMIiO~a^4Yf4vB6eE6CFwg3 z60jld8)tnPC2$C37(JvpSVUO{KvGeVd4Mbo0TGFcz>m<9K&u}l6$M#L1X-ZRF_0N_ zBnnaoh&lx1392hV7U^jMi2N;5k<~u@Ahi&ro(PhTf@~#%sI(kr vv5n~wea)-Kx0IGY4~%F)vyIVz*(a0lb$BINMiw%$>b{1|ZlcVpU%a({N1Q3a diff --git a/Session6/Group/SecretService/manifest.mf b/Session6/Group/SecretService/manifest.mf deleted file mode 100644 index 1574df4..0000000 --- a/Session6/Group/SecretService/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/Session6/Group/SecretService/nbproject/build-impl.xml b/Session6/Group/SecretService/nbproject/build-impl.xml deleted file mode 100644 index fa2c048..0000000 --- a/Session6/Group/SecretService/nbproject/build-impl.xml +++ /dev/null @@ -1,1041 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 -cp "${run.classpath.with.dist.jar}" ${main.class} - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - - - - - - - - - - - - - - Must select one file in the IDE or set profile.class - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 one file in the IDE or set test.class - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Session6/Group/SecretService/nbproject/genfiles.properties b/Session6/Group/SecretService/nbproject/genfiles.properties deleted file mode 100644 index 9a045aa..0000000 --- a/Session6/Group/SecretService/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=d1ba3924 -build.xml.script.CRC32=2da3fbac -build.xml.stylesheet.CRC32=28e38971@1.43.1.45 -# 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=d1ba3924 -nbproject/build-impl.xml.script.CRC32=43dbe16e -nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45 diff --git a/Session6/Group/SecretService/nbproject/private/private.properties b/Session6/Group/SecretService/nbproject/private/private.properties deleted file mode 100644 index aaa36b0..0000000 --- a/Session6/Group/SecretService/nbproject/private/private.properties +++ /dev/null @@ -1,2 +0,0 @@ -compile.on.save=true -user.properties.file=C:\\Users\\Hp-Pc\\.netbeans\\7.0\\build.properties diff --git a/Session6/Group/SecretService/nbproject/private/private.xml b/Session6/Group/SecretService/nbproject/private/private.xml deleted file mode 100644 index cc2c0e5..0000000 --- a/Session6/Group/SecretService/nbproject/private/private.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/Session6/Group/SecretService/nbproject/project.properties b/Session6/Group/SecretService/nbproject/project.properties deleted file mode 100644 index d2df090..0000000 --- a/Session6/Group/SecretService/nbproject/project.properties +++ /dev/null @@ -1,71 +0,0 @@ -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}/SecretService.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.6 -javac.target=1.6 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -main.class=lk.intel.SecretService -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.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/Session6/Group/SecretService/nbproject/project.xml b/Session6/Group/SecretService/nbproject/project.xml deleted file mode 100644 index fb63eb1..0000000 --- a/Session6/Group/SecretService/nbproject/project.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - org.netbeans.modules.java.j2seproject - - - SecretService - - - - - - - - - diff --git a/Session6/Group/SecretService/src/lk/intel/SecretService.java b/Session6/Group/SecretService/src/lk/intel/SecretService.java deleted file mode 100644 index abc333b..0000000 --- a/Session6/Group/SecretService/src/lk/intel/SecretService.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package lk.intel; -import lk.intel.service_record.ServiceRecord; -import lk.intel.agent.Agent; -import java.lang.String; -import java.lang.StringBuffer; -/** - * - * @author Hp-Pc - */ -public class SecretService { - public static void main(String[] args){ - Agent agent1 = new Agent("007","James Bond",191083); - StringBuffer sb=new StringBuffer("Lieutenant Colonel"); - ServiceRecord serviceRecord= new ServiceRecord(sb,"Colonel",20,50); - - agent1.printServiceRecord(); - agent1.promote("Brigadier General"); - agent1.missionSuccess(); - agent1.addExperience(); - } -} \ No newline at end of file diff --git a/Session6/Individual/SecretService/build.xml b/Session6/Individual/SecretService/build.xml deleted file mode 100644 index 5525ee5..0000000 --- a/Session6/Individual/SecretService/build.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - Builds, tests, and runs the project SecretService. - - - diff --git a/Session6/Individual/SecretService/build/built-jar.properties b/Session6/Individual/SecretService/build/built-jar.properties deleted file mode 100644 index 1c8e52b..0000000 --- a/Session6/Individual/SecretService/build/built-jar.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Thu, 26 Dec 2019 20:32:07 +0530 - - -C\:\\Users\\Hp-Pc\\Documents\\NetBeansProjects\\SecretService= diff --git a/Session6/Individual/SecretService/build/classes/lk/intel/SecretService.class b/Session6/Individual/SecretService/build/classes/lk/intel/SecretService.class deleted file mode 100644 index d3141573f9dc82e580ff5032a6e2e4de0f14c74a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1085 zcmaJ=?QRl56g{&*m##o@3yAfrezZ`iUHYL_sjY1jqXw%H(}eiL3^2uMmtC_gO?(Sq zMSqmUCO&|V;zJnkENv;4xIcDw&OP_sbMMUl`t#!_fF*1hFfpqm7ezjbxe&D92L?10 zbQGhQH=yIbj)f>J0|rVev^Y+A%TcTtcz}mGR&_jL7+aH$^w$|e`MF(&@V46&3=hA3c zkK*x8-^n}CaJ?o&ZXk3L`RD~9G9Fm&6DiZEx?Qg!p39*5p|%!OxfmvqVo05Je$E&T zvs79ojaR%aI@4RO(^T}w)W~S3YP?c(ec^D&pWb$D*Acc#dBQMrR^fk+8T4~$th(TdGk^-m0ao}wo^Pp{5uln#1WE%T2rI~B#|JCSu&X; sb4Ai$Mkc6V=-0q?+#p^8v$%;{CL5l6$!Uz~gf^8f$< diff --git a/Session6/Individual/SecretService/build/classes/lk/intel/agent/Agent.class b/Session6/Individual/SecretService/build/classes/lk/intel/agent/Agent.class deleted file mode 100644 index 2c0f58b0ec08cf2b5b99feff9b60629da60f9335..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1826 zcmaJ>Yf}?R6g{2SB*TE11W?fxA83f;APPPgA0Ub%C=sgsWDS!RTPHKA$;8s%;9v2> zt|hTbtM&)%kJ{SX-BXhQ!F;&=xVO(e_uM=A_rIV20GP#=i4x`tC}Lik8`9jA=9Y=u zxFgNo0{+B;fqNzjn9Jk7TpvjD(8MB^@_3ZTvOGUF@Wj9hL*5PQe9dWahT`gb=c8kL zj=y8qqEPrdcgP=d$J742sIRpf+dO1o^m4Gp!;iw{A$NnY&Tw(n`(O({;+`FQ-e{Ly z(}5c*kT7$1g)gE7hDzmN%7Zs6Q(Fv~MdHbDWL5ZFvv}ofdx~}7I^LEO3VDt%GtoQI zVi@gGa(1{M*$<>81}WDk6G|h9`ap|E8%dobeOO5f13SG@<;v7Sstj3zT3I5#6-7Hs zZ{#sunIg%IW*9Vrh*)Pr$N#`E)DW$f2>e>xb$N>zQygU)bn5j-pPD=r+;?S-P3lIp zM@9y-7PLc`FAJ%HsVci78)#u1GZxAiu`nvl7>-#ujuQr+T6iXXtC%tH+`<~x8OHW^ z{b5^pb=l<&C zB+bd8NH{~EcZt6K3`k6j&@Lr=s#a>NTB)ktKVSB8&9CgdxgNqTADSTh;F|K^)|-jI)%Nsogo+rPS^`aY)nc zBre367sw-hIhi%x&1I_FTNe(a>BhN!t!r)FI@6l2ZCYney z8?M{VL95B_Yt!J2*gm7O;~55boR-&qXF87AvGzKizqPxxB480pKT_ z8y)*p3waOy8}g8@Y%B(r)QydonM)%;9(TC=VX$H|L*WJJ_*v{hwN{U%)hluV0rvXq zT#C!@2;l;R2OK98WRc1Q1dk(Kk!yYtr5hwT0iEdgRIQG_Rq(Poq;<@|cf1_-ea^HD zn_psDhIt?cvY6`mMHzC-=XjC2!TCMm_8cEI)U3)_@%K|)t|)F8K8QhhB~uX*?gM!eYl$jU#!j>uD8X97P577L$NbY2;!6H$ z8Wbu2RKZEc_bSbVG`sK-UKyX{E^^MdR-j+?Bb5WMUZhMIiO~a^4Yf4vB6eE6CFwg3 z60jld8)tnPC2$C37(JvpSVUO{KvGeVd4Mbo0TGFcz>m<9K&u}l6$M#L1X-ZRF_0N_ zBnnaoh&lx1392hV7U^jMi2N;5k<~u@Ahi&ro(PhTf@~#%sI(kr vv5n~wea)-Kx0IGY4~%F)vyIVz*(a0lb$BINMiw%$>b{1|ZlcVpU%a({N1Q3a diff --git a/Session6/Individual/SecretService/manifest.mf b/Session6/Individual/SecretService/manifest.mf deleted file mode 100644 index 1574df4..0000000 --- a/Session6/Individual/SecretService/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/Session6/Individual/SecretService/nbproject/build-impl.xml b/Session6/Individual/SecretService/nbproject/build-impl.xml deleted file mode 100644 index fa2c048..0000000 --- a/Session6/Individual/SecretService/nbproject/build-impl.xml +++ /dev/null @@ -1,1041 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 -cp "${run.classpath.with.dist.jar}" ${main.class} - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - - - - - - - - - - - - - - Must select one file in the IDE or set profile.class - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 one file in the IDE or set test.class - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/Session6/Individual/SecretService/nbproject/genfiles.properties b/Session6/Individual/SecretService/nbproject/genfiles.properties deleted file mode 100644 index 9a045aa..0000000 --- a/Session6/Individual/SecretService/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=d1ba3924 -build.xml.script.CRC32=2da3fbac -build.xml.stylesheet.CRC32=28e38971@1.43.1.45 -# 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=d1ba3924 -nbproject/build-impl.xml.script.CRC32=43dbe16e -nbproject/build-impl.xml.stylesheet.CRC32=0c01fd8e@1.43.1.45 diff --git a/Session6/Individual/SecretService/nbproject/private/private.properties b/Session6/Individual/SecretService/nbproject/private/private.properties deleted file mode 100644 index aaa36b0..0000000 --- a/Session6/Individual/SecretService/nbproject/private/private.properties +++ /dev/null @@ -1,2 +0,0 @@ -compile.on.save=true -user.properties.file=C:\\Users\\Hp-Pc\\.netbeans\\7.0\\build.properties diff --git a/Session6/Individual/SecretService/nbproject/private/private.xml b/Session6/Individual/SecretService/nbproject/private/private.xml deleted file mode 100644 index cc2c0e5..0000000 --- a/Session6/Individual/SecretService/nbproject/private/private.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/Session6/Individual/SecretService/nbproject/project.properties b/Session6/Individual/SecretService/nbproject/project.properties deleted file mode 100644 index d2df090..0000000 --- a/Session6/Individual/SecretService/nbproject/project.properties +++ /dev/null @@ -1,71 +0,0 @@ -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}/SecretService.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.6 -javac.target=1.6 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -main.class=lk.intel.SecretService -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.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -source.encoding=UTF-8 -src.dir=src -test.src.dir=test diff --git a/Session6/Individual/SecretService/nbproject/project.xml b/Session6/Individual/SecretService/nbproject/project.xml deleted file mode 100644 index fb63eb1..0000000 --- a/Session6/Individual/SecretService/nbproject/project.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - org.netbeans.modules.java.j2seproject - - - SecretService - - - - - - - - - diff --git a/Session6/Individual/SecretService/src/lk/intel/agent/Agent.java b/Session6/Individual/SecretService/src/lk/intel/agent/Agent.java deleted file mode 100644 index 94d043a..0000000 --- a/Session6/Individual/SecretService/src/lk/intel/agent/Agent.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package lk.intel.agent; -import lk.intel.service_record.ServiceRecord; -/** - * - * @author Hp-Pc - */ -public class Agent { - public String codeName; - private String realName; - private int idNumber; - private ServiceRecord servicerecord; - - public Agent(String cn,String rn,int id){ - this.codeName=cn; - this.realName=rn; - this.idNumber=id; - - } - - public void setRealName(String rn){ - int length = String.valueof(rn).length(); - if(length<7){ - this.realName=rn; - } - - } - - public String getRealName(){ - return realName; - } - - public void setID(int id){ - this.idNumber=id; - } - - public int getID(){ - return idNumber; - } - - public void promote(String rank){ - int previousRankCount = servicerecord.previousRanks.length(); - if(servicerecord.getYearsOfService/10 > previousRankCount){ - servicerecord.previousRanks.append(servicerecord.currentRank); - System.out.println("\nThe previous rank:"+ servicerecord.currentRank); - serviceRecord.currentRank = rank; - System.out.println("\nThe previous rank:"+ servicerecord.currentRank); - } - - - } - - public void missionSuccess(){ - servicerecord.incrementSuccessfulMissionCount(); - } - - public void addExperience(){ - servicerecord.incrementYearsOfService(); - } - - public void printServiceRecord(){ - System.out.println("\nCode name:"+this.codeName); - System.out.println("\nReal name:"+this.realName); - System.out.println("\nID Number:"+this.idNumber); - - } - -} diff --git a/Session6/Individual/SecretService/src/lk/intel/service_record/ServiceRecord.java b/Session6/Individual/SecretService/src/lk/intel/service_record/ServiceRecord.java deleted file mode 100644 index a31901e..0000000 --- a/Session6/Individual/SecretService/src/lk/intel/service_record/ServiceRecord.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -package lk.intel.service_record; -import java.lang.StringBuffer; -/** - * - * @author Hp-Pc - */ -public class ServiceRecord { - private StringBuffer previousRanks; - private String currentRank; - private int yearsOfService; - private int successfulMissionCount; - - public ServiceRecord(StringBuffer pr,String cr,int yrs,int mcount){ - this.previousRanks=pr; - this.currentRank=cr; - this.yearsOfService=yrs; - this.successfulMissionCount=mcount; - } - - public void setPreviousRanks(StringBuffer pr){ - this.previousRanks=pr; - } - - public StringBuffer getPreviousRanks(){ - return previousRanks; - } - - public void setCurrentRank(String cr){ - this.currentRank=cr; - } - - public String getCurrentRank(){ - return currentRank; - } - - public void setYearsOfService(int yr){ - this.yearsOfService=yr; - } - - public int getYearsOfService(){ - return yearsOfService; - } - - public void setSuccessfulMissionCount(int c){ - this.successfulMissionCount=c; - } - - public int getSuccessfulMissionCount(){ - return successfulMissionCount; - } - - public void incrementSuccessfulMissionCount(){ - successfulMissionCount++; - } - - public void incrementYearsOfService(){ - yearsOfService++; - } - -} - diff --git a/Session6/Individual/SecretService/src/lk/intel/SecretService.java b/Session6/SecretService/lk/intel/SecretService.java similarity index 81% rename from Session6/Individual/SecretService/src/lk/intel/SecretService.java rename to Session6/SecretService/lk/intel/SecretService.java index 427f87e..aba25d4 100644 --- a/Session6/Individual/SecretService/src/lk/intel/SecretService.java +++ b/Session6/SecretService/lk/intel/SecretService.java @@ -1,16 +1,9 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ package lk.intel; import lk.intel.service_record.ServiceRecord; import lk.intel.agent.Agent; import java.lang.String; import java.lang.StringBuffer; -/** - * - * @author Hp-Pc - */ + public class SecretService { public static void main(String[] args){ Agent agent1 = new Agent("007","James Bond",191083); diff --git a/Session6/Group/SecretService/src/lk/intel/agent/Agent.java b/Session6/SecretService/lk/intel/agent/Agent.java similarity index 72% rename from Session6/Group/SecretService/src/lk/intel/agent/Agent.java rename to Session6/SecretService/lk/intel/agent/Agent.java index cff47aa..68fa6bc 100644 --- a/Session6/Group/SecretService/src/lk/intel/agent/Agent.java +++ b/Session6/SecretService/lk/intel/agent/Agent.java @@ -1,13 +1,6 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ package lk.intel.agent; import lk.intel.service_record.ServiceRecord; -/** - * - * @author Hp-Pc - */ + public class Agent { public String codeName; private String realName; @@ -22,7 +15,11 @@ public Agent(String cn,String rn,int id){ } public void setRealName(String rn){ - this.realName=rn; + int length = String.valueof(rn).length(); + if(length<7){ + this.realName=rn; + } + } public String getRealName(){ @@ -38,10 +35,11 @@ public int getID(){ } public void promote(String rank){ - servicerecord.previousRanks.append(servicerecord.currentRank); - System.out.println("\nThe previous rank:"+ servicerecord.currentRank); - servicerecord.currentRank = rank; - System.out.println("\nThe current rank:"+ servicerecord.currentRank); + int previousRankCount = servicerecord.previousRanks.length(); + if(servicerecord.getYearsOfService()/10 >= previousRankCount){ + servicerecord.setPreviousRank(serviceRecord.getCurrentRank()); + serviceRecord.setCurrentRank(rank); + } } public void missionSuccess(){ diff --git a/Session6/Group/SecretService/src/lk/intel/service_record/ServiceRecord.java b/Session6/SecretService/lk/intel/service_record/ServiceRecord.java similarity index 78% rename from Session6/Group/SecretService/src/lk/intel/service_record/ServiceRecord.java rename to Session6/SecretService/lk/intel/service_record/ServiceRecord.java index a31901e..be59727 100644 --- a/Session6/Group/SecretService/src/lk/intel/service_record/ServiceRecord.java +++ b/Session6/SecretService/lk/intel/service_record/ServiceRecord.java @@ -1,28 +1,21 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ package lk.intel.service_record; import java.lang.StringBuffer; -/** - * - * @author Hp-Pc - */ + public class ServiceRecord { private StringBuffer previousRanks; private String currentRank; private int yearsOfService; private int successfulMissionCount; - public ServiceRecord(StringBuffer pr,String cr,int yrs,int mcount){ - this.previousRanks=pr; + public ServiceRecord(Striing pr,String cr,int yrs,int mcount){ + this.previousRanks=new StringBuffer(pr); this.currentRank=cr; this.yearsOfService=yrs; this.successfulMissionCount=mcount; } - public void setPreviousRanks(StringBuffer pr){ - this.previousRanks=pr; + public void setPreviousRanks(String pr){ + this.previousRanks.append(pr); } public StringBuffer getPreviousRanks(){