## Bert Deployment Instructions.

Assumption 1. Classpath is correct containing MySQL java database connector and JUnit

Assumption 2. Connected to JCU network in order for program to connect to emu.cs.jcu.edu.au, where BERT database currently resides. This is simply to test the system

1. Unzip the zipped project install file: g50_bert_install.zip - to an empty directory on your system

2. In the directory you unzipped the above file there will be a file called build_bert.bat and build_all.bat. Build_all.bat builds the JUNIT test class files if you want to run JUNIT. Build_bert.bat simply build the required classes to run bert.
If you are unsure run Build_all.bat

3. Once all files have been built simply run the file run.bat located in the directory where bert was unzipped.

- Run run.bat to indicate you want to book a room and look at room bookings as per main success scenario.
- This is the success scenario of the Book Room. You will be prompted to enter a start time (please use the format yyyy-mm-dd hh:mm:ss), end time and a room id to book a room as user 'ingramb'. The booking will then be saved to the data store and displayed as confirmation.
- You can test the scenario 2a by entering an incorrect date when asked to supply a date to display bookings.
- After the success scenario has run the system then ask you to enter a start date and end date to display bookings - this is scenario 2b.
- If you unplug the network during one of these queries a message will be displayed to the screen as in Scenario 3a.

MySQL Java Connector Setup:
(without the java connector setup you can run bert, but it won't be able to connect to the database).

- Download the MySQL Java Connector from www.mysql.org.
- Decompress the downloaded file to your hard disk in an appropriate directory
- Add the connector JAR file to your classpath

Database Access:
(use these to view the database as you add bookings).

- #1) Open a putty window and log onto manning (as yourself)
- #2) Type/copy this:
  - mysql -p -h emu.cs.jcu.edu.au -u noske
  - andrew
  - NOTE: andrew is my (imaginative) password.
  - You now have full control and grant priveleges to edit the main DBMS on emu.
- #3) The name of our database is "bert", so type the following:
  - use BERT;
- #4) The following commands will be useful:
  - show tables; //show all tables (there should be only 3 at the moment).
  - select * from room_bookings; //use this to check you have added a new room booking
- #5) If have dropped tables & want to revert to the origional database (with 4 rows populated in each table) then type:
  - drop database bert;
  - And then cut & paste this mySQL source file. If problems persist call 40553061.

JUnit Setup:

- Extract JUNIT to your hard disk
- Ensure the current dirrectory (./), the JUNIT home directory and the junit.jar file are added to the classpath

JUnit Testing:

- Run the command java junit.swingui.TestRunner froom the directory where BERT was unzipped
- The following JUNIT tests are available
  - bert.BookRoomTest
  - bert.dbconnect.DBConnectionTest
  - bert.room.RoomTest
  - bert.booking.RoomBookingTest
  - bert.register.RoomRegisterTest
  - bert.users.EmployeeTest

Compile and run "Working GUI" BERT:

- #1) Save bert_working_gui.zip to disk and unzip.
- #2) Run build.bat to compile all classes.
- #3) Run run.bat to execute main class (in MasterFrame).

How to use "Working GUI" BERT (once running):

- As you can see by looking at the database (in the putty window), there are only 4 rows in each table.
- Since we haven't implemented the automatic retrieval of a users login ID (using LDAP), a temporary text field allows you to enter your loginID (so BERT knows who is booking the rooms).
- Without changing the default values, click "View This Room And Date" and you should see there is one booking for E1.015 on the 10/08/2003. Test some other vales (whilst looking at the database).
- Notice you are only able to type sensible numbers into the text fields - (extension 2a).
- If you enter a end time before the start time you will see an error message when you click on "Make Booking"
- Have a play.