XX. predvaja:


Brief review:


Set time on server with rdate. Write a program that converts 32bit numbers in two's complement to decimal.

Instructions:


1. From directory with virtual machine images download Student.vdi (client) and SimpleArbiter.vdi(server)
2. Use VirtualBox (or another program that suits your preferences) create two virtual machines with virtual hard drive files from previous step.
3. Run both virtual machines.
4. Use username root and password kaboom to log into client. For loging into server use username tester and password SedemKrogovPekla

First part: update time with help of rdate.


1. Lookup and write down IP address of server. (ifconfig)


2. Install rdate with sudo apt-get install
3. Use rdate to update client machine time rdate SERVER_IP

Note: New time doesn't necessarily match the correct time


Second part: write a program that converts 32bit numbers in two's complement to decimal.


Program can be written in Java or Pythonu. You can use text editor of your choice.


JAVA------
1. Command nano bintodec3.java creates and opens empty text editor.
2. Write a program that converts 32bit numbers in two's complement to decimal.


3. Press Ctrl+X, then Y and Enter to save our program
4. In case you don't have java installed write sudo apt-get install openjdk-6-jdk to install it

5. Compile program with command javac bintodec3.java
6. We can test our new program with java bintodec3. Now we input some 32bit numbers in hexadecimal format

PYTHON------
1. Command nano bintodec3.py creates and opens empty text editor.
2. Write a program that converts 32bit numbers in two's complement to decimal.

3. Press Ctrl+X, then Y and Enter to save our program
4. We can test our new program with python bintodec3.py



Testing

1. We can run a tester with command ./run_test.py

2. Your username and password are the same as on moodle (npr.: "pz1234@student.uni-lj.si" in "geslo123")

3. Name of the task should look like XX.predvaja.
4. When program asks you for file path write your path to compiling program. (example: in case your program bintodec3.py is in the same folder as program run_test.py input ./bintodec3.py)
5. Next you have to input IP of your server (SimpleArbiter)
6. If all went well the program should give you an OK and you finished your job correctly