vault backup: 2024-04-12 09:39:31

This commit is contained in:
2024-04-12 09:39:31 +01:00
parent e241fe8bd6
commit 30bfa6f243
73 changed files with 762 additions and 403 deletions

View File

@@ -1,13 +0,0 @@
#BlueJ class context
comment0.params=
comment0.target=int\ getPlayingTime()
comment0.text=\n\ Field\ Accessor\ Start\n
comment1.params=playingTime
comment1.target=void\ setPlayingTime(int)
comment1.text=\n\ Field\ Accessor\ End\n\ \n\ Field\ Mutator\ Start\n
comment2.params=
comment2.target=void\ printDetails()
comment2.text=\n\ Field\ Mutator\ End\n
comment3.params=detailScanner
comment3.target=void\ readItemData(java.util.Scanner)
numComments=4

View File

@@ -1,50 +0,0 @@
/**
* Subclass of LibraryItem to create objects of audio and visual items in a library.
*
* @George Wilkinson
* @1.0
*/
import java.util.Scanner;
public abstract class AudioVisual extends LibraryItem
{
private int playingTime;
/*
* Field Accessor Start
*/
public int getPlayingTime()
{
return playingTime;
}
/*
* Field Accessor End
*
* Field Mutator Start
*/
public void setPlayingTime( int playingTime )
{
this.playingTime = playingTime;
}
/*
* Field Mutator End
*/
public void printDetails()
{
System.out.println( "Playing Time: " + playingTime );
super.printDetails();
}
public void readItemData( Scanner detailScanner ){
if ( detailScanner != null ) {
this.playingTime = Integer.parseInt( detailScanner.next().trim() );
super.readItemData( detailScanner );
}
}
}

View File

@@ -1,23 +0,0 @@
#BlueJ class context
comment0.params=
comment0.target=Book()
comment0.text=\n\ Constructor\ for\ objects\ of\ class\ Book\n\ Since\ all\ field\ variables\ initialise\ as\ null,\ nothing\ should\ happen\ here.\n
comment1.params=
comment1.target=java.lang.String\ getAuthor()
comment1.text=\n\ Return\ value\ of\ @author\n
comment2.params=
comment2.target=java.lang.String\ getIsbn()
comment2.text=\n\ Return\ value\ of\ @isbn.\n
comment3.params=author
comment3.target=void\ setAuthor(java.lang.String)
comment3.text=\n\ Set\ value\ of\ @author.\n
comment4.params=isbn
comment4.target=void\ setIsbn(java.lang.String)
comment4.text=\n\ Set\ value\ of\ @isbn\n
comment5.params=
comment5.target=void\ printDetails()
comment5.text=\n\ Print\ to\ terminal,\ relevant\ details\ of\ current\ object.\n
comment6.params=detailScanner
comment6.target=void\ readItemData(java.util.Scanner)
comment6.text=\n\ Passed\ a\ scanner\ object,\ set\ field\ variables\ to\ corresponding\ values.\n
numComments=7

View File

@@ -1,73 +0,0 @@
/**
* Subclass of LibraryItem that emulates a Book item.
*
* @George Wilkinson
* @2.3
*/
import java.util.Scanner;
public class Book extends PrintedItem
{
private String author;
private String isbn;
/**
* Constructor for objects of class Book
* Since all field variables initialise as null, nothing should happen here.
*/
public Book(){}
/*
* Return value of @author
*/
public String getAuthor()
{
return author;
}
/*
* Return value of @isbn.
*/
public String getIsbn()
{
return isbn;
}
/*
* Set value of @author.
*/
public void setAuthor( String author )
{
this.author = author;
}
/*
* Set value of @isbn
*/
public void setIsbn( String isbn )
{
this.isbn = isbn;
}
/*
* Print to terminal, relevant details of current object.
*/
public void printDetails() {
System.out.println( "ISBN: " + isbn +
"\nAuthor: " + author );
super.printDetails();
}
/*
* Passed a scanner object, set field variables to corresponding values.
*/
public void readItemData( Scanner detailScanner ){
if ( detailScanner != null ) {
this.author = detailScanner.next().trim();
this.isbn = detailScanner.next().trim();
super.readItemData( detailScanner );
}
}
}

View File

@@ -1,23 +0,0 @@
#BlueJ class context
comment0.params=
comment0.target=CD()
comment0.text=\n\ Constructor\ for\ objects\ of\ class\ CD\n\ Since\ all\ field\ variables\ initialise\ as\ null,\ nothing\ should\ happen\ here.\n
comment1.params=
comment1.target=java.lang.String\ getArtist()
comment1.text=\n\ Return\ value\ of\ @artist.\n
comment2.params=
comment2.target=int\ noOfTracks()
comment2.text=\n\ Return\ value\ of\ @noOfTracks\n
comment3.params=artist
comment3.target=void\ setArtist(java.lang.String)
comment3.text=\n\ Set\ value\ of\ @artist.\n
comment4.params=noOfTracks
comment4.target=void\ setNoOfTracks(int)
comment4.text=\n\ Set\ value\ of\ @noOfTracks.\n
comment5.params=
comment5.target=void\ printDetails()
comment5.text=\n\ Print\ to\ terminal,\ relevant\ details\ of\ current\ object.\n
comment6.params=detailScanner
comment6.target=void\ readItemData(java.util.Scanner)
comment6.text=\n\ Passed\ a\ scanner,\ set\ the\ relevant\ details\ to\ their\ corresponding\ field\ variables.\n
numComments=7

View File

@@ -1,74 +0,0 @@
/**
* Subclass of AudioVisual, to create objects of a CD.
*
* @George Wilkinson
* @1.0
*/
import java.util.Scanner;
public class CD extends AudioVisual
{
private String artist;
private int noOfTracks;
/**
* Constructor for objects of class CD
* Since all field variables initialise as null, nothing should happen here.
*/
public CD(){}
/*
* Return value of @artist.
*/
public String getArtist()
{
return artist;
}
/*
* Return value of @noOfTracks
*/
public int noOfTracks()
{
return noOfTracks;
}
/*
* Set value of @artist.
*/
public void setArtist( String artist )
{
this.artist = artist;
}
/*
* Set value of @noOfTracks.
*/
public void setNoOfTracks( int noOfTracks )
{
this.noOfTracks = noOfTracks;
}
/*
* Print to terminal, relevant details of current object.
*/
public void printDetails() {
System.out.println( "Artist: " + artist +
"\nTrack Count: " + noOfTracks );
super.printDetails();
}
/*
* Passed a scanner, set the relevant details to their corresponding field variables.
*/
public void readItemData( Scanner detailScanner ){
if ( detailScanner != null ) {
this.artist = detailScanner.next().trim();
this.noOfTracks = Integer.parseInt( detailScanner.next().trim() );
super.readItemData( detailScanner );
}
}
}

View File

@@ -1,17 +0,0 @@
#BlueJ class context
comment0.params=
comment0.target=DVD()
comment0.text=\n\ Constructor\ for\ objects\ of\ class\ DVD\n\ Since\ all\ field\ variables\ initialise\ as\ null,\ nothing\ should\ happen\ here.\n
comment1.params=
comment1.target=java.lang.String\ getDirector()
comment1.text=\n\ Return\ value\ of\ @director.\n
comment2.params=director
comment2.target=void\ setDirector(java.lang.String)
comment2.text=\n\ Set\ value\ of\ @director.\n
comment3.params=
comment3.target=void\ printDetails()
comment3.text=\n\ Print\ relevant\ details\ of\ the\ current\ object.\n
comment4.params=detailScanner
comment4.target=void\ readItemData(java.util.Scanner)
comment4.text=\n\ Passed\ a\ scanner\ object,\ give\ the\ relevant\ variable\ a\ value.\n
numComments=5

View File

@@ -1,54 +0,0 @@
/**
* Subclass of AudioVisual to create objects of DVD items.
*
* @George Wilkinson
* @1.0
*/
import java.util.Scanner;
public class DVD extends AudioVisual
{
private String director;
/**
* Constructor for objects of class DVD
* Since all field variables initialise as null, nothing should happen here.
*/
public DVD(){}
/*
* Return value of @director.
*/
public String getDirector()
{
return director;
}
/*
* Set value of @director.
*/
public void setDirector( String director )
{
this.director = director;
}
/*
* Print relevant details of the current object.
*/
public void printDetails() {
System.out.println( "Director: " + director );
super.printDetails();
}
/*
* Passed a scanner object, give the relevant variable a value.
*/
public void readItemData( Scanner detailScanner ){
if ( detailScanner != null ) {
this.director = detailScanner.next().trim();
super.readItemData( detailScanner );
}
}
}

View File

@@ -1,26 +0,0 @@
#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

View File

@@ -1,263 +0,0 @@
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)<Calendar.MARCH )
// advancing past a leap year day
daysBetween += 366;
else
daysBetween += 365;
prevYearCalendar = (Calendar) calendar.clone();
calendar.add(Calendar.YEAR, 1);
}
calendar = prevYearCalendar; // calendar always advances too far, so need to correct
// now advance calendar a day at a time until end date reached
while( calendar.getTime().before(endDate) )
{
calendar.add(Calendar.DAY_OF_MONTH, 1);
daysBetween++;
}
if( outOfOrder )
daysBetween = -daysBetween;
return daysBetween;
}
/**
* Given date, a Date object, and noOfDays, an int, the method returns
* a Date object corresponding to noOfDays later than date.
*
* If noOfDays is negative, the resulting Date object will be before date.
*
* @param date a Date object
* @param noOfDays an int
*
* @return a Date
*/
public static Date incrementDate(Date date, int noOfDays)
{
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
calendar.add(Calendar.DAY_OF_MONTH, noOfDays);
return calendar.getTime();
}
/**
* Given year, an int, the method checks to see if the year
* is a leap year.
*
* @param year, an int
*
* @return a boolean, true only if the year is a leap year.
*/
public static boolean isLeapYear(int year)
{
GregorianCalendar calendar = new GregorianCalendar();
return calendar.isLeapYear(year);
}
/**
* Given dateString, a String, the method checks to see if string
* corresponds to a valid shortDatePattern.
*
* @param dateString, a String
*
* @return a boolean, true only if the dateString is a valid pattern
*/
public static boolean isValidDateString(String dateString)
{
try
{
Date d = DateUtil.convertStringToDate(dateString);
return true;
}
catch(RuntimeException ex)
{
return false;
}
}
/**
* Given date, a Date object, the method returns
* a Date object corresponding to the next day.
*
* @param noOfDays an int
*
* @return a Date
*/
public static Date nextDate(Date date)
{
return incrementDate(date, 1);
}
}

