vault backup: 2024-03-08 10:55:57

This commit is contained in:
2024-03-08 10:55:57 +00:00
parent 28ea6a0a9b
commit 68fa81d02f
18 changed files with 662 additions and 81 deletions

View File

@@ -0,0 +1,125 @@
/**
* A class to track and allow for reservations in a Library
*
* @George Wilkinson
* @1.0
*/
import java.util.Date;
public class LibraryReservation
{
// instance variables
private String reservationNo;
private String itemCode;
private String userID;
private Date startDate;
private int noOfDays;
/**
* Constructor for objects of class LibraryReservation
*/
public LibraryReservation( String reservationNo, String itemCode, String userID, String startDate, int noOfDays )
{
this.reservationNo = reservationNo;
this.itemCode = itemCode;
this.userID = userID;
this.startDate = DateUtil.convertStringToDate( startDate );
this.noOfDays = noOfDays;
}
/*
* Start Accessor
*/
/*
* Return value of @reservationNo
*/
public String getReservationNo()
{
return reservationNo;
}
/*
* Return value of @itemCode
*/
public String getItemCode()
{
return itemCode;
}
/*
* Return value of @userID
*/
public String getUserID()
{
return userID;
}
/*
* Return value of @startDate
*/
public Date getStartDate()
{
return startDate;
}
/*
* Return value of @noOfDays
*/
public int getNoOfDays()
{
return noOfDays;
}
/*
* End Accessor
*
* Start Mutator
*/
/*
* Set @reservationNo to a new value
*/
public void setReservationNo( String reservationNo )
{
this.reservationNo = reservationNo;
}
/*
* Set @itemCode to a new value
*/
public void setItemCode( String itemCode )
{
this.itemCode = itemCode;
}
/*
* Set @userID to a new value
*/
public void setUserID( String userID )
{
this.userID = userID;
}
/*
* Set @startDate to a new value
*/
public void setStartDate( String startDate )
{
this.startDate = DateUtil.convertStringToDate( startDate );
}
/*
* Set @noOfDays to a new value
*/
public void setNoOfDays( int noOfDays )
{
this.noOfDays = noOfDays;
}
/*
* End Mutator
*/
}