Dear student,
Stamen and carpel is the male and female reproductive part of a flower. A flower without a male and female reproductive part is not a flower. A flower is a male flower when it has male reproductive part similarly a flower is a female flower when it has female reproductive part. A plant can be female and male depending on the type of flower it possess.
Sterile male plant has the flower which is not capable of producing pollen due to some mutations in DNA. Similarly sterile female plant has the flower in which egg is not able to fuse with the pollen.
Regards