diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index a7108f4..c7116c2 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -42,8 +42,19 @@ "file": "Semester 2/Database Systems/Booklet of Lecture Slides for Semester Two (2).pdf" } } + }, + { + "id": "bde983126ec4558f", + "type": "leaf", + "state": { + "type": "pdf", + "state": { + "file": "Semester 2/Database Systems/Exercise Booklet.pdf" + } + } } - ] + ], + "currentTab": 1 } ], "direction": "vertical" @@ -192,6 +203,15 @@ }, "active": "e96e468fb0a709e5", "lastOpenFiles": [ + "images/Pasted image 20240308103937.png", + "images/Pasted image 20240308103720.png", + "images/Pasted image 20240308102031.png", + "images/Pasted image 20240308101739.png", + "Semester 2/Programming 2/Project/Part 2/Library.java#", + "Semester 2/Database Systems/Exercise Booklet.pdf", + "Semester 2/Database Systems/Week 8/Week 8 Database Systems.md", + "Semester 2/Database Systems/Week 7/Week 7 Database Systems.md", + "Semester 2/Database Systems/Booklet of Lecture Slides for Semester Two (2).pdf", "images/Pasted image 20240305135229.png", "images/Pasted image 20240305135043.png", "images/Pasted image 20240305134944.png", @@ -199,8 +219,6 @@ "images/Pasted image 20240305134835.png", "images/Pasted image 20240305134734.png", "images/Pasted image 20240305134506.png", - "Semester 2/Database Systems/Booklet of Lecture Slides for Semester Two (2).pdf", - "Semester 2/Database Systems/Week 8/Week 8 Database Systems.md", "Semester 2/Programming 2/Project/Part 2/Book.java#", "Semester 2/Programming 2/Project/Part 2/Periodical.java#", "Semester 2/Programming 2/Project/Part 2/LibraryItem.java#", @@ -208,13 +226,6 @@ "Semester 2/Programming 2/Project/Part 2/CD.java#", "Semester 2/Programming 2/Project/Part 2/DVD.java#", "Semester 2/Programming 2/Project/Part 2/AudioVisual.java#", - "Semester 2/Programming 2/Project/Part 2/PrintedItem.java#", - "Semester 2/Programming 2/Project/Part 2/Library.java#", - "images/Pasted image 20240305131110.png", - "images/Pasted image 20240305130824.png", - "Semester 2/Database Systems/Week 7/Week 7 Database Systems.md", - "images/Pasted image 20240227171728.png", - "images/Pasted image 20240227171700.png", "Semester 2/Database Systems/Week 6/Week 6 Database Systems.md", "Semester 2/Computer Systems Internals & Linux/Week 6/Week 6 Computer Systems Internals.md", "Semester 2/Programming 2/Assessment 3 Revision/Parameter Passing WS3.md", diff --git a/Semester 2/Database Systems/Week 8/Week 8 Database Systems.md b/Semester 2/Database Systems/Week 8/Week 8 Database Systems.md index 9624bf6..b0012f4 100644 --- a/Semester 2/Database Systems/Week 8/Week 8 Database Systems.md +++ b/Semester 2/Database Systems/Week 8/Week 8 Database Systems.md @@ -55,7 +55,7 @@ Definition: Checkpoints are points of sync between database and log file. All bu - Checkpoint record to log file which contains identities of transactions active at time of checkpoint 2. Resume processing. -![](Pasted%20image%2020240305134734.png) +- ![](Pasted%20image%2020240305134734.png) ### Example 1 ( Immediate ) @@ -88,3 +88,55 @@ Definition: Checkpoints are points of sync between database and log file. All bu ## Example of Log Use ( Immediate ) ![](Pasted%20image%2020240305135229.png) + +# Shadow Paging + +Alternative technique for providing atomicity and durability. +DBMS maintains two page tables during the life of a transaction. +1. Current Page +2. Shadow Page Table + +**Transaction Start**: Two pages are the same +- Shadow page table is never changed, only used to restore database. +**Transaction Execution**: current page table records all updates to database +**Transaction End**: Current page table becomes shadow page table and all modified pages from database buffers written to secondary storage. +**Transaction Failure**: new pages ignored, shadow page table becomes current page table. + +# Tutorial + +1. State whether each of the following is true or false. If it is false then briefly explain why. + 1. True + 2. True + 3. True + 4. False: REDO / NO UNDO + 5. True +2. The DBMS maintains a log file containing transaction records that identify the start and end of transactions and the before and after images of the write operations. Consider the log files shown in Tables 32.1 and 32.2. For each one, explain what the DBMS recovery system would do, and why, if there was a failure at the time shown below each table and the DBMS was using: + 1. Deferred update protocol + 1. 32.1 Fail @10:24 + - Redo T1 as commit before failure. Ignore T2 and 3, active at point of failure. T4 not active at point of failure, Ignore. + 2. 32.2 Fail @9.21 + - Redo T2 and 4, since no commit occurs. T3 commits after the checkpoint, and anything before has no effect. + 1. Immediate update protocol + 1. 32.1 Fail @10.24 + - Undo T2 and 3, since they are active, and do not commit. T1 must be redone, and T4 is ignored, as it never started. + 2. 32.2 Fail @9:21 + - Undo T2 and 4, since they are active and do not commit. Redo T3, as it is active after the checkpoint. + +# Workshop + +1. ![](Pasted%20image%2020240308101739.png) +2. ![](Pasted%20image%2020240308102031.png) +3. ![](Pasted%20image%2020240308103720.png) +``` +SELECT SUM([UnitPrice]) AS TotalPrice +FROM [Products] +WHERE [SupplierID] = ( + SELECT [SupplierID] + FROM [Suppliers] + WHERE [Country] = 'UK' + ); + +``` + +4. ![](Pasted%20image%2020240308103937.png) + 1. \ No newline at end of file diff --git a/Semester 2/Programming 2/Project/Part 2/DateUtil.class b/Semester 2/Programming 2/Project/Part 2/DateUtil.class new file mode 100644 index 0000000..590e525 Binary files /dev/null and b/Semester 2/Programming 2/Project/Part 2/DateUtil.class differ diff --git a/Semester 2/Programming 2/Project/Part 2/DateUtil.ctxt b/Semester 2/Programming 2/Project/Part 2/DateUtil.ctxt new file mode 100644 index 0000000..4d9c2c3 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/DateUtil.ctxt @@ -0,0 +1,26 @@ +#BlueJ class context +comment0.params=date +comment0.target=java.lang.String\ convertDateToLongString(java.util.Date) +comment0.text=\n\ Converts\ a\ Date\ object\ to\ a\ corresponding\ String\ in\n\ the\ long\ date\ pattern\ style\ "Saturday,\ 25\ March\ 2023".\n\n\ @param\ \ \ \ \ date\ \ a\ Date\ object\n\n\ @return\ \ \ \ a\ String,\ containing\ a\ long\ date\ pattern\n +comment1.params=date +comment1.target=java.lang.String\ convertDateToShortString(java.util.Date) +comment1.text=\n\ Converts\ a\ Date\ object\ to\ a\ corresponding\ String\ in\n\ the\ short\ date\ pattern\ style\ "25-03-2023".\n\n\ @param\ \ \ \ \ date\ \ a\ Date\ object\n\n\ @return\ \ \ \ a\ String,\ containing\ a\ short\ date\ pattern\n +comment2.params=dateString +comment2.target=java.util.Date\ convertStringToDate(java.lang.String) +comment2.text=\n\ Converts\ a\ string\ in\ the\ short\ date\ pattern\ style\ "25-03-2023"\n\ to\ a\ corresponding\ Date\ object.\n\n\ Any\ leading\ or\ trailing\ spaces\ are\ first\ removed\ from\ the\ date\ string.\n\ The\ String\ parameter\ that\ represent\ a\ date\ as\ a\ string\ must\ be\ in\ the\n\ format\ dd-mm-yyy\ (e.g.\ 25-03-2023\ or\ 25-3-2023)\ where\ dd\ represents\n\ one\ or\ two\ digits\ representing\ the\ day\ in\ the\ month,\ similarly\ for\n\ mm\ representing\ the\ month\ in\ the\ year\ and\ yyyy\ represents\ the\ four\n\ digits\ for\ the\ year.\n\n\ A\ RuntimeException\ is\ thrown\ if\ the\ date\ string\ is\ not\ recognised\ as\n\ a\ valid\ date.\ Such\ exceptions\ do\ not\ need\ to\ be\ caught\ or\ thrown\ as\ \n\ they\ are\ unchecked\ exceptions,\ but\ can\ be\ caught\ if\ necessary.\n\n\ @param\ \ \ \ \ dateString\ \ a\ Date\ object\n\n\ @return\ \ \ \ the\ Date\ object\n +comment3.params=startDate\ endDate +comment3.target=int\ daysBetween(java.util.Date,\ java.util.Date) +comment3.text=\n\ Calculates\ the\ number\ of\ days\ between\ two\ given\ dates,\ startDate\ and\ endDate.\n\n\ If\ startDate\ is\ after\ endDate\ then\ the\ number\ of\ days\ returned\ will\ be\ negative.\n\n\ @param\ \ \ \ \ startDate\ \ \ a\ Date\ object\n\ @param\ \ \ \ \ endDate\ \ \ \ \ a\ Date\ object\n\n\ @return\ \ \ \ an\ int,\ number\ of\ days\ between\ the\ dates\n +comment4.params=date\ noOfDays +comment4.target=java.util.Date\ incrementDate(java.util.Date,\ int) +comment4.text=\n\ Given\ date,\ a\ Date\ object,\ and\ noOfDays,\ an\ int,\ the\ method\ returns\n\ a\ Date\ object\ corresponding\ to\ noOfDays\ later\ than\ date.\n\n\ If\ noOfDays\ is\ negative,\ the\ resulting\ Date\ object\ will\ be\ before\ date.\n\n\ @param\ \ \ \ \ date\ \ \ \ \ \ a\ Date\ object\n\ @param\ \ \ \ \ noOfDays\ \ an\ int\n\n\ @return\ \ \ \ a\ Date\n +comment5.params=year +comment5.target=boolean\ isLeapYear(int) +comment5.text=\n\ Given\ year,\ an\ int,\ the\ method\ checks\ to\ see\ if\ the\ year\n\ is\ a\ leap\ year.\n\n\ @param\ \ \ \ \ year,\ \ an\ int\n\n\ @return\ \ \ \ a\ boolean,\ true\ only\ if\ the\ year\ is\ a\ leap\ year.\n +comment6.params=dateString +comment6.target=boolean\ isValidDateString(java.lang.String) +comment6.text=\n\ Given\ dateString,\ a\ String,\ the\ method\ checks\ to\ see\ if\ string\n\ corresponds\ to\ a\ valid\ shortDatePattern.\ \n\n\ @param\ \ \ \ \ dateString,\ a\ String\n\n\ @return\ \ \ \ a\ boolean,\ true\ only\ if\ the\ dateString\ is\ a\ valid\ pattern\n +comment7.params=date +comment7.target=java.util.Date\ nextDate(java.util.Date) +comment7.text=\n\ Given\ date,\ a\ Date\ object,\ the\ method\ returns\n\ a\ Date\ object\ corresponding\ to\ the\ next\ day.\n\n\ @param\ \ \ \ \ noOfDays\ \ an\ int\n\n\ @return\ \ \ \ a\ Date\n +numComments=8 diff --git a/Semester 2/Programming 2/Project/Part 2/DateUtil.java b/Semester 2/Programming 2/Project/Part 2/DateUtil.java new file mode 100644 index 0000000..3839bff --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/DateUtil.java @@ -0,0 +1,263 @@ +import java.text.SimpleDateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +import java.util.Date; +import java.util.Calendar; +import java.util.GregorianCalendar; +/** + * + * A class DateUtil with the following methods for dealing with dates. + * + * public static String convertDateToLongString(Date date) + * public static String convertDateToShortString(Date date) + * public static Date convertStringToDate(String dateString) + * public static int daysBetween(Date startDate, Date endDate) + * public static Date incrementDate(Date date, int noOfDays) + * public static boolean isLeapYear(int year) + * public static boolean isValidDateString(String dateString) + * public static Date nextDate(Date date) + * + * @author D E Newton + * + */ + +public class DateUtil +{ + public static SimpleDateFormat dateFormatter; + private static String longDatePattern; + private static String shortDatePattern; + + /** + * initializer block -- useful for + * initializing static fields + */ + static + { + shortDatePattern = "dd-MM-yyyy"; // dd = day, MM = month, yyyy = year (as 2, 2 and 4 digits respectively) + longDatePattern = "EEEE, d MMMM yyyy"; // e.g. Saturday, 25 March 2023 + // EEEE (4 or more) = day in week, in full e.g.Saturday + // MMMMM (4 or more) = month name as text in full e.g. March + // d = day as 1 or 2 digits e.g. 25th of month -> 25, 23rd -> 23 + // + // some alternatives below to help understanding (see documentation for SimpleDateFormat class) + // EE (3 or less) -> Tue + // MMMM = month name as text in short e.g. Oct + // M (or MM) = month as digits e.g. 1 (or 01) would correspond to January + dateFormatter = new SimpleDateFormat(shortDatePattern); // default pattern set + dateFormatter.setLenient(false); // default is true and impossible dates such + // as 31-09-2023 would be accepted but interpreted as 01-10-2023 + } + + /** + * Converts a Date object to a corresponding String in + * the long date pattern style "Saturday, 25 March 2023". + * + * @param date a Date object + * + * @return a String, containing a long date pattern + */ + public static String convertDateToLongString(Date date) + { + dateFormatter.applyPattern(longDatePattern); + String dateString = dateFormatter.format(date); + dateFormatter.applyPattern(shortDatePattern); // reset pattern + return dateString; + } + + /** + * Converts a Date object to a corresponding String in + * the short date pattern style "25-03-2023". + * + * @param date a Date object + * + * @return a String, containing a short date pattern + */ + public static String convertDateToShortString(Date date) + { + return dateFormatter.format(date); + } + + /** + * Converts a string in the short date pattern style "25-03-2023" + * to a corresponding Date object. + * + * Any leading or trailing spaces are first removed from the date string. + * The String parameter that represent a date as a string must be in the + * format dd-mm-yyy (e.g. 25-03-2023 or 25-3-2023) where dd represents + * one or two digits representing the day in the month, similarly for + * mm representing the month in the year and yyyy represents the four + * digits for the year. + * + * A RuntimeException is thrown if the date string is not recognised as + * a valid date. Such exceptions do not need to be caught or thrown as + * they are unchecked exceptions, but can be caught if necessary. + * + * @param dateString a Date object + * + * @return the Date object + */ + public static Date convertStringToDate(String dateString) + { + dateString = dateString.trim(); + + ParsePosition posn = new ParsePosition(0); // initialise posn to the beginning of the string to be parsed + + Date date = dateFormatter.parse(dateString, posn); + int endIndex = posn.getIndex(); // posn after parsing + + String message = "Date string <" + dateString + "> not recognised"; + if( date==null ) + { + // parsing failed because string not recognised + message += "."; + throw new RuntimeException(message); + } + else if( endIndex!=dateString.length() ) + { + // parsing failed because parsing did not "consume" all the characters + // in the string, indicating the complete string was not recognised + message += " because it contains extra characters after a date."; + throw new RuntimeException(message); + } + else + return date; + } + + /** + * Calculates the number of days between two given dates, startDate and endDate. + * + * If startDate is after endDate then the number of days returned will be negative. + * + * @param startDate a Date object + * @param endDate a Date object + * + * @return an int, number of days between the dates + */ + public static int daysBetween(Date startDate, Date endDate) + { + // first check that startDate is not after endDate + boolean outOfOrder; + Date temp; + + if( startDate.compareTo(endDate)<=0 ) + { + outOfOrder = false; + } + else + { + outOfOrder = true; + temp = startDate; + startDate = endDate; + endDate = temp; + } + + int daysBetween = 0; + + Calendar calendar = new GregorianCalendar(); + calendar.setTime(startDate); // initialised at start date + + Calendar calendarEndDate = new GregorianCalendar(); + calendarEndDate.setTime(endDate); + + // First advance calendar a year at a time without advancing past the end date. + // This is much quicker, for dates that are years apart, than simply relying on the + // later "day at a time" loop. Advancing "a month at a time" before the "day at a + // time" loop would be even better but complex because of the varying month lengths. + + Calendar prevYearCalendar = (Calendar) calendar.clone(); + calendar.add(Calendar.YEAR, 1); + // advance calendar a year at a time until end date reached + while( !calendar.getTime().after(endDate) ) + { + if( isLeapYear(prevYearCalendar.get(Calendar.YEAR)) && + prevYearCalendar.get(Calendar.MONTH) itemList; // Initialise an ArrayList of name itemList to store Library Items - private ArrayList userList; // Initialise an ArrayList of name userList to store Library Users + // private List itemList; // Initialise an ArrayList of name itemList to store Library Items + // private List userList; // Initialise an ArrayList of name userList to store Library Users private HashSet uuidSet; // Initialise a Hash Set of name uuidSet ( unique user identifier ) to store unique user IDs for efficient O(1) searching + private Map customerMap; + private Map itemsMap; + private Map libraryReservationMap; /* * Constructor for objects of class Library */ public Library() { - itemList = new ArrayList(); - userList = new ArrayList(); + // itemList = new ArrayList(); + // userList = new ArrayList(); uuidSet = new HashSet(); + + customerMap = new HashMap(); + itemsMap = new HashMap(); + libraryReservationMap = new HashMap(); } /* - * Appends a LibraryItem to the itemList. + * Inserts object value item alongside key of @itemCode into @itemsMap. */ public void storeItem( LibraryItem item ) { - itemList.add( item ); + // itemList.add( item ); + itemsMap.put( item.getItemCode(), item ); } /* - * Appends a LibraryUser to the userList. + * Inserts object value user alongside key of @userID into @customerMap. + * If the userID is set to unknown, it will call @generateUserID. */ public void storeUser( LibraryUser user ) { - userList.add( user ); + // userList.add( user ); + System.out.println( "User Storing: " + user.getFirstName() ); if ( user.getUserID().equals( "unknown" ) ) { user.setUserID( generateUserID( "AB-", 6 ) ); } + customerMap.put( user.getUserID(), user ); } + /* + * Inserts object value reservation alongside key of @reservationNo into @libraryReservationMap. + */ + public void storeLibraryReservation( LibraryReservation reservation ) + { + libraryReservationMap.put( reservation.getReservationNo(), reservation ); + } + + public void generateReservationNo() + { + if( libraryReservationMap.values() = null ) + return "000001"; + + } /* * Returns a random unique user ID by specifying * @prefix - arbitrary alphanumeric prefix @@ -111,7 +139,8 @@ public class Library FileDialog fileBox = new FileDialog( frame, "Save", FileDialog.SAVE ); // Initialise file dialog box to save written data. fileBox.setVisible( true ); PrintWriter writer = new PrintWriter( new File( fileBox.getDirectory() + fileBox.getFile() ) ); - for ( LibraryUser user : userList ){ + // for ( LibraryUser user : userList ){ + for ( LibraryUser user : customerMap.values() ) { user.writeData( writer ); } writer.close(); @@ -129,7 +158,7 @@ public class Library public void printAll() { System.out.println("\n\nStart Detail Print"); - for( LibraryItem item : itemList ) + for( LibraryItem item : itemsMap.values() ) { System.out.println("---------------"); item.printDetails(); @@ -215,6 +244,7 @@ public class Library } else if ( typeFlag.equals( "user" ) ) { //Process User Data + System.out.println( "User: " + lineItem ); Scanner detailScanner = new Scanner ( lineItem ).useDelimiter(","); LibraryUser user = new LibraryUser(); user.readData( detailScanner ); diff --git a/Semester 2/Programming 2/Project/Part 2/LibraryReservation.class b/Semester 2/Programming 2/Project/Part 2/LibraryReservation.class new file mode 100644 index 0000000..ff24418 Binary files /dev/null and b/Semester 2/Programming 2/Project/Part 2/LibraryReservation.class differ diff --git a/Semester 2/Programming 2/Project/Part 2/LibraryReservation.ctxt b/Semester 2/Programming 2/Project/Part 2/LibraryReservation.ctxt new file mode 100644 index 0000000..e11d973 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/LibraryReservation.ctxt @@ -0,0 +1,35 @@ +#BlueJ class context +comment0.params=reservationNo\ itemCode\ userID\ startDate\ noOfDays +comment0.target=LibraryReservation(java.lang.String,\ java.lang.String,\ java.lang.String,\ java.lang.String,\ int) +comment0.text=\n\ Constructor\ for\ objects\ of\ class\ LibraryReservation\n +comment1.params= +comment1.target=java.lang.String\ getReservationNo() +comment1.text=\n\ Return\ value\ of\ @reservationNo\n +comment10.params=noOfDays +comment10.target=void\ setNoOfDays(int) +comment10.text=\n\ Set\ @noOfDays\ to\ a\ new\ value\n +comment2.params= +comment2.target=java.lang.String\ getItemCode() +comment2.text=\n\ Return\ value\ of\ @itemCode\n +comment3.params= +comment3.target=java.lang.String\ getUserID() +comment3.text=\n\ Return\ value\ of\ @userID\n +comment4.params= +comment4.target=java.util.Date\ getStartDate() +comment4.text=\n\ Return\ value\ of\ @startDate\n +comment5.params= +comment5.target=int\ getNoOfDays() +comment5.text=\n\ Return\ value\ of\ @noOfDays\n +comment6.params=reservationNo +comment6.target=void\ setReservationNo(java.lang.String) +comment6.text=\n\ Set\ @reservationNo\ to\ a\ new\ value\n +comment7.params=itemCode +comment7.target=void\ setItemCode(java.lang.String) +comment7.text=\n\ Set\ @itemCode\ to\ a\ new\ value\n +comment8.params=userID +comment8.target=void\ setUserID(java.lang.String) +comment8.text=\n\ Set\ @userID\ to\ a\ new\ value\n +comment9.params=startDate +comment9.target=void\ setStartDate(java.lang.String) +comment9.text=\n\ Set\ @startDate\ to\ a\ new\ value\n +numComments=11 diff --git a/Semester 2/Programming 2/Project/Part 2/LibraryReservation.java b/Semester 2/Programming 2/Project/Part 2/LibraryReservation.java new file mode 100644 index 0000000..872a289 --- /dev/null +++ b/Semester 2/Programming 2/Project/Part 2/LibraryReservation.java @@ -0,0 +1,125 @@ + +/** + * A class to track and allow for reservations in a Library + * + * @George Wilkinson + * @1.0 + */ + +import java.util.Date; + +public class LibraryReservation +{ + // instance variables + private String reservationNo; + private String itemCode; + private String userID; + private Date startDate; + private int noOfDays; + + /** + * Constructor for objects of class LibraryReservation + */ + public LibraryReservation( String reservationNo, String itemCode, String userID, String startDate, int noOfDays ) + { + this.reservationNo = reservationNo; + this.itemCode = itemCode; + this.userID = userID; + this.startDate = DateUtil.convertStringToDate( startDate ); + this.noOfDays = noOfDays; + } + + /* + * Start Accessor + */ + + /* + * Return value of @reservationNo + */ + public String getReservationNo() + { + return reservationNo; + } + + /* + * Return value of @itemCode + */ + public String getItemCode() + { + return itemCode; + } + + /* + * Return value of @userID + */ + public String getUserID() + { + return userID; + } + + /* + * Return value of @startDate + */ + public Date getStartDate() + { + return startDate; + } + + /* + * Return value of @noOfDays + */ + public int getNoOfDays() + { + return noOfDays; + } + + /* + * End Accessor + * + * Start Mutator + */ + + /* + * Set @reservationNo to a new value + */ + public void setReservationNo( String reservationNo ) + { + this.reservationNo = reservationNo; + } + + /* + * Set @itemCode to a new value + */ + public void setItemCode( String itemCode ) + { + this.itemCode = itemCode; + } + + /* + * Set @userID to a new value + */ + public void setUserID( String userID ) + { + this.userID = userID; + } + + /* + * Set @startDate to a new value + */ + public void setStartDate( String startDate ) + { + this.startDate = DateUtil.convertStringToDate( startDate ); + } + + /* + * Set @noOfDays to a new value + */ + public void setNoOfDays( int noOfDays ) + { + this.noOfDays = noOfDays; + } + + /* + * End Mutator + */ +} diff --git a/Semester 2/Programming 2/Project/Part 2/data/testuserwrite.txt b/Semester 2/Programming 2/Project/Part 2/data/testuserwrite.txt index 2df8bad..750a51a 100644 --- a/Semester 2/Programming 2/Project/Part 2/data/testuserwrite.txt +++ b/Semester 2/Programming 2/Project/Part 2/data/testuserwrite.txt @@ -1,4 +1,4 @@ -unknown, Newton, David, E, Dr -unknown, Gregson, Brian, R T, Mr -unknown, Evans, David, , Dr -unknown, Smith, Sara, C, Ms +AB-906182, Smith, Sara, C, Ms +AB-241496, Evans, David, , Dr +AB-769390, Newton, David, E, Dr +AB-396038, Gregson, Brian, R T, Mr diff --git a/Semester 2/Programming 2/Project/Part 2/nullnull b/Semester 2/Programming 2/Project/Part 2/nullnull index e69de29..750a51a 100644 --- a/Semester 2/Programming 2/Project/Part 2/nullnull +++ b/Semester 2/Programming 2/Project/Part 2/nullnull @@ -0,0 +1,4 @@ +AB-906182, Smith, Sara, C, Ms +AB-241496, Evans, David, , Dr +AB-769390, Newton, David, E, Dr +AB-396038, Gregson, Brian, R T, Mr diff --git a/Semester 2/Programming 2/Project/Part 2/package.bluej b/Semester 2/Programming 2/Project/Part 2/package.bluej index 8c8286c..17e5490 100644 --- a/Semester 2/Programming 2/Project/Part 2/package.bluej +++ b/Semester 2/Programming 2/Project/Part 2/package.bluej @@ -17,14 +17,20 @@ dependency5.type=UsesDependency dependency6.from=Library dependency6.to=LibraryUser dependency6.type=UsesDependency +dependency7.from=LibraryReservation +dependency7.to=DateUtil +dependency7.type=UsesDependency +dependency8.from=Library +dependency8.to=LibraryReservation +dependency8.type=UsesDependency objectbench.height=76 objectbench.width=940 package.editor.height=874 package.editor.width=814 package.editor.x=0 package.editor.y=31 -package.numDependencies=6 -package.numTargets=9 +package.numDependencies=8 +package.numTargets=11 package.showExtends=true package.showUses=true project.charset=UTF-8 @@ -39,8 +45,34 @@ target1.showInterface=false target1.type=AbstractTarget target1.typeParameters= target1.width=110 -target1.x=350 -target1.y=220 +target1.x=130 +target1.y=240 +target10.editor.height=700 +target10.editor.width=900 +target10.editor.x=960 +target10.editor.y=146 +target10.height=50 +target10.name=AudioVisual +target10.naviview.expanded=true +target10.showInterface=false +target10.type=AbstractTarget +target10.typeParameters= +target10.width=110 +target10.x=380 +target10.y=240 +target11.editor.height=700 +target11.editor.width=900 +target11.editor.x=40 +target11.editor.y=51 +target11.height=50 +target11.name=LibraryReservation +target11.naviview.expanded=true +target11.showInterface=false +target11.type=ClassTarget +target11.typeParameters= +target11.width=160 +target11.x=230 +target11.y=440 target2.editor.height=786 target2.editor.width=960 target2.editor.x=34 @@ -52,8 +84,8 @@ target2.showInterface=false target2.type=ClassTarget target2.typeParameters= target2.width=80 -target2.x=580 -target2.y=320 +target2.x=360 +target2.y=340 target3.editor.height=700 target3.editor.width=900 target3.editor.x=557 @@ -65,8 +97,8 @@ target3.showInterface=false target3.type=AbstractTarget target3.typeParameters= target3.width=120 -target3.x=470 -target3.y=90 +target3.x=250 +target3.y=110 target4.editor.height=1049 target4.editor.width=1920 target4.editor.x=0 @@ -78,34 +110,34 @@ target4.showInterface=false target4.type=ClassTarget target4.typeParameters= target4.width=80 -target4.x=690 -target4.y=360 +target4.x=470 +target4.y=380 target5.editor.height=700 -target5.editor.width=1619 -target5.editor.x=192 -target5.editor.y=267 +target5.editor.width=900 +target5.editor.x=55 +target5.editor.y=274 target5.height=50 -target5.name=Periodical +target5.name=LibraryUser target5.naviview.expanded=true target5.showInterface=false target5.type=ClassTarget target5.typeParameters= -target5.width=90 -target5.x=280 -target5.y=360 +target5.width=110 +target5.x=100 +target5.y=170 target6.editor.height=700 -target6.editor.width=900 -target6.editor.x=55 -target6.editor.y=274 +target6.editor.width=1619 +target6.editor.x=192 +target6.editor.y=267 target6.height=50 -target6.name=LibraryUser +target6.name=Periodical target6.naviview.expanded=true target6.showInterface=false target6.type=ClassTarget target6.typeParameters= -target6.width=110 -target6.x=320 -target6.y=150 +target6.width=90 +target6.x=60 +target6.y=380 target7.editor.height=1049 target7.editor.width=1920 target7.editor.x=0 @@ -117,31 +149,31 @@ target7.showInterface=false target7.type=ClassTarget target7.typeParameters= target7.width=80 -target7.x=400 -target7.y=320 -target8.editor.height=1049 -target8.editor.width=1920 -target8.editor.x=0 -target8.editor.y=31 +target7.x=180 +target7.y=340 +target8.editor.height=700 +target8.editor.width=900 +target8.editor.x=40 +target8.editor.y=51 target8.height=50 -target8.name=Library +target8.name=DateUtil target8.naviview.expanded=true target8.showInterface=false target8.type=ClassTarget target8.typeParameters= -target8.width=100 -target8.x=480 -target8.y=220 -target9.editor.height=700 -target9.editor.width=900 -target9.editor.x=960 -target9.editor.y=146 +target8.width=80 +target8.x=70 +target8.y=10 +target9.editor.height=1049 +target9.editor.width=960 +target9.editor.x=0 +target9.editor.y=31 target9.height=50 -target9.name=AudioVisual +target9.name=Library target9.naviview.expanded=true target9.showInterface=false -target9.type=AbstractTarget +target9.type=ClassTarget target9.typeParameters= -target9.width=110 -target9.x=600 -target9.y=220 +target9.width=100 +target9.x=260 +target9.y=240 diff --git a/images/Pasted image 20240308101739.png b/images/Pasted image 20240308101739.png new file mode 100644 index 0000000..f2860a1 Binary files /dev/null and b/images/Pasted image 20240308101739.png differ diff --git a/images/Pasted image 20240308102031.png b/images/Pasted image 20240308102031.png new file mode 100644 index 0000000..f35bc29 Binary files /dev/null and b/images/Pasted image 20240308102031.png differ diff --git a/images/Pasted image 20240308103720.png b/images/Pasted image 20240308103720.png new file mode 100644 index 0000000..baef434 Binary files /dev/null and b/images/Pasted image 20240308103720.png differ diff --git a/images/Pasted image 20240308103937.png b/images/Pasted image 20240308103937.png new file mode 100644 index 0000000..912fd6f Binary files /dev/null and b/images/Pasted image 20240308103937.png differ