View File

@@ -1,17 +0,0 @@
#BlueJ class context
comment0.params=
comment0.target=Diary()
comment0.text=\n\ Constructor\ for\ objects\ of\ class\ Diary\n
comment1.params=itemReservation
comment1.target=void\ addReservation(LibraryReservation)
comment1.text=\n\ Method\ for\ adding\ a\ reservation\ to\ the\ diary.\ \n\ @parameter\ itemReservation,\ of\ type\ ItemReservation\ \n
comment2.params=startDate\ endDate
comment2.target=void\ printEntries(java.util.Date,\ java.util.Date)
comment2.text=\n\ Method\ for\ displaying\ the\ reservations\ between\ specified\ dates.\ \n\n\ @parameter\ \ \ \ \ startDate,\ of\ type\ Date\n\ @parameter\ \ \ \ \ endDate,\ of\ type\ Date\n
comment3.params=itemReservation
comment3.target=void\ deleteReservation(LibraryReservation)
comment3.text=\n\ Method\ for\ deleting\ a\ reservation\ from\ the\ diary.\ \n\ @parameter\ itemReservation,\ of\ type\ ItemReservation\ \n
comment4.params=date
comment4.target=LibraryReservation[]\ getReservations(java.util.Date)
comment4.text=\n\ Accessor\ method\ for\ returning\ all\ reservations\ that\ have\ entries\ \n\ in\ the\ diary\ for\ a\ particular\ date.\ \n\n\ @parameter\ \ \ \ \ date,\ of\ type\ Date\ \n\ @return\ \ \ \ \ \ \ \ an\ array\ of\ reservations,\ or\ null\ if\ no\ entry\ for\ that\ date\n
numComments=5

View File

@@ -1,205 +0,0 @@
import java.util.Date;
import java.util.Map;
import java.util.HashMap;
import java.util.ArrayList;
/**
* A class Diary that represents a "diary" of library item reservations.
*
* The diary is structured as a Map of entries in which each entry corresponds
* to a specific day. As the map is not accessed in a sequential fashion, it
* doesn't matter whether the actual map class is a TreeMap or a HashMap.
*
* @author D E Newton
*
*/
public class Diary
{
private Map<Date, DayInDiary> dayInDiaryMap;
/**
* Constructor for objects of class Diary
*/
public Diary()
{
// create diary as a map
dayInDiaryMap = new HashMap<Date, DayInDiary>();
}
/**
* Method for adding a reservation to the diary.
* @parameter itemReservation, of type ItemReservation
*/
public void addReservation(LibraryReservation itemReservation)
{
Date date = itemReservation.getStartDate();
for(int day=1; day<=itemReservation.getNoOfDays(); day++)
{
if( !dayInDiaryMap.containsKey(date) )
{
// add new day to diary if no previous entries for this day
dayInDiaryMap.put(date, new DayInDiary(date));
}
dayInDiaryMap.get(date).addEntry(itemReservation, day);
date = DateUtil.nextDate(date);
}
}
/**
* Method for displaying the reservations between specified dates.
*
* @parameter startDate, of type Date
* @parameter endDate, of type Date
*/
public void printEntries(Date startDate, Date endDate)
{
if( DateUtil.daysBetween(startDate, endDate)<0 )
{
// startDate after endDate
System.out.println("*** Error in method displayEntries(): The specified end date is before the start date ***");
}
else
{
System.out.println("\n\nDiary: Reservations for period " + DateUtil.convertDateToShortString(startDate)
+ " to " + DateUtil.convertDateToShortString(endDate) + " inclusive");
System.out.println("=================================================================");
for(Date date=startDate; date.compareTo(endDate)<=0; date = DateUtil.nextDate(date))
{
String longDate = DateUtil.convertDateToLongString(date);
System.out.print(longDate + ":");
if( dayInDiaryMap.containsKey(date) )
{
DayInDiary dayInDiary = dayInDiaryMap.get(date);
dayInDiary.printEntries();
}
else
System.out.println(" No reservations\n");
}
}
}
/**
* Method for deleting a reservation from the diary.
* @parameter itemReservation, of type ItemReservation
*/
public void deleteReservation(LibraryReservation itemReservation)
{
Date date = itemReservation.getStartDate();
for(int day=1; day<=itemReservation.getNoOfDays(); day++)
{
DayInDiary dayInDiary = dayInDiaryMap.get(date);
dayInDiary.deleteEntry(itemReservation);
if( dayInDiary.getDaysEntries().size()==0 )
dayInDiaryMap.remove(date);
date = DateUtil.nextDate(date);
}
}
/**
* Accessor method for returning all reservations that have entries
* in the diary for a particular date.
*
* @parameter date, of type Date
* @return an array of reservations, or null if no entry for that date
*/
public LibraryReservation[] getReservations(Date date)
{
DayInDiary dayinDiary = dayInDiaryMap.get(date);
if( dayinDiary==null )
return null;
else
return dayinDiary.getReservations();
}
// inner class, only needed in the Diary class
private class DayInDiary
{
// reservations for the day
private ArrayList<Entry> daysEntries;
private Date date;
/*
* Constructor for objects of class DayInDiary
*/
private DayInDiary(Date date)
{
this.date = date;
daysEntries = new ArrayList<Entry>();
}
private ArrayList<Entry> getDaysEntries()
{
return daysEntries;
}
private LibraryReservation[] getReservations()
{
int noOfEntries = daysEntries.size();
LibraryReservation[] itemReservations = new LibraryReservation[noOfEntries];
for(int i=0; i<noOfEntries; i++)
itemReservations[i] = daysEntries.get(i).getReservation();
return itemReservations;
}
private void addEntry(LibraryReservation itemReservation, int dayNo)
{
daysEntries.add(new Entry(itemReservation, dayNo));
}
private void deleteEntry(LibraryReservation itemReservation)
{
// find the entry for this reservation and delete it
Entry toBeDeletedEntry = null;
for(Entry entry : daysEntries)
{
if( entry.getReservation()==itemReservation ) // in this situation, this is better than using "equals()"
{
toBeDeletedEntry = entry;
break;
}
}
daysEntries.remove(toBeDeletedEntry);
}
private void printEntries()
{
int size = daysEntries.size();
if( size>0 )
{
System.out.println(" " + size + " reservation(s)");
for( Entry entry: daysEntries )
{
LibraryReservation itemReservation = entry.getReservation();
int reservationDay = DateUtil.daysBetween(itemReservation.getStartDate(), date) + 1;;
System.out.println(" " + itemReservation + ", day " + reservationDay + " of " + itemReservation.getNoOfDays());
}
}
else
{
System.out.println("*** Unexpected error in displayEntries() ***");
System.out.println("*** No entries for this date so it should not be in the diary ***");
}
System.out.println();
}
// an inner class of the DaysDiary class
private class Entry
{
private LibraryReservation itemReservation;
private int reservationDay; // e.g. second day is day 2 of 4 for a reservation spanning 4 days
private Entry(LibraryReservation itemReservation, int reservationDay)
{
this.itemReservation = itemReservation;
this.reservationDay = reservationDay;
}
private LibraryReservation getReservation()
{
return itemReservation;
}
}
}
}

View File

