Insect reproductive system

Most insects reproduce oviparously, i.e. by laying eggs. The eggs are produced by the female in a pair of ovaries. Sperm, produced by the male in one testis or more commonly two, is transmitted to the female during mating by means of external genitalia. The sperm is stored within the female in one or more spermathecae. At the time of fertilization, the eggs travel along oviducts to be fertilized by the sperm and are then expelled from the body ("laid"), in most cases via an ovipositor.
Internal.
Female.
Female insects are able to make eggs, receive and store sperm, manipulate sperm from different males, and lay eggs. Their reproductive systems are made up of a pair of ovaries, accessory glands, one or more spermathecae, and ducts connecting these parts. The ovaries make eggs and accessory glands produce the substances to help package and lay the eggs. Spermathecae store sperm for varying periods of time and, along with portions of the oviducts, can control sperm use. The ducts and spermathecae are lined with a cuticle.
The ovaries are made up of a number of egg tubes, called ovarioles, which vary in size and number by species. The number of eggs that the insect is able to make varies according to the number of ovarioles, with the rate at which eggs develop being also influenced by ovariole design. In meroistic ovaries, the eggs-to-be divide repeatedly and most of the daughter cells become helper cells for a single oocyte in the cluster. In panoistic ovaries, each egg-to-be produced by stem germ cells develops into an oocyte; there are no helper cells from the germ line. Production of eggs by panoistic ovaries tends to be slower than that by meroistic ovaries.
Accessory glands or glandular parts of the oviducts produce a variety of substances for sperm maintenance, transport, and fertilization, as well as for protection of eggs. They can produce glue and protective substances for coating eggs or tough coverings for a batch of eggs called oothecae. Spermathecae are tubes or sacs in which sperm can be stored between the time of mating and the time an egg is fertilized. Paternity testing of insects has revealed that some, and probably many, female insects use the spermatheca and various ducts to control or bias sperm used in favor of some males over others.
Male.
The main component of the male reproductive system is the testis, suspended in the body cavity by tracheae and the fat body. The more primitive apterygote insects have a single testis, and in some lepidopterans the two maturing testes are secondarily fused into one structure during the later stages of larval development, although the ducts leading from them remain separate. However, most male insects have a pair of testes, inside of which are sperm tubes or follicles that are enclosed within a membranous sac. The follicles connect to the vas eferens by the vas defferens, and the two tubular vasa deferentia connect to a median ejaculatory duct that leads to the outside. A portion of the vas defferens is often enlarged to form the seminal vesicle, which stores the sperm before they are discharged into the female. The seminal vesicles have glandular linings that secrete nutrients for nourishment and maintenance of the sperm. The ejaculatory duct is derived from an invagination of the epidermal cells during development and, as a result, has a cuticular lining. The terminal portion of the ejaculatory duct may be sclerotized to form the intromittent organ, the aedeagus. The remainder of the male reproductive system is derived from embryonic mesoderm, except for the germ cells, or spermatogonia, which descend from the primordial pole cells very early during embryogenesis.
External.
The ground plan of the abdomen of an adult insect typically consists of 11–12 segments and is less strongly sclerotized than the head or thorax. Each segment of the abdomen is represented by a sclerotized tergum, sternum, and perhaps a pleurite. Terga are separated from each other and from the adjacent sterna or pleura by a membrane. Spiracles are located in the pleural area. Variation of this ground plan includes the fusion of terga or terga and sterna to form continuous dorsal or ventral shields or a conical tube. Some insects bear a sclerite in the pleural area called a laterotergite. Ventral sclerites are sometimes called laterosternites. During the embryonic stage of many insects and the postembryonic stage of primitive insects, 11 abdominal segments are present. In modern insects there is a tendency toward reduction in the number of the abdominal segments, but the primitive number of 11 is maintained during embryogenesis. Variation in abdominal segment number is considerable. If the Apterygota are considered to be indicative of the ground plan for pterygotes, confusion reigns: adult Protura have 12 segments, Collembola have 6. The orthopteran family Acrididae has 11 segments, and a fossil specimen of Zoraptera has a 10-segmented abdomen.
Generally, the first seven abdominal segments of adults (the pregenital segments) are similar in structure and lack appendages. However, apterygotes (bristletails and silverfish) and many immature aquatic insects have abdominal appendages. Apterygotes possess a pair of styles; rudimentary appendages that are serially homologous with the distal part of the thoracic legs. And, mesally, one or two pairs of protrusible (or exsertile) vesicles on at least some abdominal segments. These vesicles are derived from the coxal and trochanteral endites (inner annulated lobes) of the ancestral abdominal appendages. Aquatic larvae and nymphs may have gills laterally on some to most abdominal segments. Of the rest of the abdominal segments consist of the reproductive and anal parts.
The anal-genital part of the abdomen, known as the terminalia, consists generally of segments 8 or 9 to the abdominal apex. Segments 8 and 9 bear the genitalia; segment 10 is visible as a complete segment in many "lower" insects but always lacks appendages; and the small segment 11 is represented by a dorsal epiproct and pair of ventral paraprocts derived from the sternum. A pair of appendages, the cerci, articulates laterally on segment 11; typically these are annulated and filamentous but have been modified (e.g. the forceps of earwigs) or reduced in different insect orders. An annulated caudal filament, the median appendix dorsalis, arises from the tip of the epiproct in apterygotes, most mayflies (Ephemeroptera), and a few fossil insects. A similar structure in nymphal stoneflies (Plecoptera) is of uncertain homology. These terminal abdominal segments have excretory and sensory functions in all insects, but in adults there is an additional reproductive function.
Genitalia.
The organs concerned specifically with mating and the deposition of eggs are known collectively as the external genitalia, although they may be largely internal. Insect genitalia, especially male genitalia, is often directionally asymmetrical, and this trait has evolved multiple times in various orders. The components of the external genitalia of insects are very diverse in form and often have considerable taxonomic value, particularly among species that appear structurally similar in other respects. The male external genitalia have been used widely to aid in distinguishing species, whereas the female external genitalia may be simpler and less varied. 
The terminalia of adult female insects include internal structures for receiving the male copulatory organ and his spermatozoa, and external structures used for oviposition (egg-laying). Most female insects have an egg-laying tube, or ovipositor; it is absent in termites, parasitic lice, many Plecoptera, and most Ephemeroptera. Ovipositors take two forms: