Creating a Third File from Information Contained in Two Files

In advance, I appreciate any help or tips. I apologize for not providing examples of scripts I have already tried, the reason is that I am new to programming and do not really no where to start. I think this is possible with awk, but do not know how to go about learning how to write the script that would do the trick (ie, which commands to read up on).

I have two files:

File1

ID    X
001 2   
002 2
003 1
004 1
005 2
006 1
007 2
008 1
009 1
010 1

File2

ID  Y
003 1 
004 1 
008 1 
010 1 

I would like to create a third file, File3, from File1 and File2 based on the following rules:
-the first two columns of File3 will be identical File1
-the third column in File3 will:
---contain the value from column2,File2 if the value from column1,File1 is present in column1,File2.
---contain the value from column2,file1 if the value from column2, file1 was 2
---contain the value "missing" if both (a) the ID in column1,File1 is not present in Column1,File2 and (b) the value in column2,File1 is not 2

Desired Output

ID    X Y
001 2 2    
002 2 2 
003 1 1 
004 1 1
005 2 2
006 1 missing
007 2 2
008 1 1
009 1 missing
010 1 1

for me the easiest way it's to use join :

join -a 1 -e MISS -o 1.1,1.2,2.2 file1 file2
001 2 MISS
002 2 MISS
003 1 1
004 1 1
005 2 MISS
006 1 MISS
007 2 MISS
008 1 1
009 1 MISS
010 1 1

and after you could use a simple awk to do your stuff.

explains :
-a 1 : will show line in the firt event if they aren't in the second file
-o : format the output (it's not necessary in this case)

awk 'FNR==NR{f2[$1]=$2;next} {print $0, ($1 in f2)?f2[$1]:($2==2)?$2:"missing"}' file2 file1