@@ -1,45 +0,0 @@
#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\ Inserts\ object\ value\ item\ alongside\ key\ of\ @itemCode\ into\ @itemsMap.\n
comment10.params=
comment10.target=void\ writeUserData()
comment10.text=\n\ A\ method\ to\ output\ all\ user\ data\ to\ a\ file\ using\ a\ fileDialog\ to\ specify\ file\ location.\n\ \n
comment11.params=
comment11.target=void\ readLibraryReservationData()
comment11.text=\n\ Read\ Library\ Reservation\ Data\ from\ a\ file\ specified\ by\ the\ user.\n
comment12.params=
comment12.target=void\ readData()
comment12.text=\n\ A\ method\ to\ read\ all\ data\ from\ files\ using\ a\ fileDialog\ to\ specify\ file\ location.\n\ This\ will\ create\ the\ corresponding\ objects\ depending\ on\ flags\ contained\ in\ the\ file\n\ and\ populate\ it's\ fields.\n\ \n\ Default\ flag\ value\:\ "book",\ to\ support\ legacy\ files.\ This\ will\ not\ interfere\ with\ \n\ files\ of\ different\ flag\ orders.\n
comment13.params=userID\ itemCode\ startDate\ noOfDays
comment13.target=boolean\ makeLibraryReservation(java.lang.String,\ java.lang.String,\ java.lang.String,\ int)
comment13.text=\n\ Create\ a\ reservation\ to\ allow\ a\ user\ to\ reserve\ an\ item\ from\ the\ library.\n
comment14.params=reservationNo
comment14.target=void\ deleteLibraryReservation(java.lang.String)
comment2.params=user
comment2.target=void\ storeUser(LibraryUser)
comment2.text=\n\ Inserts\ object\ value\ user\ alongside\ key\ of\ @userID\ into\ @customerMap.\n\ If\ the\ userID\ is\ set\ to\ unknown,\ it\ will\ call\ @generateUserID.\n
comment3.params=reservation
comment3.target=void\ storeLibraryReservation(LibraryReservation)
comment3.text=\n\ Inserts\ object\ value\ reservation\ alongside\ key\ of\ @reservationNo\ into\ @libraryReservationMap.\n
comment4.params=
comment4.target=java.lang.String\ generateReservationNo()
comment4.text=\n\ Generate\ a\ sequential\ reservation\ number.\ Since\ Maps\ do\ not\ have\ an\ index,\ we\ cannot\ simply\ get\ the\ last\ value,\ \n\ and\ recursion\ would\ be\ too\ intensive\ for\ this\ application.\ As\ a\ placeholder\ for\ the\ file\ output,\ a\ field\ variable\n\ is\ used\ to\ hold\ the\ last\ highest\ value\ for\ the\ reservation\ number.\ Unlike\ @generateUserID,\ this\ has\ a\ maximum\ value\n\ hardcoded\ to\ the\ spec.\ This\ likely\ will\ not\ be\ an\ issue\ since\ we\ can\ still\ have\ 1,000,000\ reservations.\n
comment5.params=prefix\ length
comment5.target=java.lang.String\ generateUserID(java.lang.String,\ int)
comment5.text=\n\ Returns\ a\ random\ unique\ user\ ID\ by\ specifying\ \n\ @prefix\ -\ arbitrary\ alphanumeric\ prefix\n\ @length\ -\ length\ of\ numeric\ ID\n\ and\ returning\ a\ unique\ user\ id\n\ @uuid\ -\ a\ unique\ string\ starting\ with\ @prefix,\ and\ concat.\ with\ a\ random\ number\n\ \n\ Example\:\ length\ \=\ 6,\ expected\ result\ should\ be\ under\ 999,999\ and\ above\ 99,999.\n\ If\ we\ just\ use\ 10^(length),\ this\ would\ generate\ any\ number\ under\ 1,000,000.\n\ This\ is\ an\ issue\ since\ any\ integers\ below\ 100,000\ can\ be\ used,\ which\ would\ be\ incorrect.\n\ By\ using\ the\ offset\ of\ a\ factor\ of\ 10\ below\ the\ desired\ length\ we\ can\ generate\ between\ 0\ and\ 899,999.\n\ After\ this,\ we\ can\ add\ 100,000\ back\ to\ the\ number\ to\ ensure\ a\ baseline\ length\ is\ maintained.\n\ \n\ Note\:\ I\ am\ aware\ that\ this\ is\ overengineered,\ and\ that\ several\ random\ integers\ of\ amount\ @length\ could\ be\ used,\ \n\ but\ this\ is\ considerably\ more\ efficient\ since\ there\ is\ no\ iteration\ involved\ in\ the\ creation\ of\ the\ ID.\ O(1)\n
comment6.params=
comment6.target=void\ printLibraryReservations()
comment6.text=\n\ Prints\ to\ the\ terminal,\ in\ a\ human-readable\ format,\ library\ reservation\ in\ the\ itemList\n\ \n\ Contains\ a\ marker\ at\ the\ start\ and\ end\ to\ visualise\ in\ terminal\ output.\n
comment7.params=
comment7.target=void\ printAll()
comment7.text=\n\ Prints\ to\ the\ terminal,\ in\ a\ human-readable\ format,\ all\ items\ in\ the\ itemList\n\ \n\ Contains\ a\ marker\ at\ the\ start\ and\ end\ to\ visualise\ in\ terminal\ output.\n
comment8.params=start\ end
comment8.target=void\ printDiaryEntries(java.lang.String,\ java.lang.String)
comment9.params=
comment9.target=void\ writeLibraryReservationData()
comment9.text=\n\ Write\ all\ current\ library\ reservations\ to\ a\ file\ specified\ by\ the\ user.\n
numComments=15

View File

@@ -1,462 +0,0 @@
// Import all required libraries. Not using .* as it is not good practice due to potential conflicts.
import java.util.List;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Random;
import java.util.Map;
import java.util.HashMap;
import java.util.Date;
import java.io.File;
import java.io.IOException;
import java.awt.FileDialog;
import java.awt.Frame;
import java.io.PrintWriter;
/**
* Class to create objects of a Library, which can hold and report on assets held within
*
* @author George Wilkinson
* @version 3.0
*/
public class Library
{
// private List<LibraryItem> itemList; // Initialise an ArrayList of name itemList to store Library Items
// private List<LibraryUser> userList; // Initialise an ArrayList of name userList to store Library Users
/* No longer needed, as we can use the keys of customerMap.
private HashSet<String> uuidSet; // Initialise a Hash Set of name uuidSet ( unique user identifier ) to store unique user IDs for efficient O(1) searching
*/
private Map<String, LibraryUser> customerMap;
private Map<String, LibraryItem> itemsMap;
private Map<String, LibraryReservation> libraryReservationMap;
private Diary diary;
/*
* Constructor for objects of class Library
*/
public Library()
{
// itemList = new ArrayList<LibraryItem>();
// userList = new ArrayList<LibraryUser>();
/* No longer needed, can use keys of customerMap.
uuidSet = new HashSet<String>();
*/
customerMap = new HashMap<String, LibraryUser>();
itemsMap = new HashMap<String, LibraryItem>();
libraryReservationMap = new HashMap<String, LibraryReservation>();
diary = new Diary();
}
/**
* Storing Objects Start
*/
/*
* Inserts object value item alongside key of @itemCode into @itemsMap.
*/
private void storeItem( LibraryItem item )
{
// itemList.add( item );
itemsMap.put( item.getItemCode(), item );
}
/*
* Inserts object value user alongside key of @userID into @customerMap.
* If the userID is set to unknown, it will call @generateUserID.
*/
private void storeUser( LibraryUser user )
{
// userList.add( user );
if ( user.getUserID().equals( "unknown" ) )
{
user.setUserID( generateUserID( "AB-", 6 ) );
}
customerMap.put( user.getUserID(), user ); // Store the user along with the userID.
}
/*
* Inserts object value reservation alongside key of @reservationNo into @libraryReservationMap.
*/
private void storeLibraryReservation( LibraryReservation reservation )
{
libraryReservationMap.put( reservation.getReservationNo(), reservation );
diary.addReservation( reservation );
}
/**
* Storing Objects End
*/
/**
* Generate IDs Start
*/
/*
* Generate a sequential reservation number. Since Maps do not have an index, we cannot simply get the last value,
* and recursion would be too intensive for this application. As a placeholder for the file output, a field variable
* is used to hold the last highest value for the reservation number. Unlike @generateUserID, this has a maximum value
* hardcoded to the spec. This likely will not be an issue since we can still have 1,000,000 reservations.
*/
public String generateReservationNo()
{
/*
* Originally, I did not check if the number was already taken, however the last part of step 4 introduced deletion.
* When a reservation is deleted that does not have the highest reservation number, conflicting reservation numbers are generated.
* e.g. 5 reservations, reservation 3 ID: 000003 is deleted. The next reservation number would be 000004, as the size + 1 = 4
*/
String candidateNo = String.format("%06d", libraryReservationMap.size() + 1);
for ( int i = 1; libraryReservationMap.containsKey( candidateNo ); i++ )
{
candidateNo = String.format( "%06d", libraryReservationMap.size() + i );
}
return candidateNo;
}
/*
* Returns a random unique user ID by specifying
* @prefix - arbitrary alphanumeric prefix
* @length - length of numeric ID
* and returning a unique user id
* @uuid - a unique string starting with @prefix, and concat. with a random number
*
* Example: length = 6, expected result should be under 999,999 and above 99,999.
* If we just use 10^(length), this would generate any number under 1,000,000.
* This is an issue since any integers below 100,000 can be used, which would be incorrect.
* By using the offset of a factor of 10 below the desired length we can generate between 0 and 899,999.
* After this, we can add 100,000 back to the number to ensure a baseline length is maintained.
*
* Note: I am aware that this is overengineered, and that several random integers of amount @length could be used,
* but this is considerably more efficient since there is no iteration involved in the creation of the ID. O(1)
*/
private String generateUserID( String prefix, int length )
{
Random random = new Random();
final int offset = (int) Math.pow( 10, (length-1) ); // Static integer equal to 10^(length-1) lower than length. This will allow for the factor to be consistent.
int intLength = (int) ( Math.pow( 10, length ) ) - offset ; // Integer equal to 10^(length) minus the offset. This creates a ceiling for the ID range.
if ( customerMap.size() == intLength ) {
System.out.println("Too many user IDs delegated for current range, increasing ID range by a factor of 10");
return generateUserID( prefix, length+1 );
/*
* This is essential for eliminating a stack overflow error when the specified range is full. This would be incorrect to catch.
* By incrementing the length value when the ID range is full, roughly 2.1 billion users can be created without running into an overflow error.
*/
}
String uuid = prefix + ( random.nextInt( intLength ) + offset );
/*
* Sets the uid to the prefix, concat. with a random integer of specified length
* Add the offset to a random number, to create a floor to the ID range.
*/
if ( customerMap.containsKey( uuid ) ) // Previously uuidSet.contains, replaced to de-dupe held data.
{
generateUserID( prefix, length ); // If the ID generated is already contained in the hashset, the method should be called again.
}
/* No longer needed, as we add the user and the ID to the customerMap when storing.
* uuidSet.add( uuid )
*/
return uuid;
}
/**
* Generate IDs End
*/
/**
* Print Object Details Start
*/
/*
* Prints to the terminal, in a human-readable format, library reservation in the itemList
*
* Contains a marker at the start and end to visualise in terminal output.
*/
public void printLibraryReservations() {
System.out.println( "Reservation Details Start" );
for ( LibraryReservation reservation : libraryReservationMap.values() ){
System.out.println("---------------");
reservation.printDetails();
}
System.out.println( "---------------\nReservation Details End\n" );
}
/*
* Prints to the terminal, in a human-readable format, all items in the itemList
*
* Contains a marker at the start and end to visualise in terminal output.
*/
public void printAll()
{
System.out.println("\n\nItem Details Start");
for( LibraryItem item : itemsMap.values() )
{
System.out.println("---------------");
item.printDetails();
}
System.out.println("---------------");
System.out.println("Items Details End\n\n---------------\n\nUser Details Start\n");
for ( LibraryUser user : customerMap.values() )
{
System.out.println("---------------");
user.printDetails();
}
System.out.println("---------------\nUser Details End\n");
printLibraryReservations();
}
public void printDiaryEntries( String start, String end )
{
diary.printEntries( DateUtil.convertStringToDate( start ), DateUtil.convertStringToDate( end ) );
}
/**
* Print Object Details End
*/
/**
* Write Files Start
*/
/*
* Write all current library reservations to a file specified by the user.
*/
public void writeLibraryReservationData()
{
try {
Frame frame = null; // Initialise null frame
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 ( LibraryReservation reservation : libraryReservationMap.values() ) {
reservation.writeData( writer );
}
writer.close();
}
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." );
}
}
/*
* A method to output all user data to a file using a fileDialog to specify file location.
*
*/
public void writeUserData()
{
try {
Frame frame = null; // Initialise null frame
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 ){
writer.println("[Library User data]");
for ( LibraryUser user : customerMap.values() ) {
user.writeData( writer );
}
writer.close();
}
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." );
}
}
/**
* Write Files End
*/
/**
* Read Files Start
*/
/*
* Read Library Reservation Data from a file specified by the user.
*/
public void readLibraryReservationData()
{
try {
Frame frame = null; // Initialise null frame
FileDialog fileBox = new FileDialog( frame, "Load", FileDialog.LOAD ); // Initialise file dialog box to save written data.
fileBox.setVisible( true );
Scanner reservationScanner = new Scanner ( new File( fileBox.getDirectory() + fileBox.getFile() ) );
while ( reservationScanner.hasNextLine() )
{
Scanner detailScanner = new Scanner( reservationScanner.nextLine() ).useDelimiter(",");
LibraryReservation reservation = new LibraryReservation();
reservation.readData( detailScanner );
storeLibraryReservation( reservation );
detailScanner.close();
}
reservationScanner.close(); // Close Scanner
}
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." );
}
}
/*
* A method to read all data from files using a fileDialog to specify file location.
* This will create the corresponding objects depending on flags contained in the file
* and populate it's fields.
*
* Default flag value: "book", to support legacy files. This will not interfere with
* files of different flag orders.
*/
public void readData()
{
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 = "book"; // Set a default flag to support legacy files.
while( fileScanner.hasNextLine() ) {
String lineItem = fileScanner.nextLine();
// 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";
else if ( lineItem.toLowerCase().contains("periodical") )
typeFlag = "periodical";
else if ( lineItem.toLowerCase().contains("cd") )
typeFlag = "cd";
else if ( lineItem.toLowerCase().contains("dvd") )
typeFlag = "dvd";
else if ( lineItem.toLowerCase().contains("user") )
typeFlag = "user";
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";
}
}
// Unfortunately cannot use switch case with string comparisons in Java 8.
// Check current flag for data processing.
else {
Scanner detailScanner = new Scanner ( lineItem ).useDelimiter(","); // Create a new scanner to grab the values in a comma separated list
LibraryItem item = null; // Initialise LibraryItem object. Java compiler was being cautious here, so I have to assign the value null.
if ( typeFlag.equals( "book" ) ) {
// Process Book Data
item = new Book();
}
else if ( typeFlag.equals( "periodical" ) ) {
// Process Periodic Data
item = new Periodical();
}
else if ( typeFlag.equals( "cd" ) ) {
//Process CD Data
item = new CD();
}
else if ( typeFlag.equals( "dvd" ) ) {
//Process DVD Data
item = new DVD();
}
else if ( typeFlag.equals( "user" ) ) {
//Process User Data
LibraryUser user = new LibraryUser();
user.readData( detailScanner );
storeUser( user );
continue;
}
else if ( typeFlag.equals( "generic" ) ) {
// Output unaccepted lines to terminal
System.out.println( lineItem );
continue;
}
item.readItemData( detailScanner );
storeItem( item );
detailScanner.close();
}
}
fileScanner.close();
}
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." );
}
}
/**
* Read Files End
*/
/**
* Other Methods
*/
/*
* Create a reservation to allow a user to reserve an item from the library.
*/
public boolean makeLibraryReservation( String userID, String itemCode, String startDate, int noOfDays )
{
if ( !customerMap.containsKey( userID ) )
{
System.out.println( "User does not exist" );
return false;
}
if ( !itemsMap.containsKey( itemCode ) )
{
System.out.println( "Item does not exist in library" );
return false;
}
if ( !DateUtil.isValidDateString( startDate ) )
{
System.out.println( "Date is not valid" );
return false;
}
if ( !(noOfDays > 0) )
{
System.out.println( "Reservation must be more than 0 days" );
return false;
}
Date start = DateUtil.convertStringToDate( startDate );
/*
* Unneeded, since addReservations returns any item currently on loan. Dates do not need to be checked for every day in loan.
* Date end = DateUtil.incrementDate( start, noOfDays-1 );
*/
String rID = generateReservationNo();
LibraryReservation reservation = new LibraryReservation( rID, itemCode, userID, startDate, noOfDays );
/** Instead of the following For loop, I could've implemented
* Arrays.asList( diary.getReservation( start, end ).contains( reservation )
* Although this would've been easier, this implementation is more in the scope of what we have learned.
**/
for ( LibraryReservation diaryReservation : diary.getReservations( start ) )
{
if ( diaryReservation.toString().equals( reservation.toString() ) )
{
return false;
}
}
storeLibraryReservation( reservation );
return true;
}
public void deleteLibraryReservation( String reservationNo )
{
if ( libraryReservationMap.containsKey( reservationNo ) )
{
diary.deleteReservation( libraryReservationMap.get( reservationNo ) );
libraryReservationMap.remove( reservationNo );
}
}
}

