Part B. Completed: SW1 of the 16-bit 28-pin Starter Board is connected to pin RB5. To assign the corresponding bit  to SW1 as an input:
TRISBbits.TRISB5 = 1; // TRISB controls direction for all PORTB pins, where 0 -> output, 1 -> input.