Java coding

PLease see attachment 
need two short working codes 
Due Sat  15 DEC2018