View File

@@ -1,30 +0,0 @@
#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=
comment10.target=void\ printDetails()
comment10.text=\n\ Print\ to\ terminal,\ relevant\ field\ variables\n
comment11.params=detailScanner
comment11.target=void\ readItemData(java.util.Scanner)
comment11.text=\n\ Passed\ a\ scanner\ object,\ assign\ values\ to\ relevant\ field\ variables\n
comment2.params=
comment2.target=int\ getCost()
comment3.params=
comment3.target=int\ getTimesBorrowed()
comment4.params=
comment4.target=boolean\ getOnLoan()
comment5.params=title
comment5.target=void\ setTitle(java.lang.String)
comment5.text=\n\ Field\ Accessor\ End\n\ \n\ Field\ Mutator\ Start\n
comment6.params=itemCode
comment6.target=void\ setItemCode(java.lang.String)
comment7.params=cost
comment7.target=void\ setCost(int)
comment8.params=timesBorrowed
comment8.target=void\ setTimesBorrowed(int)
comment9.params=onLoan
comment9.target=void\ setOnLoan(boolean)
numComments=12

View File

@@ -1,111 +0,0 @@
import java.util.Scanner;
import java.util.ArrayList;
import java.util.NoSuchElementException;
/**
* Superclass of items / assets stored in a Library.
*
* @author George Wilkinson
* @version 3.1
*/
public abstract class LibraryItem
{
// instance variables
private String title;
private String itemCode;
private int cost;
private int timesBorrowed;
private boolean onLoan;
/*
* 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;
}
/*
* 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;
}
/*
* Field Mutator End
*/
/*
* Print to terminal, relevant field variables
*/
public void printDetails()
{
System.out.println("Item Code: " + itemCode +
"\nTitle: " + title +
"\nCost: £" + ( ( float )( cost ) )/100 + // Convert cost in pence to £pounds.pence to be more readable.
"\nBorrowed " + getTimesBorrowed() + " times." );
if( getOnLoan() )
System.out.println( "On Loan");
else
System.out.println( "Available to Loan");
}
/*
* Passed a scanner object, assign values to relevant field variables
*/
public void readItemData( Scanner detailScanner ) {
if ( detailScanner != null ) {
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() );
}
}
}

View File

@@ -1,46 +0,0 @@
#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=LibraryReservation()
comment10.params=
comment10.target=int\ getNoOfDays()
comment10.text=\n\ Return\ value\ of\ @noOfDays\n
comment11.params=reservationNo
comment11.target=void\ setReservationNo(java.lang.String)
comment11.text=\n\ Set\ @reservationNo\ to\ a\ new\ value\n
comment12.params=itemCode
comment12.target=void\ setItemCode(java.lang.String)
comment12.text=\n\ Set\ @itemCode\ to\ a\ new\ value\n
comment13.params=userID
comment13.target=void\ setUserID(java.lang.String)
comment13.text=\n\ Set\ @userID\ to\ a\ new\ value\n
comment14.params=startDate
comment14.target=void\ setStartDate(java.lang.String)
comment14.text=\n\ Set\ @startDate\ to\ a\ new\ value\n
comment15.params=noOfDays
comment15.target=void\ setNoOfDays(int)
comment15.text=\n\ Set\ @noOfDays\ to\ a\ new\ value\n
comment2.params=
comment2.target=java.lang.String\ toString()
comment3.params=
comment3.target=void\ printDetails()
comment3.text=\n\ Prints\ to\ terminal,\ the\ details\ of\ the\ reservation.\n
comment4.params=writer
comment4.target=void\ writeData(java.io.PrintWriter)
comment5.params=detailScanner
comment5.target=void\ readData(java.util.Scanner)
comment6.params=
comment6.target=java.lang.String\ getReservationNo()
comment6.text=\n\ Return\ value\ of\ @reservationNo\n
comment7.params=
comment7.target=java.lang.String\ getItemCode()
comment7.text=\n\ Return\ value\ of\ @itemCode\n
comment8.params=
comment8.target=java.lang.String\ getUserID()
comment8.text=\n\ Return\ value\ of\ @userID\n
comment9.params=
comment9.target=java.util.Date\ getStartDate()
comment9.text=\n\ Return\ value\ of\ @startDate\n
numComments=16

View File

@@ -1,163 +0,0 @@
/**
* A class to track and allow for reservations in a Library
*
* @George Wilkinson
* @1.0
*/
import java.util.Date;
import java.io.PrintWriter;
import java.util.Scanner;
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;
}
public LibraryReservation(){}
public String toString()
{
return reservationNo + " " + userID + " " + itemCode;
}
/*
* Prints to terminal, the details of the reservation.
*/
public void printDetails()
{
System.out.println( "Reservation Number: " + reservationNo +
"\nItem Code: " + itemCode +
"\nUser ID: " + userID +
"\nDate Commencing: " + DateUtil.convertDateToShortString( startDate ) +
"\nDuration: " + noOfDays + " days" );
}
public void writeData( PrintWriter writer )
{
writer.print( reservationNo + "," + itemCode + "," + userID + "," + DateUtil.convertDateToShortString( startDate ) + "," + noOfDays );
writer.flush();
}
public void readData( Scanner detailScanner )
{
if ( detailScanner != null ) {
this.reservationNo = detailScanner.next().trim();
this.itemCode = detailScanner.next().trim();
this.userID = detailScanner.next().trim();
this.startDate = DateUtil.convertStringToDate( detailScanner.next().trim() );
this.noOfDays = Integer.parseInt( detailScanner.next().trim() );
}
}
/*
* 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
*/
}

