The answer is
fly #1: Genotype: XBY, phenotype: male with bar-shaped eyes
fly #2: Genotype: XbXb, phenotype: female with normal-shaped eyes
fly #3: Genotype: XBY, phenotype: male with bar-shaped eyes
fly #4: Genotype: XBXB, phenotype: female with bar-shaped eyes
Since there is difference in inheritance, bar-shaped eyes must be X-linked dominant trait.
XB - dominant allele on X chromosome for bar-shaped eyes
Xb - recessive allele on X chromosome for normal-shaped eyes.
Let's see:
Male offspring from parents that contained only bar-shaped alleles will have bar eyes:
Father Mother
Parents: XBY x XBXB
Male offspring: XBY
fly#1: XBY
Fly#1 is crossed with a normal-eyed female (fly#2) only the female offspring have bar-shaped eyes:
Father Mother
Parents: XBY x XbXb
Female offspring: XBXb
fly#2: XbXb
If a normal-eyed (fly#3) is crossed with a bar-eyed female (fly#4), whose parents contained only bar-shaped alleles, all their offspring will have bar-shaped eyes.:
Father Mother
Parents: XbY x XBXB (since her parents were: XBY and XBXB)
Offspring: XBXb XBXb XBY XBY