Question Assignment description
Write a technique that accepts a Scanner representing an input file of coin flips that (H) for head and (T) tails. Take into account every line to be a separate set of coin flips and output the quantity and proportion of heads in that line. Whether it is greater than 50% pint You win!file has:H T H H TT t t T h HOutput ought to learn: three Heads (60.zero%)You win2 TailsQuestion # 2;Write a technique that can settle for scanner representing an input file with names on every line separated by areas. Some names will seem a number of instances, print the commonest title for every line, if there’s a tie use the primary title. If all names are distinctive print the primary title on the lineI do know find out how to use Scanner and skim from recordsdata.