View File

@@ -1,36 +0,0 @@
#BlueJ class context
comment0.params=
comment0.target=LibraryUser()
comment0.text=\n\ Constructor\ for\ objects\ of\ class\ LibraryUser.\ As\ fields\ \n
comment1.params=
comment1.target=java.lang.String\ getUserID()
comment1.text=\n\ Accessor\ start\ -\ return\ values\ of\ corresponding\ variables.\n
comment10.params=title
comment10.target=void\ setTitle(java.lang.String)
comment11.params=writer
comment11.target=void\ writeData(java.io.PrintWriter)
comment11.text=\n\ Passed\ a\ PrintWriter,\ append\ field\ variables\ in\ a\ set\ format,\ and\ flush\ the\ buffer.\n
comment12.params=
comment12.target=void\ printDetails()
comment12.text=\n\ Print\ to\ terminal,\ all\ relevant\ fields.\n
comment13.params=detailScanner
comment13.target=void\ readData(java.util.Scanner)
comment13.text=\n\ Passed\ a\ scanner\ object,\ assign\ relevant\ values\ to\ field\ variables.\n
comment2.params=
comment2.target=java.lang.String\ getSurname()
comment3.params=
comment3.target=java.lang.String\ getFirstName()
comment4.params=
comment4.target=java.lang.String\ getOtherInitials()
comment5.params=
comment5.target=java.lang.String\ getTitle()
comment6.params=userID
comment6.target=void\ setUserID(java.lang.String)
comment6.text=\n\ Accessor\ End\n\ Mutator\ Start\ -\ Set\ value\ of\ corresponding\ variables\n
comment7.params=surname
comment7.target=void\ setSurname(java.lang.String)
comment8.params=firstName
comment8.target=void\ setFirstName(java.lang.String)
comment9.params=otherInitials
comment9.target=void\ setOtherInitials(java.lang.String)
numComments=14

View File

@@ -1,106 +0,0 @@
/**
* Class LibraryUser to create a user of a library.
*
* @George Wilkinson
* @1.0
*/
import java.util.Scanner;
import java.io.PrintWriter;
public class LibraryUser
{
// instance variables
private String userID, surname, firstName, otherInitials, title;
/**
* Constructor for objects of class LibraryUser. As fields
*/
public LibraryUser(){}
/*
* Accessor start - return values of corresponding variables.
*/
public String getUserID(){
return userID;
}
public String getSurname(){
return surname;
}
public String getFirstName(){
return firstName;
}
public String getOtherInitials(){
return otherInitials;
}
public String getTitle(){
return title;
}
/*
* Accessor End
* Mutator Start - Set value of corresponding variables
*/
public void setUserID( String userID ){
this.userID = userID;
}
public void setSurname( String surname ){
this.surname = surname;
}
public void setFirstName( String firstName ){
this.firstName = firstName;
}
public void setOtherInitials( String otherInitials ){
this.otherInitials = otherInitials;
}
public void setTitle( String title ){
this.title = title;
}
/*
* Mutator End
*/
/*
* Passed a PrintWriter, append field variables in a set format, and flush the buffer.
*/
public void writeData( PrintWriter writer )
{
writer.print(userID + ", " + surname + ", " + firstName + ", " + otherInitials + ", " + title + "\n");
writer.flush();
}
/*
* Print to terminal, all relevant fields.
*/
public void printDetails()
{
System.out.println( "ID: " + userID +
"\nName: " + title + " " + firstName + " " + otherInitials + " " + surname );
}
/*
* Passed a scanner object, assign relevant values to field variables.
*/
public void readData( Scanner detailScanner )
{
if ( detailScanner != null ) {
this.userID = detailScanner.next().trim();
this.surname = detailScanner.next().trim();
this.firstName = detailScanner.next().trim();
this.otherInitials = detailScanner.next().trim();
this.title = detailScanner.next().trim();
}
}
}

View File

@@ -1,17 +0,0 @@
#BlueJ class context
comment0.params=
comment0.target=Periodical()
comment0.text=\n\ Constructor\ for\ objects\ of\ class\ Periodical\n\ Since\ all\ field\ variables\ initialise\ as\ null,\ nothing\ should\ happen\ here.\n
comment1.params=
comment1.target=java.lang.String\ getPublicationDate()
comment1.text=\n\ Return\ value\ of\ @publicationDate\n
comment2.params=publicationDate
comment2.target=void\ setPublicationDate(java.lang.String)
comment2.text=\n\ Set\ value\ of\ @publicationDate\n
comment3.params=
comment3.target=void\ printDetails()
comment3.text=\n\ Print\ to\ terminal,\ relevant\ field\ variable's\ values.\n
comment4.params=detailScanner
comment4.target=void\ readItemData(java.util.Scanner)
comment4.text=\n\ Passed\ a\ scanner,\ assign\ relevant\ values\ to\ field\ variables.\n
numComments=5

View File

@@ -1,54 +0,0 @@
/**
* Subclass of LibraryItem to create a periodical ( e.g. newspaper, tabloid ).
*
* @George Wilkinson
* @2.3
*/
import java.util.Scanner;
public class Periodical extends PrintedItem
{
private String publicationDate;
/**
* Constructor for objects of class Periodical
* Since all field variables initialise as null, nothing should happen here.
*/
public Periodical(){}
/*
* Return value of @publicationDate
*/
public String getPublicationDate()
{
return publicationDate;
}
/*
* Set value of @publicationDate
*/
public void setPublicationDate( String publicationDate )
{
this.publicationDate = publicationDate;
}
/*
* Print to terminal, relevant field variable's values.
*/
public void printDetails() {
System.out.println( "Publication Date: " + publicationDate );
super.printDetails();
}
/*
* Passed a scanner, assign relevant values to field variables.
*/
public void readItemData( Scanner detailScanner ){
if ( detailScanner != null ) {
this.publicationDate = detailScanner.next().trim();
super.readItemData( detailScanner );
}
}
}

View File

@@ -1,17 +0,0 @@
#BlueJ class context
comment0.params=
comment0.target=int\ getNoOfPages()
comment0.text=\n\ Field\ Accessor\ Start\n
comment1.params=
comment1.target=java.lang.String\ getPublisher()
comment2.params=noOfPages
comment2.target=void\ setNoOfPages(int)
comment2.text=\n\ Field\ Accessor\ End\n\ \n\ Field\ Mutator\ Start\n
comment3.params=publisher
comment3.target=void\ setPublisher(java.lang.String)
comment4.params=
comment4.target=void\ printDetails()
comment4.text=\n\ Field\ Mutator\ End\n
comment5.params=detailScanner
comment5.target=void\ readItemData(java.util.Scanner)
numComments=6

View File

@@ -1,62 +0,0 @@
/**
* Subclass of LibraryItem to create objects of printed items in a library.
*
* @George Wilkinson
* @1.0
*/
import java.util.Scanner;
public abstract class PrintedItem extends LibraryItem
{
private int noOfPages;
private String publisher;
/*
* Field Accessor Start
*/
public int getNoOfPages()
{
return noOfPages;
}
public String getPublisher()
{
return publisher;
}
/*
* Field Accessor End
*
* Field Mutator Start
*/
public void setNoOfPages( int noOfPages )
{
this.noOfPages = noOfPages;
}
public void setPublisher( String publisher )
{
this.publisher = publisher;
}
/*
* Field Mutator End
*/
public void printDetails()
{
System.out.println("Page Count: " + noOfPages +
"\nPublisher: " + publisher);
super.printDetails();
}
public void readItemData( Scanner detailScanner ){
if ( detailScanner != null ) {
this.noOfPages = Integer.parseInt( detailScanner.next().trim() );
this.publisher = detailScanner.next().trim();
super.readItemData( detailScanner );
}
}
}

View File

@@ -1,12 +0,0 @@
------------------------------------------------------------------------
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:

View File

@@ -1,12 +0,0 @@
// 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

View File

@@ -1,12 +0,0 @@
// 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

View File

@@ -1,18 +0,0 @@
// 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

View File

@@ -1,23 +0,0 @@
// 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

View File

@@ -1,43 +0,0 @@
// 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,500,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,678,TRUE
Thomee, 9783540331216,370, Springer Verlag, Galerkin Finite Element Methods for Parabolic Problems, LM002153,4554,543,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
[CD data]
// data is artist, noOfTracks, playingTime, title, itemCode, cost, timesBorrowed, onLoan
James Blunt,15,68, Back to Bedlam, LM003604,498,234,true
Duffy,10,73, Rockferry, LM003553,898,90,false
Adele,12,19,75, LM003580,798,87,FALSE
Robert Plant and Alison Krauss,13,72, Raising Sand, LM003750,898,89,tRUE
Goldfrapp,10,72, Seventh Tree, LM003873,1299,9876,true
Amy Winehouse,11,70, Back To Black, LM003698,698,8765,false
Jack Johnson,15,67, Sleep Through The Static, LM003773,898,54,True
Mark Ronson,14,74, Version, LM003365,698,56,true
Radiohead,10,75, In Rainbows , LM003771,798,6543,FALSE
Nick Cave,11,68, Dig!!! Lazarus Dig!!!, LM003751,1199,90,False
Nickelback,11,72, All the Right Reasons, LM003915,598,32,true
[DVD data]
// data is director, playingTime, title, itemCode, cost, timesBorrowed, onLoan
Chris Miller,92, Shrek The Third, LM004314,1026,900,TRUE
Robert Zemeckis,114, Beowulf , LM004079,900,87,FALSE
Phyllida Lloyd,118, Mamma Mia, LM004984,798,566,true
Joe Wright,130, Atonement, LM004720,1293,66,true
Andrew Adamson,125, The Chronicles of Narnia: Prince Caspian, LM004178,345,45,FALSE

