diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 9ea3567..6de42d0 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -6,7 +6,7 @@ { "id": "7b5e68cfd661dd0d", "type": "tabs", - "dimension": 59.34959349593496, + "dimension": 61.240310077519375, "children": [ { "id": "505b4bbc8a7e15f6", @@ -25,7 +25,7 @@ { "id": "0df2a38b58c879ff", "type": "tabs", - "dimension": 40.65040650406504, + "dimension": 38.759689922480625, "children": [ { "id": "a9b5c2a99473859a", @@ -184,30 +184,31 @@ "switcher:Open quick switcher": false } }, - "active": "505b4bbc8a7e15f6", + "active": "ff4e63a36b080692", "lastOpenFiles": [ + "Semester 2/Programming 2/Project/Part 2/Library.java#", + "Semester 2/Programming 2/Project/Part 2/Periodical.java#", + "Semester 2/Programming 2/Project/Part 2/data/item_data_2.txt", + "Semester 2/Programming 2/Project/Part 2/data/item_data_1_v2.txt", + "Semester 2/Programming 2/Project/Part 2/data/item_data_1.txt", + "Semester 2/Programming 2/Project/Part 2/data", + "Semester 2/Programming 2/Project/Part 2/LibraryItem.ctxt", + "Semester 2/Programming 2/Project/Part 2/LibraryItem.class", + "Semester 2/Programming 2/Project/Part 2/LibraryItem.java#", + "Semester 2/Programming 2/Project/Part 2/LibraryItem.java", + "Semester 2/Programming 2/Project/Part 2/__SHELL63.class", + "Semester 2/Programming 2/Project/Part 2/Part 1/doc/resources/inherit.gif", + "Semester 2/Programming 2/Project/Part 2/doc/resources/inherit.gif", + "Semester 2/Programming 2/Project/Part 1 (copy)/doc/resources/inherit.gif", "images/Pasted image 20240213172702.png", "images/Pasted image 20240213172509.png", "images/Pasted image 20240213172304.png", - "Semester 2/Database Systems/Exercise Booklet.pdf", - "Semester 2/Database Systems/Booklet of Lecture Slides for Semester Two (2).pdf", "Semester 2/Database Systems/Week 5/Week 5 Database Systems.md", "images/Pasted image 20240213161136.png", "images/Pasted image 20240213133455.png", "images/Pasted image 20240213132603.png", "images/Pasted image 20240213132227.png", - "images/Pasted image 20240213131815.png", - "images/Pasted image 20240213131802.png", - "images/Pasted image 20240213131718.png", "Semester 2/Database Systems/Week 4/Week 4 Database Systems.md", - "Semester 2/Database Systems/Week 5", - "Semester 2/Database Systems/Week 4", - "Semester 2/Programming 2/Project/Part 1/__SHELL78.class", - "Semester 2/Programming 2/Project/Part 1/__SHELL78.java", - "Semester 2/Programming 2/Project/Part 1/__SHELL75.class", - "Semester 2/Programming 2/Project/Part 1/__SHELL75.java", - "Semester 2/Programming 2/Project/Part 1/__SHELL74.class", - "Semester 2/Programming 2/Project/Part 1/__SHELL74.java", "Semester 2/HCI/Week 2/Week 2 Human Computer Interfaces.md", "Semester 2/HCI/Week 3/Week 3 Human Computer Interfaces.md", "Semester 1/Database Systems/Week 10/Week 10 Database Systems.md", @@ -222,7 +223,6 @@ "Semester 1/Database Systems/Week 6/Week 6 Database Systems.md", "Semester 2/Database Systems/Week 3/Week 3 Database Systems.md", "Semester 2/Database Systems/Week 2/Week 2 Database Systems.md", - "images/Pasted image 20240126103004.png", "CCNA/1 - Networking Today/1.2 - Network Components.md", "CCNA/1 - Networking Today/1.1 - Networks Affect our Lives.md", "CCNA/Module Information.md", diff --git a/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/MessagePost.class b/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/MessagePost.class new file mode 100644 index 0000000..271e136 Binary files /dev/null and b/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/MessagePost.class differ diff --git a/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/NewsFeed.class b/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/NewsFeed.class new file mode 100644 index 0000000..3ced8da Binary files /dev/null and b/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/NewsFeed.class differ diff --git a/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/PhotoPost.class b/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/PhotoPost.class new file mode 100644 index 0000000..f558acd Binary files /dev/null and b/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/PhotoPost.class differ diff --git a/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/package.bluej b/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/package.bluej index 4b92da1..f298269 100755 --- a/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/package.bluej +++ b/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v1/package.bluej @@ -6,11 +6,11 @@ dependency2.from=NewsFeed dependency2.to=MessagePost dependency2.type=UsesDependency objectbench.height=76 -objectbench.width=798 +objectbench.width=816 package.editor.height=437 package.editor.width=690 -package.editor.x=70 -package.editor.y=80 +package.editor.x=40 +package.editor.y=71 package.numDependencies=2 package.numTargets=3 package.showExtends=true @@ -36,7 +36,7 @@ target1.y=100 target2.editor.height=753 target2.editor.width=940 target2.editor.x=59 -target2.editor.y=22 +target2.editor.y=31 target2.height=60 target2.name=PhotoPost target2.naviview.expanded=true diff --git a/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v2/package.bluej b/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v2/package.bluej index 78ce515..7018723 100755 --- a/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v2/package.bluej +++ b/Semester 1/Programming 1/Java/examples/projects/chapter10/network-v2/package.bluej @@ -3,11 +3,11 @@ dependency1.from=NewsFeed dependency1.to=Post dependency1.type=UsesDependency objectbench.height=76 -objectbench.width=829 +objectbench.width=847 package.editor.height=462 package.editor.width=721 -package.editor.x=70 -package.editor.y=80 +package.editor.x=20 +package.editor.y=51 package.numDependencies=1 package.numTargets=4 package.showExtends=true @@ -33,7 +33,7 @@ target1.y=90 target2.editor.height=767 target2.editor.width=947 target2.editor.x=75 -target2.editor.y=23 +target2.editor.y=31 target2.height=60 target2.name=Post target2.naviview.expanded=true diff --git a/Semester 2/Programming 2/Project/Part 1/Book.class b/Semester 2/Programming 2/Project/Part 1/Book.class new file mode 100644 index 0000000..503cd1f Binary files /dev/null and b/Semester 2/Programming 2/Project/Part 1/Book.class differ diff --git a/Semester 2/Programming 2/Project/Part 1/Book.ctxt b/Semester 2/Programming 2/Project/Part 1/Book.ctxt new file mode 100644 index 0000000..c46bee4 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 1/Book.ctxt @@ -0,0 +1,8 @@ +#BlueJ class context +comment0.params= +comment0.target=Book() +comment0.text=\n\ Constructor\ for\ objects\ of\ class\ Book\n +comment1.params=y +comment1.target=int\ sampleMethod(int) +comment1.text=\n\ An\ example\ of\ a\ method\ -\ replace\ this\ comment\ with\ your\ own\n\ \n\ @param\ \ y\ \ \ a\ sample\ parameter\ for\ a\ method\n\ @return\ \ \ \ \ the\ sum\ of\ x\ and\ y\ \n +numComments=2 diff --git a/Semester 2/Programming 2/Project/Part 1/Book.java b/Semester 2/Programming 2/Project/Part 1/Book.java new file mode 100644 index 0000000..2ea4d4d --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 1/Book.java @@ -0,0 +1,47 @@ + +/** + * Write a description of class Book here. + * + * @author (your name) + * @version (a version number or a date) + */ + +import java.util.Scanner; +import java.util.ArrayList; +import java.util.NoSuchElementException; + +public class Book extends LibraryItem +{ + private String title; + private String itemCode; + private int cost; + private int timesBorrowed; + private boolean onLoan; + private String author; + private int isbn; + + /** + * Constructor for objects of class Book + */ + public Book() + { + this.title = ""; + this.itemCode = ""; + this.cost = 0; + this.timesBorrowed = 0; + this.author = ""; + this.isbn = 0; + } + + public void readItemData( Scanner detailScanner ){ + if ( detailScanner != null ) { + this.title = detailScanner.next().trim(); + this.itemCode = detailScanner.next().trim(); + this.cost = Integer.parseInt( detailScanner.next() ); + this.timesBorrowed = Integer.parseInt( detailScanner.next() ); + this.onLoan = Boolean.parseBoolean( detailScanner.next() ); + this.author = detailScanner.next().trim(); + this.isbn = Integer.parseInt( detailScanner.next() ); + } + } +} diff --git a/Semester 2/Programming 2/Project/Part 1/LibraryItem.class b/Semester 2/Programming 2/Project/Part 1/LibraryItem.class index 672b785..dda924f 100644 Binary files a/Semester 2/Programming 2/Project/Part 1/LibraryItem.class and b/Semester 2/Programming 2/Project/Part 1/LibraryItem.class differ diff --git a/Semester 2/Programming 2/Project/Part 1/LibraryItem.ctxt b/Semester 2/Programming 2/Project/Part 1/LibraryItem.ctxt index a57effa..ceb138d 100644 --- a/Semester 2/Programming 2/Project/Part 1/LibraryItem.ctxt +++ b/Semester 2/Programming 2/Project/Part 1/LibraryItem.ctxt @@ -1,35 +1,32 @@ #BlueJ class context -comment0.params=title\ itemCode\ cost\ timesBorrowed\ onLoan -comment0.target=LibraryItem(java.lang.String,\ java.lang.String,\ int,\ int,\ boolean) -comment0.text=\n\ Constructor\ for\ objects\ of\ class\ LibraryItem\n +comment0.params= +comment0.target=LibraryItem() +comment0.text=\n\ Default\ constructor\ for\ object\ of\ class\ LibraryItem\n comment1.params= -comment1.target=LibraryItem() -comment1.text=\n\ Default\ constructor\ for\ object\ of\ class\ LibraryItem\n -comment10.params=timesBorrowed -comment10.target=void\ setTimesBorrowed(int) -comment11.params=onLoan -comment11.target=void\ setOnLoan(boolean) -comment12.params= -comment12.target=void\ printDetails() -comment12.text=\n\ Field\ Mutator\ End\n -comment13.params=detailScanner -comment13.target=void\ readData(java.util.Scanner) +comment1.target=java.lang.String\ getTitle() +comment1.text=\n\ Field\ Accessor\ Start\n +comment10.params=onLoan +comment10.target=void\ setOnLoan(boolean) +comment11.params= +comment11.target=void\ printDetails() +comment11.text=\n\ Field\ Mutator\ End\n +comment12.params=detailScanner +comment12.target=void\ readData(java.util.Scanner) comment2.params= -comment2.target=java.lang.String\ getTitle() -comment2.text=\n\ Field\ Accessor\ Start\n +comment2.target=java.lang.String\ getItemCode() comment3.params= -comment3.target=java.lang.String\ getItemCode() +comment3.target=int\ getCost() comment4.params= -comment4.target=int\ getCost() +comment4.target=int\ getTimesBorrowed() comment5.params= -comment5.target=int\ getTimesBorrowed() -comment6.params= -comment6.target=boolean\ getOnLoan() -comment7.params=title -comment7.target=void\ setTitle(java.lang.String) -comment7.text=\n\ Field\ Accessor\ End\n\ \n\ Field\ Mutator\ Start\n -comment8.params=itemCode -comment8.target=void\ setItemCode(java.lang.String) -comment9.params=cost -comment9.target=void\ setCost(int) -numComments=14 +comment5.target=boolean\ getOnLoan() +comment6.params=title +comment6.target=void\ setTitle(java.lang.String) +comment6.text=\n\ Field\ Accessor\ End\n\ \n\ Field\ Mutator\ Start\n +comment7.params=itemCode +comment7.target=void\ setItemCode(java.lang.String) +comment8.params=cost +comment8.target=void\ setCost(int) +comment9.params=timesBorrowed +comment9.target=void\ setTimesBorrowed(int) +numComments=13 diff --git a/Semester 2/Programming 2/Project/Part 1/LibraryItem.java b/Semester 2/Programming 2/Project/Part 1/LibraryItem.java index bdcba6f..a219780 100644 --- a/Semester 2/Programming 2/Project/Part 1/LibraryItem.java +++ b/Semester 2/Programming 2/Project/Part 1/LibraryItem.java @@ -22,26 +22,19 @@ public class LibraryItem /** * Constructor for objects of class LibraryItem */ - public LibraryItem( String title, String itemCode, int cost, int timesBorrowed, boolean onLoan) + /*public LibraryItem( String title, String itemCode, int cost, int timesBorrowed, boolean onLoan) { this.title = title; this.itemCode = itemCode; this.cost = cost; this.timesBorrowed = timesBorrowed; this.onLoan = onLoan; - } + }*/ /* * Default constructor for object of class LibraryItem */ - public LibraryItem() - { - title = ""; - itemCode = ""; - cost = 0; - timesBorrowed = 0; - onLoan = false; - } + public LibraryItem(){} /* * Field Accessor Start diff --git a/Semester 2/Programming 2/Project/Part 1/Periodical.class b/Semester 2/Programming 2/Project/Part 1/Periodical.class new file mode 100644 index 0000000..c08ccde Binary files /dev/null and b/Semester 2/Programming 2/Project/Part 1/Periodical.class differ diff --git a/Semester 2/Programming 2/Project/Part 1/Periodical.ctxt b/Semester 2/Programming 2/Project/Part 1/Periodical.ctxt new file mode 100644 index 0000000..e285c26 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 1/Periodical.ctxt @@ -0,0 +1,8 @@ +#BlueJ class context +comment0.params= +comment0.target=Periodical() +comment0.text=\n\ Constructor\ for\ objects\ of\ class\ Periodical\n +comment1.params=y +comment1.target=int\ sampleMethod(int) +comment1.text=\n\ An\ example\ of\ a\ method\ -\ replace\ this\ comment\ with\ your\ own\n\ \n\ @param\ \ y\ \ \ a\ sample\ parameter\ for\ a\ method\n\ @return\ \ \ \ \ the\ sum\ of\ x\ and\ y\ \n +numComments=2 diff --git a/Semester 2/Programming 2/Project/Part 1/Periodical.java b/Semester 2/Programming 2/Project/Part 1/Periodical.java new file mode 100644 index 0000000..643b38f --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 1/Periodical.java @@ -0,0 +1,33 @@ + +/** + * Write a description of class Periodical here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class Periodical extends LibraryItem +{ + // instance variables - replace the example below with your own + private int x; + + /** + * Constructor for objects of class Periodical + */ + public Periodical() + { + // initialise instance variables + x = 0; + } + + /** + * An example of a method - replace this comment with your own + * + * @param y a sample parameter for a method + * @return the sum of x and y + */ + public int sampleMethod(int y) + { + // put your code here + return x + y; + } +} diff --git a/Semester 2/Programming 2/Project/Part 1/package.bluej b/Semester 2/Programming 2/Project/Part 1/package.bluej index 48677a7..6d0320d 100644 --- a/Semester 2/Programming 2/Project/Part 1/package.bluej +++ b/Semester 2/Programming 2/Project/Part 1/package.bluej @@ -9,12 +9,12 @@ package.editor.width=1774 package.editor.x=0 package.editor.y=31 package.numDependencies=1 -package.numTargets=2 +package.numTargets=4 package.showExtends=true package.showUses=true project.charset=UTF-8 target1.editor.height=1049 -target1.editor.width=1591 +target1.editor.width=960 target1.editor.x=0 target1.editor.y=31 target1.height=50 @@ -24,18 +24,44 @@ target1.showInterface=false target1.type=ClassTarget target1.typeParameters= target1.width=100 -target1.x=70 -target1.y=10 -target2.editor.height=1049 -target2.editor.width=1920 -target2.editor.x=0 -target2.editor.y=31 +target1.x=250 +target1.y=110 +target2.editor.height=700 +target2.editor.width=900 +target2.editor.x=40 +target2.editor.y=51 target2.height=50 -target2.name=Library +target2.name=Periodical target2.naviview.expanded=true target2.showInterface=false target2.type=ClassTarget target2.typeParameters= -target2.width=80 -target2.x=170 -target2.y=60 +target2.width=90 +target2.x=350 +target2.y=210 +target3.editor.height=1049 +target3.editor.width=960 +target3.editor.x=960 +target3.editor.y=31 +target3.height=50 +target3.name=Book +target3.naviview.expanded=true +target3.showInterface=false +target3.type=ClassTarget +target3.typeParameters= +target3.width=80 +target3.x=170 +target3.y=210 +target4.editor.height=1049 +target4.editor.width=1920 +target4.editor.x=0 +target4.editor.y=31 +target4.height=50 +target4.name=Library +target4.naviview.expanded=true +target4.showInterface=false +target4.type=ClassTarget +target4.typeParameters= +target4.width=80 +target4.x=170 +target4.y=60 diff --git a/Semester 2/Programming 2/Project/Part 2/Book.class b/Semester 2/Programming 2/Project/Part 2/Book.class new file mode 100644 index 0000000..746a9e0 Binary files /dev/null and b/Semester 2/Programming 2/Project/Part 2/Book.class differ diff --git a/Semester 2/Programming 2/Project/Part 2/Book.ctxt b/Semester 2/Programming 2/Project/Part 2/Book.ctxt new file mode 100644 index 0000000..e755cf2 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/Book.ctxt @@ -0,0 +1,9 @@ +#BlueJ class context +comment0.params= +comment0.target=Book() +comment0.text=\n\ Constructor\ for\ objects\ of\ class\ Book\n +comment1.params= +comment1.target=void\ printDetails() +comment2.params=detailScanner +comment2.target=void\ readItemData(java.util.Scanner) +numComments=3 diff --git a/Semester 2/Programming 2/Project/Part 2/Book.java b/Semester 2/Programming 2/Project/Part 2/Book.java new file mode 100644 index 0000000..4d6cb5c --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/Book.java @@ -0,0 +1,38 @@ + +/** + * Subclass of LibraryItem that emulates a Book item in a Library + * + * @George Wilkinson + * @1.0 + */ + +import java.util.Scanner; +import java.util.ArrayList; +import java.util.NoSuchElementException; + +public class Book extends LibraryItem +{ + private String author; + private String isbn; + + /** + * Constructor for objects of class Book + */ + public Book(){} + + public void printDetails() { + System.out.println("\n==================\n( " + getItemCode() + " )" + " ISBN: " + isbn + " Book " + getTitle() + ", written by " + author + ", published by " + getPublisher() + " has " + getNoOfPages() + " pages .\nIt has been borrowed " + getTimesBorrowed() + " times."); + if( getOnLoan() ) + System.out.println( "The Book is currently on loan, and costs " + getCost() + " pence. "); + else + System.out.println( "The Book is currently not on loan, and costs " + getCost() + " pence. "); + } + + public void readItemData( Scanner detailScanner ){ + if ( detailScanner != null ) { + this.author = detailScanner.next().trim(); + this.isbn = detailScanner.next().trim(); + super.readItemData( detailScanner ); + } + } +} \ No newline at end of file diff --git a/Semester 2/Programming 2/Project/Part 2/Library.class b/Semester 2/Programming 2/Project/Part 2/Library.class new file mode 100644 index 0000000..5d05bd8 Binary files /dev/null and b/Semester 2/Programming 2/Project/Part 2/Library.class differ diff --git a/Semester 2/Programming 2/Project/Part 2/Library.ctxt b/Semester 2/Programming 2/Project/Part 2/Library.ctxt new file mode 100644 index 0000000..38a822f --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/Library.ctxt @@ -0,0 +1,13 @@ +#BlueJ class context +comment0.params= +comment0.target=Library() +comment0.text=\n\ Constructor\ for\ objects\ of\ class\ Library\n +comment1.params=item +comment1.target=void\ storeItem(LibraryItem) +comment1.text=\n\ Appends\ a\ LibraryItem\ to\ the\ itemList.\n +comment2.params= +comment2.target=void\ printAllItems() +comment2.text=\n\ Prints\ to\ the\ terminal\ all\ items\ in\ the\ itemList\n +comment3.params= +comment3.target=void\ readItemData() +numComments=4 diff --git a/Semester 2/Programming 2/Project/Part 2/Library.java b/Semester 2/Programming 2/Project/Part 2/Library.java new file mode 100644 index 0000000..399a49d --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/Library.java @@ -0,0 +1,110 @@ + +/** + * Write a description of class Library here. + * + * @author (your name) + * @version (a version number or a date) + */ + +// Import all required libraries. Not using .* as it is not good practice due to potential conflicts. +import java.util.ArrayList; +import java.util.Scanner; +import java.io.File; +import java.io.IOException; +import java.awt.FileDialog; +import java.awt.Frame; + +public class Library +{ + private ArrayList itemList; // Initialise an ArrayList of name itemList to store LibraryItems + + /* + * Constructor for objects of class Library + */ + public Library() + { + itemList = new ArrayList(); + } + + /* + * Appends a LibraryItem to the itemList. + */ + public void storeItem( LibraryItem item ) + { + itemList.add( item ); + } + + /* + * Prints to the terminal all items in the itemList + */ + public void printAllItems() + { + for( LibraryItem item : itemList ) + { + item.printDetails(); + } + } + + public void readItemData() //throws IOException + { + Frame frame = null; // Initialise a null frame + FileDialog fileBox = new FileDialog( frame, "Open", FileDialog.LOAD ); // Initialise filebox with the null frame pointer + fileBox.setVisible( true ); // Open a file selection dialog to the user. + + try { + Scanner fileScanner = new Scanner( new File( fileBox.getDirectory() + fileBox.getFile() ) ); + String typeFlag = ""; + + while( fileScanner.hasNextLine() ){ + + String lineItem = fileScanner.nextLine(); + //System.out.println( lineItem ); + + // Ensure no comments or empty lines are included + if ( lineItem.contains( "//" ) || lineItem.trim().isEmpty() ){} + + // Check current line is a candidate flag + else if ( lineItem.startsWith("[" ) ) { + if ( lineItem.toLowerCase().contains("book") ) { + typeFlag = "book"; + //System.out.println( "CHANGED FLAG TO READ BOOKS" ); + } + else if ( lineItem.toLowerCase().contains("periodical") ) { + typeFlag = "periodical"; + //System.out.println( "CHANGED FLAG TO READ PERIODICALS" ); + } + else { + System.out.println( "Flag detected, but no accepted format...\n Cannot store item in Library. Changing Flag to generic and skipping the following: "); + typeFlag = "generic"; + } + } + + // Could be a switch case to be more efficient + // Check current flag for data processing. + else { + if ( typeFlag.equals( "book" ) ) { + // Process Book Data + Scanner detailScanner = new Scanner ( lineItem ).useDelimiter(","); // Create a new scanner to grab the values in a comma separated list + LibraryItem book = new Book(); + book.readItemData( detailScanner ); + storeItem( book ); // Store the new LibraryItem in the itemList + } + else if ( typeFlag.equals( "periodical" ) ) { + // Process Periodic Data + Scanner detailScanner = new Scanner ( lineItem ).useDelimiter(","); + LibraryItem periodical = new Periodical(); + periodical.readItemData( detailScanner ); + storeItem( periodical ); + } + else if ( typeFlag.equals( "generic" ) ) { + // Output unaccepted lines + System.out.println( lineItem ); + } + } + } + } + catch( IOException e ) { // Catch any IO Exceptions that may occur from improper file selection. + System.err.println( "Caught IOException: " + e.getMessage() + "\nAn I/O Exception has occurred, please check file is readable and correct format." ); + } + } +} diff --git a/Semester 2/Programming 2/Project/Part 2/LibraryItem.class b/Semester 2/Programming 2/Project/Part 2/LibraryItem.class new file mode 100644 index 0000000..30057d6 Binary files /dev/null and b/Semester 2/Programming 2/Project/Part 2/LibraryItem.class differ diff --git a/Semester 2/Programming 2/Project/Part 2/LibraryItem.ctxt b/Semester 2/Programming 2/Project/Part 2/LibraryItem.ctxt new file mode 100644 index 0000000..209ebc4 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/LibraryItem.ctxt @@ -0,0 +1,37 @@ +#BlueJ class context +comment0.params= +comment0.target=java.lang.String\ getTitle() +comment0.text=\n\ Field\ Accessor\ Start\n +comment1.params= +comment1.target=java.lang.String\ getItemCode() +comment10.params=timesBorrowed +comment10.target=void\ setTimesBorrowed(int) +comment11.params=onLoan +comment11.target=void\ setOnLoan(boolean) +comment12.params=noOfPages +comment12.target=void\ setNoOfPages(int) +comment13.params=publisher +comment13.target=void\ setPublisher(java.lang.String) +comment14.params= +comment14.target=void\ printDetails() +comment14.text=\n\ Field\ Mutator\ End\n +comment15.params=detailScanner +comment15.target=void\ readItemData(java.util.Scanner) +comment2.params= +comment2.target=int\ getCost() +comment3.params= +comment3.target=int\ getTimesBorrowed() +comment4.params= +comment4.target=boolean\ getOnLoan() +comment5.params= +comment5.target=int\ getNoOfPages() +comment6.params= +comment6.target=java.lang.String\ getPublisher() +comment7.params=title +comment7.target=void\ setTitle(java.lang.String) +comment7.text=\n\ Field\ Accessor\ End\n\ \n\ Field\ Mutator\ Start\n +comment8.params=itemCode +comment8.target=void\ setItemCode(java.lang.String) +comment9.params=cost +comment9.target=void\ setCost(int) +numComments=16 diff --git a/Semester 2/Programming 2/Project/Part 2/LibraryItem.java b/Semester 2/Programming 2/Project/Part 2/LibraryItem.java new file mode 100644 index 0000000..d691572 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/LibraryItem.java @@ -0,0 +1,129 @@ + +/** + * Emulates an Item in a Library ( + * + * @author (your name) + * @version (a version number or a date) + */ + +import java.util.Scanner; +import java.util.ArrayList; +import java.util.NoSuchElementException; + +public abstract class LibraryItem +{ + // instance variables - replace the example below with your own + private String title; + private String itemCode; + private int cost; + private int timesBorrowed; + private boolean onLoan; + private int noOfPages; + private String publisher; + + /* + * Field Accessor Start + */ + public String getTitle() + { + return title; + } + + public String getItemCode() + { + return itemCode; + } + + public int getCost() + { + return cost; + } + + public int getTimesBorrowed() + { + return timesBorrowed; + } + + public boolean getOnLoan() + { + return onLoan; + } + + public int getNoOfPages() + { + return noOfPages; + } + + public String getPublisher() + { + return publisher; + } + + /* + * Field Accessor End + * + * Field Mutator Start + */ + + public void setTitle( String title ) + { + this.title = title; + } + + public void setItemCode( String itemCode ) + { + this.itemCode = itemCode; + } + + public void setCost( int cost ) + { + this.cost = cost; + } + + public void setTimesBorrowed( int timesBorrowed ) + { + this.timesBorrowed = timesBorrowed; + } + + public void setOnLoan( boolean onLoan ) + { + this.onLoan = onLoan; + } + + public void setNoOfPages( int noOfPages ) + { + this.noOfPages = noOfPages; + } + + public void setPublisher( String publisher ) + { + this.publisher = publisher; + } + + /* + * Field Mutator End + */ + + // Output to console the details of the fields in a human-readable format. + public void printDetails() + { + System.out.println( title + " with an item code " + itemCode + " has been borrowed " + timesBorrowed + " times."); + if( onLoan ) + System.out.println( "This item is at present on loan and when new cost " + cost + " pence.\n" ); + else + System.out.println( "This item is at present not on loan and when new cost " + cost + " pence.\n" ); + } + + public void readItemData( Scanner detailScanner ) { + + if ( detailScanner != null ) { + this.noOfPages = Integer.parseInt( detailScanner.next().trim() ); + this.publisher = detailScanner.next().trim(); + this.title = detailScanner.next().trim(); + this.itemCode = detailScanner.next().trim(); + this.cost = Integer.parseInt( detailScanner.next().trim() ); + this.timesBorrowed = Integer.parseInt( detailScanner.next().trim() ); + this.onLoan = Boolean.parseBoolean( detailScanner.next().trim() ); + } + } +} diff --git a/Semester 2/Programming 2/Project/Part 2/Periodical.class b/Semester 2/Programming 2/Project/Part 2/Periodical.class new file mode 100644 index 0000000..3721c5c Binary files /dev/null and b/Semester 2/Programming 2/Project/Part 2/Periodical.class differ diff --git a/Semester 2/Programming 2/Project/Part 2/Periodical.ctxt b/Semester 2/Programming 2/Project/Part 2/Periodical.ctxt new file mode 100644 index 0000000..66ac73a --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/Periodical.ctxt @@ -0,0 +1,8 @@ +#BlueJ class context +comment0.params= +comment0.target=Periodical() +comment1.params= +comment1.target=void\ printDetails() +comment2.params=detailScanner +comment2.target=void\ readItemData(java.util.Scanner) +numComments=3 diff --git a/Semester 2/Programming 2/Project/Part 2/Periodical.java b/Semester 2/Programming 2/Project/Part 2/Periodical.java new file mode 100644 index 0000000..2d60d25 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/Periodical.java @@ -0,0 +1,30 @@ + +/** + * Write a description of class Periodical here. + * + * @author (your name) + * @version (a version number or a date) + */ + +import java.util.Scanner; +public class Periodical extends LibraryItem +{ + private String publicationDate; + + public Periodical(){} + + public void printDetails() { + System.out.println("\n==================\n( " + getItemCode() + " )" + " Publication Date: " + publicationDate + " Periodical " + getTitle() + ", published by " + getPublisher() + " has " + getNoOfPages() + " pages .\nIt has been borrowed " + getTimesBorrowed() + " times."); + if( getOnLoan() ) + System.out.println( "The Periodical is currently on loan, and costs " + getCost() + " pence. "); + else + System.out.println( "The Periodical is currently not on loan, and costs " + getCost() + " pence. "); + } + + public void readItemData( Scanner detailScanner ){ + if ( detailScanner != null ) { + this.publicationDate = detailScanner.next().trim(); + super.readItemData( detailScanner ); + } + } +} diff --git a/Semester 2/Programming 2/Project/Part 2/README.TXT b/Semester 2/Programming 2/Project/Part 2/README.TXT new file mode 100644 index 0000000..2bea2dd --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/README.TXT @@ -0,0 +1,12 @@ +------------------------------------------------------------------------ +This is the project README file. Here, you should describe your project. +Tell the reader (someone who does not know anything about this project) +all he/she needs to know. The comments should usually include at least: +------------------------------------------------------------------------ + +PROJECT TITLE: +PURPOSE OF PROJECT: +VERSION or DATE: +HOW TO START THIS PROJECT: +AUTHORS: +USER INSTRUCTIONS: diff --git a/Semester 2/Programming 2/Project/Part 2/data/item_data_1.txt b/Semester 2/Programming 2/Project/Part 2/data/item_data_1.txt new file mode 100644 index 0000000..c8fea9f --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/data/item_data_1.txt @@ -0,0 +1,12 @@ +// this is a comment, any lines that start with // +// (and blank lines) should be ignored + + +// data is title, itemCode, cost, timesBorrowed, onLoan +Objects First with Java, LM002411,3989,781,true +Compilers: Principles Techniques and Tools, LM002711,599,0,FALSE +C# How to Program, LM002876,4599,45,TRUE +Unix Made Easy: The Basics and Beyond (Made Easy), LM002468,6395,0,TRUE +Galerkin Finite Element Methods for Parabolic Problems, LM002153,4554,0,FALSE + + diff --git a/Semester 2/Programming 2/Project/Part 2/data/item_data_1_v2.txt b/Semester 2/Programming 2/Project/Part 2/data/item_data_1_v2.txt new file mode 100644 index 0000000..0c22f1a --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/data/item_data_1_v2.txt @@ -0,0 +1,12 @@ +// this is a comment, any lines that start with // +// (and blank lines) should be ignored + + +// data is author, isbn, noOfPages, publisher, title, itemCode, cost, timesBorrowed, onLoan +Barnes and Kolling, 9780131976290,480, Pearson, Objects First with Java, LM002411,3989,781,true +Aho Sethi and Ullman, 9780201101942,795, Addison-Wesley, Compilers: Principles Techniques and Tools, LM002711,599,0,FALSE +Harvey Paul and Jeffrey, 9780130622211,1568, Prentice Hall, C# How to Program, LM002876,4599,45,TRUE +Muster, 9780072193145,1011, McGraw-Hill, Unix Made Easy: The Basics and Beyond (Made Easy), LM002468,6395,0,TRUE +Thomee, 9783540331216,370, Springer Verlag, Galerkin Finite Element Methods for Parabolic Problems, LM002153,4554,0,FALSE + + diff --git a/Semester 2/Programming 2/Project/Part 2/data/item_data_2.txt b/Semester 2/Programming 2/Project/Part 2/data/item_data_2.txt new file mode 100644 index 0000000..a89b32f --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/data/item_data_2.txt @@ -0,0 +1,18 @@ +// this is a comment, any lines that start with // +// (and blank lines) should be ignored + + +[Book data] +// data is author, isbn, noOfPages, publisher, title, itemCode, cost, timesBorrowed, onLoan +Barnes and Kolling, 9780131976290,480, Pearson, Objects First with Java, LM002411,3989,781,true +Aho Sethi and Ullman, 9780201101942,795, Addison-Wesley, Compilers: Principles Techniques and Tools, LM002711,599,0,FALSE +Harvey Paul and Jeffrey, 9780130622211,1568, Prentice Hall, C# How to Program, LM002876,4599,45,TRUE +Muster, 9780072193145,1011, McGraw-Hill, Unix Made Easy: The Basics and Beyond (Made Easy), LM002468,6395,0,TRUE +Thomee, 9783540331216,370, Springer Verlag, Galerkin Finite Element Methods for Parabolic Problems, LM002153,4554,0,FALSE + +[periodical data] +// data is publicationDate, noOfPages, publisher, title, itemCode, cost, timesBorrowed, onLoan +25-03-20,70, News International, The Times, LM005447,80,250000,FALSE +26-03-20,70, News International, The Times, LM005002,80,560562,false +26-04-20, 70, Associated Newspapers, Daily Mail, LM005177,75,478908,false + diff --git a/Semester 2/Programming 2/Project/Part 2/data/item_data_2_generic_test.txt b/Semester 2/Programming 2/Project/Part 2/data/item_data_2_generic_test.txt new file mode 100644 index 0000000..df37375 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/data/item_data_2_generic_test.txt @@ -0,0 +1,23 @@ +// this is a comment, any lines that start with // +// (and blank lines) should be ignored + + +[Book data] +// data is author, isbn, noOfPages, publisher, title, itemCode, cost, timesBorrowed, onLoan +Barnes and Kolling, 9780131976290,480, Pearson, Objects First with Java, LM002411,3989,781,true +Aho Sethi and Ullman, 9780201101942,795, Addison-Wesley, Compilers: Principles Techniques and Tools, LM002711,599,0,FALSE +Harvey Paul and Jeffrey, 9780130622211,1568, Prentice Hall, C# How to Program, LM002876,4599,45,TRUE +Muster, 9780072193145,1011, McGraw-Hill, Unix Made Easy: The Basics and Beyond (Made Easy), LM002468,6395,0,TRUE +Thomee, 9783540331216,370, Springer Verlag, Galerkin Finite Element Methods for Parabolic Problems, LM002153,4554,0,FALSE + +[periodical data] +// data is publicationDate, noOfPages, publisher, title, itemCode, cost, timesBorrowed, onLoan +25-03-20,70, News International, The Times, LM005447,80,250000,FALSE +26-03-20,70, News International, The Times, LM005002,80,560562,false +26-04-20, 70, Associated Newspapers, Daily Mail, LM005177,75,478908,false + +[misc data] +25-03-20,70, News International, The Times, LM005447,80,250000,FALSE +26-03-20,70, News International, The Times, LM005002,80,560562,false +26-04-20, 70, Associated Newspapers, Daily Mail, LM005177,75,478908,false + diff --git a/Semester 2/Programming 2/Project/Part 2/doc/LibraryItem.html b/Semester 2/Programming 2/Project/Part 2/doc/LibraryItem.html new file mode 100644 index 0000000..3c90f03 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/doc/LibraryItem.html @@ -0,0 +1,421 @@ + + + + + + + +LibraryItem + + + + + + + + + + + + +
+ +
+ +

+Class LibraryItem

+
+java.lang.Object
+  extended by LibraryItem
+
+
+
+
public class LibraryItem
extends java.lang.Object
+ + +

+


+ +

+ + + + + + + + + + + +
+Constructor Summary
LibraryItem() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ intgetCost() + +
+           
+ java.lang.StringgetItemCode() + +
+           
+ intgetNoOfPages() + +
+           
+ booleangetOnLoan() + +
+           
+ java.lang.StringgetPublisher() + +
+           
+ intgetTimesBorrowed() + +
+           
+ java.lang.StringgetTitle() + +
+           
+ voidprintDetails() + +
+           
+ voidreadItemData(java.util.Scanner detailScanner) + +
+           
+ voidsetCost(int cost) + +
+           
+ voidsetItemCode(java.lang.String itemCode) + +
+           
+ voidsetNoOfPages(int noOfPages) + +
+           
+ voidsetOnLoan(boolean onLoan) + +
+           
+ voidsetPublisher(java.lang.String publisher) + +
+           
+ voidsetTimesBorrowed(int timesBorrowed) + +
+           
+ voidsetTitle(java.lang.String title) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+LibraryItem

+
+public LibraryItem()
+
+
+ + + + + + + + +
+Method Detail
+ +

+getCost

+
+public int getCost()
+
+
+
+
+
+
+ +

+getItemCode

+
+public java.lang.String getItemCode()
+
+
+
+
+
+
+ +

+getNoOfPages

+
+public int getNoOfPages()
+
+
+
+
+
+
+ +

+getOnLoan

+
+public boolean getOnLoan()
+
+
+
+
+
+
+ +

+getPublisher

+
+public java.lang.String getPublisher()
+
+
+
+
+
+
+ +

+getTimesBorrowed

+
+public int getTimesBorrowed()
+
+
+
+
+
+
+ +

+getTitle

+
+public java.lang.String getTitle()
+
+
+
+
+
+
+ +

+printDetails

+
+public void printDetails()
+
+
+
+
+
+
+ +

+readItemData

+
+public void readItemData(java.util.Scanner detailScanner)
+
+
+
+
+
+
+ +

+setCost

+
+public void setCost(int cost)
+
+
+
+
+
+
+ +

+setItemCode

+
+public void setItemCode(java.lang.String itemCode)
+
+
+
+
+
+
+ +

+setNoOfPages

+
+public void setNoOfPages(int noOfPages)
+
+
+
+
+
+
+ +

+setOnLoan

+
+public void setOnLoan(boolean onLoan)
+
+
+
+
+
+
+ +

+setPublisher

+
+public void setPublisher(java.lang.String publisher)
+
+
+
+
+
+
+ +

+setTimesBorrowed

+
+public void setTimesBorrowed(int timesBorrowed)
+
+
+
+
+
+
+ +

+setTitle

+
+public void setTitle(java.lang.String title)
+
+
+
+
+
+ +
+ +
+ + + diff --git a/Semester 2/Programming 2/Project/Part 2/doc/allclasses-frame.html b/Semester 2/Programming 2/Project/Part 2/doc/allclasses-frame.html new file mode 100644 index 0000000..41e572a --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/doc/allclasses-frame.html @@ -0,0 +1,32 @@ + + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
LibraryItem +
+
+ + + diff --git a/Semester 2/Programming 2/Project/Part 2/doc/allclasses-noframe.html b/Semester 2/Programming 2/Project/Part 2/doc/allclasses-noframe.html new file mode 100644 index 0000000..74c616b --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/doc/allclasses-noframe.html @@ -0,0 +1,32 @@ + + + + + + + +All Classes + + + + + + + + + + + +All Classes +
+ + + + + +
LibraryItem +
+
+ + + diff --git a/Semester 2/Programming 2/Project/Part 2/doc/constant-values.html b/Semester 2/Programming 2/Project/Part 2/doc/constant-values.html new file mode 100644 index 0000000..dc341e1 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/doc/constant-values.html @@ -0,0 +1,45 @@ + + + + + + + +Constant Field Values + + + + + + + + + + + + +
+ +
+
+

+Constant Field Values

+
+
+Contents + +
+ +
+ + + diff --git a/Semester 2/Programming 2/Project/Part 2/doc/index.html b/Semester 2/Programming 2/Project/Part 2/doc/index.html new file mode 100644 index 0000000..6d18791 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/doc/index.html @@ -0,0 +1,37 @@ + + + + + + + +Generated Documentation (Untitled) + + + + + + + + +<H2> +Frame Alert</H2> + +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to<A HREF="LibraryItem.html">Non-frame version.</A> + + + diff --git a/Semester 2/Programming 2/Project/Part 2/doc/logfile.txt b/Semester 2/Programming 2/Project/Part 2/doc/logfile.txt new file mode 100644 index 0000000..27bedb5 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/doc/logfile.txt @@ -0,0 +1,41 @@ +Class documentation +<---- javadoc command: ----> +/usr/lib/jvm/java-8-openjdk-amd64/bin/javadoc +-author +-version +-nodeprecated +-package +-noindex +-notree +-nohelp +-nonavbar +-source +1.8 +-classpath +/usr/share/bluej/bluejcore.jar:/usr/share/bluej/junit-4.8.2.jar:/usr/share/bluej/userlib/pi4j-gpio-extension.jar:/usr/share/bluej/userlib/pi4j-device.jar:/usr/share/bluej/userlib/pi4j-core.jar:/usr/share/bluej/userlib/pi4j-service.jar:/home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2 +-d +/home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/doc +-encoding +UTF-8 +-charset +UTF-8 +-docletpath +/usr/share/bluej/bjdoclet.jar +-doclet +bluej.doclet.doclets.formats.html.HtmlDoclet +/home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/LibraryItem.java +<---- end of javadoc command ----> +Loading source file /home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/LibraryItem.java... +Constructing Javadoc information... +Standard Doclet version 1.8.0_392 +Building tree for all the packages and classes... +Generating /home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/doc/LibraryItem.html... +Generating /home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/doc/package-frame.html... +Generating /home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/doc/package-summary.html... +Generating /home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/doc/constant-values.html... +Building index for all the packages and classes... +Building index for all classes... +Generating /home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/doc/allclasses-frame.html... +Generating /home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/doc/allclasses-noframe.html... +Generating /home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/doc/index.html... +Generating /home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/doc/stylesheet.css... diff --git a/Semester 2/Programming 2/Project/Part 2/doc/package-frame.html b/Semester 2/Programming 2/Project/Part 2/doc/package-frame.html new file mode 100644 index 0000000..3c2f0bc --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/doc/package-frame.html @@ -0,0 +1,33 @@ + + + + + + + +<Unnamed> + + + + + + + + + + + +<Unnamed> + + + + +
+Classes  + +
+LibraryItem
+ + + + diff --git a/Semester 2/Programming 2/Project/Part 2/doc/package-list b/Semester 2/Programming 2/Project/Part 2/doc/package-list new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/doc/package-list @@ -0,0 +1 @@ + diff --git a/Semester 2/Programming 2/Project/Part 2/doc/package-summary.html b/Semester 2/Programming 2/Project/Part 2/doc/package-summary.html new file mode 100644 index 0000000..c16fe6f --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/doc/package-summary.html @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + +
+ +
+

+Package <Unnamed> +

+ + + + + + + + + +
+Class Summary
LibraryItem 
+  + +

+

+
+
+ +
+ + + diff --git a/Semester 2/Programming 2/Project/Part 2/doc/resources/inherit.gif b/Semester 2/Programming 2/Project/Part 2/doc/resources/inherit.gif new file mode 100644 index 0000000..c814867 Binary files /dev/null and b/Semester 2/Programming 2/Project/Part 2/doc/resources/inherit.gif differ diff --git a/Semester 2/Programming 2/Project/Part 2/doc/stylesheet.css b/Semester 2/Programming 2/Project/Part 2/doc/stylesheet.css new file mode 100644 index 0000000..6ea9e51 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/doc/stylesheet.css @@ -0,0 +1,29 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body { background-color: #FFFFFF; color:#000000 } + +/* Headings */ +h1 { font-size: 145% } + +/* Table colors */ +.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ +.TableRowColor { background: #FFFFFF; color:#000000 } /* White */ + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ +.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} + diff --git a/Semester 2/Programming 2/Project/Part 2/package.bluej b/Semester 2/Programming 2/Project/Part 2/package.bluej new file mode 100644 index 0000000..45b1bd0 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/package.bluej @@ -0,0 +1,73 @@ +#BlueJ package file +dependency1.from=Library +dependency1.to=Book +dependency1.type=UsesDependency +dependency2.from=Library +dependency2.to=Periodical +dependency2.type=UsesDependency +dependency3.from=Library +dependency3.to=LibraryItem +dependency3.type=UsesDependency +objectbench.height=76 +objectbench.width=1900 +package.editor.height=874 +package.editor.width=1774 +package.editor.x=0 +package.editor.y=31 +package.numDependencies=3 +package.numTargets=4 +package.showExtends=true +package.showUses=true +project.charset=UTF-8 +target1.editor.height=700 +target1.editor.width=900 +target1.editor.x=40 +target1.editor.y=52 +target1.height=60 +target1.name=LibraryItem +target1.naviview.expanded=true +target1.showInterface=false +target1.type=AbstractTarget +target1.typeParameters= +target1.width=120 +target1.x=160 +target1.y=80 +target2.editor.height=700 +target2.editor.width=1619 +target2.editor.x=60 +target2.editor.y=71 +target2.height=50 +target2.name=Periodical +target2.naviview.expanded=true +target2.showInterface=false +target2.type=ClassTarget +target2.typeParameters= +target2.width=90 +target2.x=30 +target2.y=260 +target3.editor.height=700 +target3.editor.width=1734 +target3.editor.x=60 +target3.editor.y=71 +target3.height=50 +target3.name=Book +target3.naviview.expanded=true +target3.showInterface=false +target3.type=ClassTarget +target3.typeParameters= +target3.width=80 +target3.x=330 +target3.y=260 +target4.editor.height=1049 +target4.editor.width=1920 +target4.editor.x=0 +target4.editor.y=31 +target4.height=50 +target4.name=Library +target4.naviview.expanded=true +target4.showInterface=false +target4.type=ClassTarget +target4.typeParameters= +target4.width=100 +target4.x=170 +target4.y=210