View File

@@ -1,48 +0,0 @@
// 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,890,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,8765,TRUE
Thomee, 9783540331216,370, Springer Verlag, Galerkin Finite Element Methods for Parabolic Problems, LM002153,4554,780,FALSE
[CD data]
// data is artist, noOfTracks, playingTime, title, itemCode, cost, timesBorrowed, onLoan
James Blunt,15,68, Back to Bedlam, LM003604,498,234,true
Duffy,10,73, Rockferry, LM003553,898,90,false
Adele,12,19,75, LM003580,798,87,FALSE
Robert Plant and Alison Krauss,13,72, Raising Sand, LM003750,898,89,tRUE
Goldfrapp,10,72, Seventh Tree, LM003873,1299,9876,true
Amy Winehouse,11,70, Back To Black, LM003698,698,8765,false
Jack Johnson,15,67, Sleep Through The Static, LM003773,898,54,True
Mark Ronson,14,74, Version, LM003365,698,56,true
Radiohead,10,75, In Rainbows , LM003771,798,6543,FALSE
Nick Cave,11,68, Dig!!! Lazarus Dig!!!, LM003751,1199,90,False
Nickelback,11,72, All the Right Reasons, LM003915,598,32,true
[DVD data]
// data is director, playingTime, title, itemCode, cost, timesBorrowed, onLoan
Chris Miller,92, Shrek The Third, LM004314,1026,900,TRUE
Robert Zemeckis,114, Beowulf , LM004079,900,87,FALSE
Phyllida Lloyd,118, Mamma Mia, LM004984,798,566,true
Joe Wright,130, Atonement, LM004720,1293,66,true
Andrew Adamson,125, The Chronicles of Narnia: Prince Caspian, LM004178,345,45,FALSE
[periodical data]
// data is publicationDate, noOfPages, publisher, title, itemCode, cost, timesBorrowed, onLoan
25-03-08,70, News International, The Times, LM005447,80,0,FALSE
26-03-08,70, News International, The Times, LM005002,80,0,false
26-03-08,60, Associated Newspapers, Daily Mail, LM005177,40,0,false
[Library User Data]
// data is userID, surname, firstName, otherInitials, title
unknown, Newton, David, E, Dr
unknown, Gregson, Brian, R T, Mr
unknown, Evans, David, , Dr
unknown, Smith, Sara, C, Ms

View File

@@ -1,12 +0,0 @@
// this is a comment, any lines that start with //
// (and blank lines) should be ignored
// New user data
// data is userID, surname, firstName, otherInitials, title
[Library User Data]
unknown, Newton, David, E, Dr
unknown, Gregson, Brian, R T, Mr
unknown, Evans, David, , Dr
unknown, Smith, Sara, C, Ms

View File

@@ -1 +0,0 @@
0,LM005002,AB-217000,24-03-2024,3

View File

@@ -1,5 +0,0 @@
[Library User data]
AB-217000, Gregson, Brian, R T, Mr
AB-711612, Smith, Sara, C, Ms
AB-861906, Evans, David, , Dr
AB-573164, Newton, David, E, Dr

View File

@@ -1,183 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.8.0_392) on Thu Feb 29 11:54:14 GMT 2024 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Book
</TITLE>
<META NAME="date" CONTENT="2024-02-29">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Book";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
Class Book</H2>
<PRE>
java.lang.Object
<IMG SRC="./resources/inherit.gif" ALT="extended by ">LibraryItem
<IMG SRC="./resources/inherit.gif" ALT="extended by ">PrintedItem
<IMG SRC="./resources/inherit.gif" ALT="extended by "><B>Book</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>Book</B><DT>extends PrintedItem</DL>
</PRE>
<P>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="Book.html#Book()">Book</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for objects of class Book</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Book.html#printDetails()">printDetails</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Book.html#readItemData(java.util.Scanner)">readItemData</A></B>(java.util.Scanner&nbsp;detailScanner)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_PrintedItem"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class PrintedItem</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>getNoOfPages, getPublisher, setNoOfPages, setPublisher</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_LibraryItem"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class LibraryItem</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>getCost, getItemCode, getOnLoan, getTimesBorrowed, getTitle, setCost, setItemCode, setOnLoan, setTimesBorrowed, setTitle</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Book()"><!-- --></A><H3>
Book</H3>
<PRE>
public <B>Book</B>()</PRE>
<DL>
<DD>Constructor for objects of class Book
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="printDetails()"><!-- --></A><H3>
printDetails</H3>
<PRE>
public void <B>printDetails</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>printDetails</CODE> in class <CODE>LibraryItem</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="readItemData(java.util.Scanner)"><!-- --></A><H3>
readItemData</H3>
<PRE>
public void <B>readItemData</B>(java.util.Scanner&nbsp;detailScanner)</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>readItemData</CODE> in class <CODE>PrintedItem</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<HR>
</BODY>
</HTML>

View File

@@ -1,379 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.8.0_402) on Thu Mar 21 22:06:18 GMT 2024 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
DateUtil
</TITLE>
<META NAME="date" CONTENT="2024-03-21">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DateUtil";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
Class DateUtil</H2>
<PRE>
java.lang.Object
<IMG SRC="./resources/inherit.gif" ALT="extended by "><B>DateUtil</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>DateUtil</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
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)
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>D E Newton</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.text.SimpleDateFormat</CODE></FONT></TD>
<TD><CODE><B><A HREF="DateUtil.html#dateFormatter">dateFormatter</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="DateUtil.html#DateUtil()">DateUtil</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="DateUtil.html#convertDateToLongString(java.util.Date)">convertDateToLongString</A></B>(java.util.Date&nbsp;date)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts a Date object to a corresponding String in
the long date pattern style "Saturday, 25 March 2023".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="DateUtil.html#convertDateToShortString(java.util.Date)">convertDateToShortString</A></B>(java.util.Date&nbsp;date)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts a Date object to a corresponding String in
the short date pattern style "25-03-2023".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.util.Date</CODE></FONT></TD>
<TD><CODE><B><A HREF="DateUtil.html#convertStringToDate(java.lang.String)">convertStringToDate</A></B>(java.lang.String&nbsp;dateString)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts a string in the short date pattern style "25-03-2023"
to a corresponding Date object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="DateUtil.html#daysBetween(java.util.Date, java.util.Date)">daysBetween</A></B>(java.util.Date&nbsp;startDate,
java.util.Date&nbsp;endDate)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Calculates the number of days between two given dates, startDate and endDate.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.util.Date</CODE></FONT></TD>
<TD><CODE><B><A HREF="DateUtil.html#incrementDate(java.util.Date, int)">incrementDate</A></B>(java.util.Date&nbsp;date,
int&nbsp;noOfDays)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given date, a Date object, and noOfDays, an int, the method returns
a Date object corresponding to noOfDays later than date.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="DateUtil.html#isLeapYear(int)">isLeapYear</A></B>(int&nbsp;year)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given year, an int, the method checks to see if the year
is a leap year.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="DateUtil.html#isValidDateString(java.lang.String)">isValidDateString</A></B>(java.lang.String&nbsp;dateString)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given dateString, a String, the method checks to see if string
corresponds to a valid shortDatePattern.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.util.Date</CODE></FONT></TD>
<TD><CODE><B><A HREF="DateUtil.html#nextDate(java.util.Date)">nextDate</A></B>(java.util.Date&nbsp;date)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given date, a Date object, the method returns
a Date object corresponding to the next day.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="dateFormatter"><!-- --></A><H3>
dateFormatter</H3>
<PRE>
public static java.text.SimpleDateFormat <B>dateFormatter</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="DateUtil()"><!-- --></A><H3>
DateUtil</H3>
<PRE>
public <B>DateUtil</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="convertDateToLongString(java.util.Date)"><!-- --></A><H3>
convertDateToLongString</H3>
<PRE>
public static java.lang.String <B>convertDateToLongString</B>(java.util.Date&nbsp;date)</PRE>
<DL>
<DD>Converts a Date object to a corresponding String in
the long date pattern style "Saturday, 25 March 2023".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>date</CODE> - a Date object
<DT><B>Returns:</B><DD>a String, containing a long date pattern</DL>
</DD>
</DL>
<HR>
<A NAME="convertDateToShortString(java.util.Date)"><!-- --></A><H3>
convertDateToShortString</H3>
<PRE>
public static java.lang.String <B>convertDateToShortString</B>(java.util.Date&nbsp;date)</PRE>
<DL>
<DD>Converts a Date object to a corresponding String in
the short date pattern style "25-03-2023".
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>date</CODE> - a Date object
<DT><B>Returns:</B><DD>a String, containing a short date pattern</DL>
</DD>
</DL>
<HR>
<A NAME="convertStringToDate(java.lang.String)"><!-- --></A><H3>
convertStringToDate</H3>
<PRE>
public static java.util.Date <B>convertStringToDate</B>(java.lang.String&nbsp;dateString)</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dateString</CODE> - a Date object
<DT><B>Returns:</B><DD>the Date object</DL>
</DD>
</DL>
<HR>
<A NAME="daysBetween(java.util.Date, java.util.Date)"><!-- --></A><H3>
daysBetween</H3>
<PRE>
public static int <B>daysBetween</B>(java.util.Date&nbsp;startDate,
java.util.Date&nbsp;endDate)</PRE>
<DL>
<DD>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.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>startDate</CODE> - a Date object<DD><CODE>endDate</CODE> - a Date object
<DT><B>Returns:</B><DD>an int, number of days between the dates</DL>
</DD>
</DL>
<HR>
<A NAME="incrementDate(java.util.Date, int)"><!-- --></A><H3>
incrementDate</H3>
<PRE>
public static java.util.Date <B>incrementDate</B>(java.util.Date&nbsp;date,
int&nbsp;noOfDays)</PRE>
<DL>
<DD>Given date, a Date object, and noOfDays, an int, the method returns
a Date object corresponding to noOfDays later than date.
If noOfDays is negative, the resulting Date object will be before date.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>date</CODE> - a Date object<DD><CODE>noOfDays</CODE> - an int
<DT><B>Returns:</B><DD>a Date</DL>
</DD>
</DL>
<HR>
<A NAME="isLeapYear(int)"><!-- --></A><H3>
isLeapYear</H3>
<PRE>
public static boolean <B>isLeapYear</B>(int&nbsp;year)</PRE>
<DL>
<DD>Given year, an int, the method checks to see if the year
is a leap year.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>year,</CODE> - an int
<DT><B>Returns:</B><DD>a boolean, true only if the year is a leap year.</DL>
</DD>
</DL>
<HR>
<A NAME="isValidDateString(java.lang.String)"><!-- --></A><H3>
isValidDateString</H3>
<PRE>
public static boolean <B>isValidDateString</B>(java.lang.String&nbsp;dateString)</PRE>
<DL>
<DD>Given dateString, a String, the method checks to see if string
corresponds to a valid shortDatePattern.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>dateString,</CODE> - a String
<DT><B>Returns:</B><DD>a boolean, true only if the dateString is a valid pattern</DL>
</DD>
</DL>
<HR>
<A NAME="nextDate(java.util.Date)"><!-- --></A><H3>
nextDate</H3>
<PRE>
public static java.util.Date <B>nextDate</B>(java.util.Date&nbsp;date)</PRE>
<DL>
<DD>Given date, a Date object, the method returns
a Date object corresponding to the next day.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>noOfDays</CODE> - an int
<DT><B>Returns:</B><DD>a Date</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<HR>
</BODY>
</HTML>

View File

@@ -1,220 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.8.0_402) on Thu Mar 21 21:31:47 GMT 2024 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Diary
</TITLE>
<META NAME="date" CONTENT="2024-03-21">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Diary";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
Class Diary</H2>
<PRE>
java.lang.Object
<IMG SRC="./resources/inherit.gif" ALT="extended by "><B>Diary</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>Diary</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
A class Diary that represents a "diary" of library item reservations.
The diary is structured as a Map of entries in which each entry corresponds
to a specific day. As the map is not accessed in a sequential fashion, it
doesn't matter whether the actual map class is a TreeMap or a HashMap.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>D E Newton</DD>
</DL>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="Diary.html#Diary()">Diary</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for objects of class Diary</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Diary.html#addReservation(LibraryReservation)">addReservation</A></B>(LibraryReservation&nbsp;itemReservation)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method for adding a reservation to the diary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Diary.html#deleteReservation(LibraryReservation)">deleteReservation</A></B>(LibraryReservation&nbsp;itemReservation)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method for deleting a reservation from the diary.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;LibraryReservation[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="Diary.html#getReservations(java.util.Date)">getReservations</A></B>(java.util.Date&nbsp;date)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Accessor method for returning all reservations that have entries
in the diary for a particular date.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Diary.html#printEntries(java.util.Date, java.util.Date)">printEntries</A></B>(java.util.Date&nbsp;startDate,
java.util.Date&nbsp;endDate)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method for displaying the reservations between specified dates.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Diary()"><!-- --></A><H3>
Diary</H3>
<PRE>
public <B>Diary</B>()</PRE>
<DL>
<DD>Constructor for objects of class Diary
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="addReservation(LibraryReservation)"><!-- --></A><H3>
addReservation</H3>
<PRE>
public void <B>addReservation</B>(LibraryReservation&nbsp;itemReservation)</PRE>
<DL>
<DD>Method for adding a reservation to the diary.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="deleteReservation(LibraryReservation)"><!-- --></A><H3>
deleteReservation</H3>
<PRE>
public void <B>deleteReservation</B>(LibraryReservation&nbsp;itemReservation)</PRE>
<DL>
<DD>Method for deleting a reservation from the diary.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getReservations(java.util.Date)"><!-- --></A><H3>
getReservations</H3>
<PRE>
public LibraryReservation[] <B>getReservations</B>(java.util.Date&nbsp;date)</PRE>
<DL>
<DD>Accessor method for returning all reservations that have entries
in the diary for a particular date.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>an array of reservations, or null if no entry for that date</DL>
</DD>
</DL>
<HR>
<A NAME="printEntries(java.util.Date, java.util.Date)"><!-- --></A><H3>
printEntries</H3>
<PRE>
public void <B>printEntries</B>(java.util.Date&nbsp;startDate,
java.util.Date&nbsp;endDate)</PRE>
<DL>
<DD>Method for displaying the reservations between specified dates.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<HR>
</BODY>
</HTML>

View File

@@ -1,174 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.8.0_402) on Thu Mar 21 11:36:09 GMT 2024 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Library
</TITLE>
<META NAME="date" CONTENT="2024-03-21">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Library";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
Class Library</H2>
<PRE>
java.lang.Object
<IMG SRC="./resources/inherit.gif" ALT="extended by "><B>Library</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>Library</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="Library.html#Library()">Library</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Library.html#printAll()">printAll</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Library.html#readData()">readData</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="Library.html#writeUserData()">writeUserData</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Library()"><!-- --></A><H3>
Library</H3>
<PRE>
public <B>Library</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="printAll()"><!-- --></A><H3>
printAll</H3>
<PRE>
public void <B>printAll</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="readData()"><!-- --></A><H3>
readData</H3>
<PRE>
public void <B>readData</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="writeUserData()"><!-- --></A><H3>
writeUserData</H3>
<PRE>
public void <B>writeUserData</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<HR>
</BODY>
</HTML>

View File

@@ -1,421 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.8.0_392) on Fri Feb 16 14:05:03 GMT 2024 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
LibraryItem
</TITLE>
<META NAME="date" CONTENT="2024-02-16">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="LibraryItem";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
Class LibraryItem</H2>
<PRE>
java.lang.Object
<IMG SRC="./resources/inherit.gif" ALT="extended by "><B>LibraryItem</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>LibraryItem</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
<HR>
<P>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="LibraryItem.html#LibraryItem()">LibraryItem</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#getCost()">getCost</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#getItemCode()">getItemCode</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#getNoOfPages()">getNoOfPages</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#getOnLoan()">getOnLoan</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#getPublisher()">getPublisher</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#getTimesBorrowed()">getTimesBorrowed</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#getTitle()">getTitle</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#printDetails()">printDetails</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#readItemData(java.util.Scanner)">readItemData</A></B>(java.util.Scanner&nbsp;detailScanner)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#setCost(int)">setCost</A></B>(int&nbsp;cost)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#setItemCode(java.lang.String)">setItemCode</A></B>(java.lang.String&nbsp;itemCode)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#setNoOfPages(int)">setNoOfPages</A></B>(int&nbsp;noOfPages)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#setOnLoan(boolean)">setOnLoan</A></B>(boolean&nbsp;onLoan)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#setPublisher(java.lang.String)">setPublisher</A></B>(java.lang.String&nbsp;publisher)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#setTimesBorrowed(int)">setTimesBorrowed</A></B>(int&nbsp;timesBorrowed)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="LibraryItem.html#setTitle(java.lang.String)">setTitle</A></B>(java.lang.String&nbsp;title)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="LibraryItem()"><!-- --></A><H3>
LibraryItem</H3>
<PRE>
public <B>LibraryItem</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="getCost()"><!-- --></A><H3>
getCost</H3>
<PRE>
public int <B>getCost</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getItemCode()"><!-- --></A><H3>
getItemCode</H3>
<PRE>
public java.lang.String <B>getItemCode</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getNoOfPages()"><!-- --></A><H3>
getNoOfPages</H3>
<PRE>
public int <B>getNoOfPages</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getOnLoan()"><!-- --></A><H3>
getOnLoan</H3>
<PRE>
public boolean <B>getOnLoan</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getPublisher()"><!-- --></A><H3>
getPublisher</H3>
<PRE>
public java.lang.String <B>getPublisher</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getTimesBorrowed()"><!-- --></A><H3>
getTimesBorrowed</H3>
<PRE>
public int <B>getTimesBorrowed</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getTitle()"><!-- --></A><H3>
getTitle</H3>
<PRE>
public java.lang.String <B>getTitle</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="printDetails()"><!-- --></A><H3>
printDetails</H3>
<PRE>
public void <B>printDetails</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="readItemData(java.util.Scanner)"><!-- --></A><H3>
readItemData</H3>
<PRE>
public void <B>readItemData</B>(java.util.Scanner&nbsp;detailScanner)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setCost(int)"><!-- --></A><H3>
setCost</H3>
<PRE>
public void <B>setCost</B>(int&nbsp;cost)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setItemCode(java.lang.String)"><!-- --></A><H3>
setItemCode</H3>
<PRE>
public void <B>setItemCode</B>(java.lang.String&nbsp;itemCode)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setNoOfPages(int)"><!-- --></A><H3>
setNoOfPages</H3>
<PRE>
public void <B>setNoOfPages</B>(int&nbsp;noOfPages)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setOnLoan(boolean)"><!-- --></A><H3>
setOnLoan</H3>
<PRE>
public void <B>setOnLoan</B>(boolean&nbsp;onLoan)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setPublisher(java.lang.String)"><!-- --></A><H3>
setPublisher</H3>
<PRE>
public void <B>setPublisher</B>(java.lang.String&nbsp;publisher)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setTimesBorrowed(int)"><!-- --></A><H3>
setTimesBorrowed</H3>
<PRE>
public void <B>setTimesBorrowed</B>(int&nbsp;timesBorrowed)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setTitle(java.lang.String)"><!-- --></A><H3>
setTitle</H3>
<PRE>
public void <B>setTitle</B>(java.lang.String&nbsp;title)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<HR>
</BODY>
</HTML>

View File

@@ -1,32 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.8.0_402) on Thu Mar 21 22:06:18 GMT 2024 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
All Classes
</TITLE>
<META NAME="date" CONTENT="2024-03-21">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<FONT size="+1" CLASS="FrameHeadingFont">
<B>All Classes</B></FONT>
<BR>
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
<TR>
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="DateUtil.html" title="class in &lt;Unnamed&gt;" target="classFrame">DateUtil</A>
<BR>
</FONT></TD>
</TR>
</TABLE>
</BODY>
</HTML>

View File

@@ -1,32 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.8.0_402) on Thu Mar 21 22:06:18 GMT 2024 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
All Classes
</TITLE>
<META NAME="date" CONTENT="2024-03-21">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<FONT size="+1" CLASS="FrameHeadingFont">
<B>All Classes</B></FONT>
<BR>
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
<TR>
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="DateUtil.html" title="class in &lt;Unnamed&gt;">DateUtil</A>
<BR>
</FONT></TD>
</TR>
</TABLE>
</BODY>
</HTML>

View File

@@ -1,45 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.8.0_402) on Thu Mar 21 22:06:18 GMT 2024 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Constant Field Values
</TITLE>
<META NAME="date" CONTENT="2024-03-21">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Constant Field Values";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<HR>
<CENTER>
<H1>
Constant Field Values</H1>
</CENTER>
<HR SIZE="4" NOSHADE>
<B>Contents</B><UL>
</UL>
<HR>
<HR>
</BODY>
</HTML>

View File

@@ -1,37 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Mar 21 22:06:18 GMT 2024-->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Generated Documentation (Untitled)
</TITLE>
<SCRIPT type="text/javascript">
targetPage = "" + window.location.search;
if (targetPage != "" && targetPage != "undefined")
targetPage = targetPage.substring(1);
if (targetPage.indexOf(":") != -1)
targetPage = "undefined";
function loadFrames() {
if (targetPage != "" && targetPage != "undefined")
top.classFrame.location = top.targetPage;
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<FRAMESET cols="20%,80%" title="" onLoad="top.loadFrames()">
<FRAME src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
<FRAME src="DateUtil.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
<NOFRAMES>
<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="DateUtil.html">Non-frame version.</A>
</NOFRAMES>
</FRAMESET>
</HTML>

View File

@@ -1,45 +0,0 @@
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/DateUtil.java
<---- end of javadoc command ---->
Loading source file /home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/DateUtil.java...
Constructing Javadoc information...
Standard Doclet version 1.8.0_402
Building tree for all the packages and classes...
Generating /home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/doc/DateUtil.html...
/home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/DateUtil.java:224: warning - @param argument "year," is not a parameter name.
/home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/DateUtil.java:238: warning - @param argument "dateString," is not a parameter name.
/home/boris/OneDrive/Computer Science Year 1/Semester 2/Programming 2/Project/Part 2/DateUtil.java:259: warning - @param argument "noOfDays" is not a parameter name.
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...
3 warnings

View File

@@ -1,33 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.8.0_402) on Thu Mar 21 22:06:18 GMT 2024 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
&lt;Unnamed&gt;
</TITLE>
<META NAME="date" CONTENT="2024-03-21">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<FONT size="+1" CLASS="FrameTitleFont">
<A HREF="package-summary.html" target="classFrame">&lt;Unnamed&gt;</A></FONT>
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
<TR>
<TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont">
Classes</FONT>&nbsp;
<FONT CLASS="FrameItemFont">
<BR>
<A HREF="DateUtil.html" title="class in &lt;Unnamed&gt;" target="classFrame">DateUtil</A></FONT></TD>
</TR>
</TABLE>
</BODY>
</HTML>

View File

@@ -1,46 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.8.0_402) on Thu Mar 21 22:06:18 GMT 2024 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
</TITLE>
<META NAME="date" CONTENT="2024-03-21">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<HR>
<HR>
<H2>
Package &lt;Unnamed&gt;
</H2>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="DateUtil.html" title="class in &lt;Unnamed&gt;">DateUtil</A></B></TD>
<TD>A class DateUtil with the following methods for dealing with dates.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<DL>
</DL>
<HR>
<HR>
</BODY>
</HTML>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 B

View File

@@ -1,29 +0,0 @@
/* 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}

View File

@@ -1 +0,0 @@
[Library User data]

View File

@@ -2,6 +2,15 @@
dependency1.from=Library
dependency1.to=Book
dependency1.type=UsesDependency
dependency10.from=Diary
dependency10.to=LibraryReservation
dependency10.type=UsesDependency
dependency11.from=Diary
dependency11.to=DateUtil
dependency11.type=UsesDependency
dependency12.from=Library
dependency12.to=Diary
dependency12.type=UsesDependency
dependency2.from=Library
dependency2.to=Periodical
dependency2.type=UsesDependency
@@ -23,157 +32,173 @@ dependency7.type=UsesDependency
dependency8.from=Library
dependency8.to=LibraryReservation
dependency8.type=UsesDependency
dependency9.from=Library
dependency9.to=DateUtil
dependency9.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=8
package.numTargets=11
package.editor.x=861
package.editor.y=66
package.numDependencies=12
package.numTargets=12
package.showExtends=true
package.showUses=true
project.charset=UTF-8
target1.editor.height=700
target1.editor.width=900
target1.editor.x=1017
target1.editor.y=76
target1.editor.height=786
target1.editor.width=960
target1.editor.x=34
target1.editor.y=174
target1.height=50
target1.name=PrintedItem
target1.name=CD
target1.naviview.expanded=true
target1.showInterface=false
target1.type=AbstractTarget
target1.type=ClassTarget
target1.typeParameters=
target1.width=110
target1.x=130
target1.y=240
target10.editor.height=700
target10.editor.width=900
target10.editor.x=960
target10.editor.y=146
target1.width=80
target1.x=360
target1.y=340
target10.editor.height=1049
target10.editor.width=1920
target10.editor.x=0
target10.editor.y=31
target10.height=50
target10.name=AudioVisual
target10.name=Book
target10.naviview.expanded=true
target10.showInterface=false
target10.type=AbstractTarget
target10.type=ClassTarget
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
target10.width=80
target10.x=180
target10.y=340
target11.editor.height=1049
target11.editor.width=1920
target11.editor.x=0
target11.editor.y=31
target11.height=50
target11.name=LibraryReservation
target11.name=Library
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
target2.editor.y=174
target2.height=50
target2.name=CD
target11.width=100
target11.x=260
target11.y=240
target12.editor.height=700
target12.editor.width=900
target12.editor.x=960
target12.editor.y=146
target12.height=50
target12.name=AudioVisual
target12.naviview.expanded=true
target12.showInterface=false
target12.type=AbstractTarget
target12.typeParameters=
target12.width=110
target12.x=380
target12.y=240
target2.editor.height=1049
target2.editor.width=1920
target2.editor.x=0
target2.editor.y=31
target2.height=60
target2.name=LibraryItem
target2.naviview.expanded=true
target2.showInterface=false
target2.type=ClassTarget
target2.type=AbstractTarget
target2.typeParameters=
target2.width=80
target2.x=360
target2.y=340
target2.width=120
target2.x=250
target2.y=110
target3.editor.height=700
target3.editor.width=900
target3.editor.x=557
target3.editor.y=177
target3.height=60
target3.name=LibraryItem
target3.editor.width=1619
target3.editor.x=192
target3.editor.y=267
target3.height=50
target3.name=Periodical
target3.naviview.expanded=true
target3.showInterface=false
target3.type=AbstractTarget
target3.type=ClassTarget
target3.typeParameters=
target3.width=120
target3.x=250
target3.y=110
target4.editor.height=1049
target4.editor.width=1920
target4.editor.x=0
target4.editor.y=31
target3.width=90
target3.x=60
target3.y=380
target4.editor.height=700
target4.editor.width=900
target4.editor.x=40
target4.editor.y=51
target4.height=50
target4.name=DVD
target4.name=DateUtil
target4.naviview.expanded=true
target4.showInterface=false
target4.showInterface=true
target4.type=ClassTarget
target4.typeParameters=
target4.width=80
target4.x=470
target4.y=380
target4.x=70
target4.y=10
target5.editor.height=700
target5.editor.width=900
target5.editor.x=55
target5.editor.y=274
target5.editor.x=967
target5.editor.y=142
target5.height=50
target5.name=LibraryUser
target5.name=Diary
target5.naviview.expanded=true
target5.showInterface=false
target5.type=ClassTarget
target5.typeParameters=
target5.width=110
target5.x=100
target5.y=170
target6.editor.height=700
target6.editor.width=1619
target6.editor.x=192
target6.editor.y=267
target5.width=80
target5.x=530
target5.y=240
target6.editor.height=1049
target6.editor.width=960
target6.editor.x=960
target6.editor.y=31
target6.height=50
target6.name=Periodical
target6.name=LibraryReservation
target6.naviview.expanded=true
target6.showInterface=false
target6.type=ClassTarget
target6.typeParameters=
target6.width=90
target6.x=60
target6.y=380
target7.editor.height=1049
target7.editor.width=1920
target7.editor.x=0
target7.editor.y=31
target6.width=160
target6.x=230
target6.y=440
target7.editor.height=700
target7.editor.width=900
target7.editor.x=1017
target7.editor.y=76
target7.height=50
target7.name=Book
target7.name=PrintedItem
target7.naviview.expanded=true
target7.showInterface=false
target7.type=ClassTarget
target7.type=AbstractTarget
target7.typeParameters=
target7.width=80
target7.x=180
target7.y=340
target8.editor.height=700
target8.editor.width=900
target8.editor.x=40
target8.editor.y=51
target7.width=110
target7.x=130
target7.y=240
target8.editor.height=1049
target8.editor.width=1920
target8.editor.x=0
target8.editor.y=31
target8.height=50
target8.name=DateUtil
target8.name=DVD
target8.naviview.expanded=true
target8.showInterface=false
target8.type=ClassTarget
target8.typeParameters=
target8.width=80
target8.x=70
target8.y=10
target8.x=470
target8.y=380
target9.editor.height=1049
target9.editor.width=1920
target9.editor.width=960
target9.editor.x=0
target9.editor.y=31
target9.height=50
target9.name=Library
target9.name=LibraryUser
target9.naviview.expanded=true
target9.showInterface=false
target9.type=ClassTarget
target9.typeParameters=
target9.width=100
target9.x=260
target9.y=240
target9.width=110
target9.x=100
target9.y=170