You are on page 1of 36

Solution Manual for Problem Solving with C++ 9th Edition Savitch

0133591743 9780133591743
Link full download
Solution Manual:
https://testbankpack.com/p/solution-manual-for-problem-solving-with-c-
9th-edition-savitch-0133591743-9780133591743/

Test Bank:
https://testbankpack.com/p/test-bank-for-problem-solving-with-c-9th-
edition-savitch-0133591743-9780133591743/

Chapter 2
C++ Basics

1. Solutions to the Practice Programs and Programming Projects:

Practice Program 1. Metric - English units Conversion


A metric ton is 35,273.92 ounces. Write a C++ program to read the weight of a box of
cereal in ounces then output this weight in metric tons, along with the number of boxes
to yield a metric ton of cereal.

Design: To convert 14 ounces (of cereal) to metric tons, we use the 'ratio of units' to tell
us whether to divide or multiply:
1 metric tons
14 ounces * * = 0.000397 metric tons
35,273 ounces
The use of units will simplify the determination of whether to divide or to multiply in
making a conversion. Notice that ounces/ounce becomes unit-less, so that we are left
with metric ton units. The number of ounces will be very, very much larger than the
number of metric tons. It is then reasonable to divide the number of ounces by the
number of ounces in a metric ton to get the number of metric tons.
Now let metricTonsPerBox be the weight of the cereal box in metric tons. Let
ouncesPerBox the be the weight of the cereal box in ounces. Then in C++ the formula
becomes:

const double ouncesPerMetric_ton = 35272.92;

metricTonsPerBox = ouncesPerBox / ouncesPerMetricTon;

1
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

This is metric tons PER BOX, whence the number of BOX(es) PER metric ton should be
the reciprocal:

boxesPerMetricTon = 1 / metricTonsPerBox;

Once this analysis is made, the code proceeds quickly:

//Purpose: To convert cereal box weight from ounces to


// metric tons to compute number of boxes to make up a
// metric ton of cereal.

#include <iostream>
using namespace std;

const double ouncesPerMetricTon = 35272.92;

int main()
{
double ouncesPerBox, metricTonsPerbox,
boxesPerMetricTon;
char ans = 'y';
while( 'y' == ans || 'Y' == ans )
{
cout << “enter the weight in ounces of your”
<< “favorite cereal:”
<<endl; cin >> ouncesPerBox;
metricTonsPerbox =
ouncesPerBox / ouncesPerMetricTon;

2
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

boxesPerMetricTon = 1 / metricTonsPerbox;

cout << "metric tons per box = "


<< metricTonsPerbox << endl;
cout << "boxes to yield a metric ton = "
<< boxesPerMetricTon << endl;
cout << " Y or y continues, any other character ”
<< “terminates." <<
endl; cin >> ans;
}
return 0;
}

A sample run follows:

enter the weight in ounces of your favorite cereal:


14
metric tons per box = 0.000396905
boxes to yield a metric ton = 2519.49
Y or y continues, any other characters terminates.
y
enter the weight in ounces of your favorite cereal:
20
metric tons per box = 0.000567007
boxes to yield a metric ton = 1763.65
Y or y continues, any other characters terminates.
n

Practice Program 2 : Babylonian Algorithm


//***********************************************************************
// Chapter 2 Practice Program 2
//

3
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

// This program computes the square root of a number n


// using the Babylonian algorithm.
//
***********************************************************************
#include <iostream>

using namespace std;

// ====================
// main function
// ====================
int main()
{
double guess;
double previousguess;
double n;
double r;
// Input number to compute the square root of
cout << "Enter number to compute the square root of." <<
endl; cin >> n;
// Initial guess, although note this doesn’t work for the number
1 previousguess = n;
guess = n /2;
// Repeat until guess is within 1% of the previous guess
while (((previousguess - guess) / previousguess) > 0.01)
{
previousguess = guess;
r = n / guess;
guess = (guess + r) / 2;
}
cout << "The estimate of the square root of " << n << " is "
<< guess <<
endl; return 0;
}

Practice Program 3 : Treadmill Speed


// **********************************************************************
// Ch2Proj13.cpp
//
// This program inputs a speed in MPH and converts it to
// Minutes and Seconds per mile, as might be output on a treadmill.
//
***********************************************************************
#include <iostream>

using namespace std;

4
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

// ====================
// main function
// ====================
int main()
{
double milesPerHour;
double hoursPerMile;
double minutesPerMile;
double secondsPace;
int minutesPace;
// Input miles per hour
cout << "Enter speed in miles per hour:" <<
endl; cin >> milesPerHour;
// Compute inverse, which is hours per
mile hoursPerMile = 1.0 / milesPerHour;
// Convert to minutes per mile which is 60 seconds/hour *
hoursPerMile minutesPerMile = 60 * hoursPerMile;
// Extract minutes by converting to an integer, while
// truncates any value after the decimal point
minutesPace = static_cast<int>(minutesPerMile);
// Seconds is the remaining number of minutes * 60
secondsPace = (minutesPerMile - minutesPace) * 60;
cout << milesPerHour << " miles per hour is a pace of " << minutesPace
<< " minutes and " << secondsPace << " seconds. " <<
endl;
return 0;
}

Practice Program 4 : MadLibs


// **********************************************************************
// Chapter 2 Practice Program 4
//
// This program plays a simple game of "Mad Libs".
//
***********************************************************************
#include <iostream>

using namespace std;

// ====================
// main function
// ====================
int main()
{

5
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

string instructorName;
string yourName;
string food;
int num;
string adjective;
string color;
string animal;
cout << "Welcome to Mad Libs! Enter your name: " << endl;
cin >> yourName;
cout << "Enter your instructor's first or last name." <<
endl; cin >> instructorName;
cout << "Enter a food." << endl;
cin >> food;
cout << "Enter a number between 100 and 120." <<
endl; cin >> num;
cout << "Enter an adjective." << endl;
cin >> adjective;
cout << "Enter a color." << endl;
cin >> color;
cout << "Enter an animal." << endl;
cin >> animal;
cout << endl;
cout << "Dear Instructor " << instructorName << "," <<
endl; cout << endl;
cout << "I am sorry that I am unable to turn in my homework at
this time."
<< endl;
cout << "First, I ate a rotten " << food << " which made me turn "
<< color << " and " << endl;
cout << "extremely ill. I came down with a fever of " << num << "." <<
endl;
cout << "Next, my " << adjective << " pet " << animal << " must have "
<<
"smelled the remains " << endl;
cout << "of the " << food << " on my homework, because he ate it. I am
" <<
"currently " << endl;
cout << "rewriting my homework and hope you will accept it late."
<< endl;
cout << endl;
cout << "Sincerely," << endl;
cout << yourName << endl;
return 0;
}

Practice Problem 5 : Volume of a Sphere


//********************************************************************
* // Chapter 2 Practice Problem 5

6
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

//
// Re-write a program using the style described in the chapter for
// indentation, add comments, and use appropriately named constants.
//**********************************************************************
*
// File Name: volume.cpp
// Author:
// Email Address:
// Project Number: 2.16
// Description: Computes the volume of a sphere given the radius
// Last Changed: October 6, 2007
#include <iostream>
using namespace std;
int main()
{
const double PI = 3.1415;
double radius, volume;
// Prompt the user to enter a radius
cout << "Enter radius of a sphere." <<
endl; cin >> radius;
// Compute and print the volume
volume = (4.0 / 3.0) * PI * radius * radius *
radius; cout << " The volume is " << volume << endl;
return 0;
}

Programming Project 1. Lethal Dose


Certain artificial sweeteners are poisonous at some dosage level. It is desired to know how
much soda a dieter can drink without dying. The problem statement gives no information
about how to scale the amount of toxicity from the dimensions of the experimental mouse
to the dimensions of the dieter. Hence the student must supply this necessary assumption
as basis for the calculation.

This solution supposes the lethal dose is directly proportional to the weight of the subject,
hence

7
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

weightOfDieter
lethalDoseDieter = lethalDoseMouse *
weightOfMouse
This program accepts weight of a lethal dose for a mouse, the weight of the mouse, and
the weight of the dieter, and calculates the amount of sweetener that will just kill the
dieter, based on the lethal dose for a mouse in the lab. If the student has problems with
grams and pounds, a pound is 454 grams.

It is interesting that the result probably wanted is a safe number of cans, while all the data
can provide is the minimum lethal number! Some students will probably realize this, but
my experience is that most will not. I just weighed a can of diet pop and subtracted the
weight of an empty can. The result is about 350 grams. The label claims 355 ml, which
weighs very nearly 355 grams. To get the lethal number of cans from the number of
grams of sweetener, you need the number of grams of sweetener in a can of pop, and the
concentration of sweetener, which the problem assumes 0.1% , that is a conversion factor
of 0.001.

gramsSweetenerPerCan = 350 * 0.001 = 0.35


grams/can cans = lethalDoseDieter / (0.35 grams / can)

//Ch2 Programming Project 1


//Input: lethal dose of sweetener for a lab mouse, weights
// of mouse and dieter, and concentration of sweetener in a
// soda.
//Output: lethal dose of soda in number of cans.
//Assumption: lethal dose proportional to weight of subject
// Concentration of sweetener in the soda is 1/10 percent
#include <iostream>
using namespace std;

8
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

const double concentration = .001; // 1/10 of 1 percent


const double canWeight = 350;
const double gramsSweetnerPerCan = canWeight ∗
concentration; //units of grams/can
int main()
{
double lethalDoseMouse, lethalDoseDieter,
weightMouse, weightDieter; //units: grams
double cans;
char ans;
do
{
cout << "Enter the weight of the mouse in grams"
<< endl;
cin >> weightMouse;
cout << "Enter the lethal dose for the mouse in“
<< ”grams " << endl;
cin >> lethalDoseMouse;
cout << "Enter the desired weight of the dieter in”
<<“ grams " << endl;
cin >> weightDieter;
lethalDoseDieter =
lethalDoseMouse ∗ weightDieter/weightMouse;
cout << "For these parameters:\nmouse weight: "
<< weightMouse
<< " grams " << endl
<< "lethal dose for the mouse: "
<< lethalDoseMouse
<< "grams" << endl

9
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

<< "Dieter weight: " << weightDieter


<< " grams " << endl
<< "The lethal dose in grams of sweetener is: "
<< lethalDoseDieter << endl;
cans = lethalDoseDieter / gramsSweetnerPerCan;
cout << "Lethal number of cans of pop: "
<< cans << endl;
cout << "Y or y continues, any other character quits"
<< endl;
cin >> ans;
} while ( 'y' == ans || 'Y' == ans );
return 0;
}

A typical run follows:


17:23:09:~/AW$ a.out
Enter the weight of the mouse in grams
15
Enter the lethal dose for the mouse in grams
100
Enter the desired weight of the dieter, in grams
45400
For these parameters:
mouse weight: 15 grams
lethal dose for the mouse: 100 grams
Dieter weight: 45400 grams
The lethal dose in grams of sweetener is: 302667
Lethal number of cans of pop: 864762
Y or y continues, any other character quits

10
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

Enter the weight of the mouse in grams


30
Enter the lethal dose for the mouse in grams
100
Enter the desired weight of the dieter, in grams
45400
For these parameters:
mouse weight: 30 grams
lethal dose for the mouse: 100 grams
Dieter weight: 45400 grams
The lethal dose in grams of sweetener is: 151333
Lethal number of cans of pop: 432381
Y or y continues, any other character quits
q
17:23:56:~/AW$

Programming Project 2. Pay Increase


The workers have won a 7.6% pay increase, effective 6 months retroactively. This
program is to accept the previous annual salary, then outputs the retroactive pay due the
employee, the new annual salary, and the new monthly salary. Allow user to repeat as
desired. The appropriate formulae are:

const double INCREASE = 0.076;


newSalary = salary * (1 +
INCREASE); monthly = salary / 12;
retroactive = (salary – oldSalary)/2;
The code follows:

//Ch2 Programming Project 2

11
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

//Given 6 mos retroactive 7.6% pay increase,


//input salary
//Output new annual and monthly salaries, retroactive pay
#include <iostream>
using namespace std;

const double INCREASE = 0.076;

int main()
{
double oldSalary, salary, monthly, retroactive;
char ans;
cout << "Enter current annual salary." << endl
<< "I'll return new annual salary, monthly ”
<< “salary, and retroactive pay." << endl;
cin >> oldSalary;//old annual salary
salary = oldSalary*(1+INCREASE);//new annual
salary monthly = salary/12;
retroactive = (salary – oldSalary)/2;
cout << "new annual salary " << salary << endl;
cout << "new monthly salary " << monthly << endl;
cout << "retroactive salary due: "
<< retroactive << endl;
return 0;
}
17:50:12:~/AW$ a.out
Enter current annual salary.
100000
I'll return new annual salary, monthly salary, and

retroactive pay.

12
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

new annual salary 107600 new


monthly salary 8966.67
retroactive salary due: 3800

Programming Project 3. Retroactive Salary


// Modify program from Programming Project #2 so that it
// calculates retroactive
// salary for a worker for a number of months entered by the user.
//Given a 7.6% pay increase,
//input salary
//input number of months to compute retroactive salary
//Output new annual and monthly salaries, retroactive pay
#include <iostream>

const double INCREASE = 0.076;

int main()
{
using std::cout;
using std::cin;
using std::endl;
double oldSalary, salary, monthly, oldMonthly, retroactive;
int numberOfMonths; // number of months to pay retroactive
increase
char ans;
cout << "Enter current annual salary and a number of months\n"
<< "for which you wish to compute retroactive pay.\n"
<< "I'll return new annual salary, monthly "
<< "salary, and retroactive pay." << endl;
cin >> oldSalary;//old annual
salary cin >> numberOfMonths;
salary = oldSalary * (1+INCREASE); //new annual salary
oldMonthly = oldSalary/12;
monthly = salary/12;
retroactive = (monthly - oldMonthly) * numberOfMonths;
// retroactive = (salary - oldSalary)/2; // six months
retroactive pay increase.
cout << "new annual salary " << salary << endl;

13
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Savitch Instructor’s Resource Guide
Problem Solving w/ C++, 9e Chapter 2

cout << "new monthly salary " << monthly <<


endl; cout << "retroactive salary due: "
<< retroactive <<
endl; return 0;
}
/*

Typical run

Enter current annual salary and a number of months


for which you wish to compute retroactive pay.
I'll return new annual salary, monthly salary, and
retroactive pay.
12000
9
new annual salary 12912
new monthly salary 1076
retroactive salary due: 684
Press any key to continue
*/

Programming Project 6. Payroll


This problem involves payroll and uses the selection construct. A possible restatement: An
hourly employee's regular payRate is $16.78/hour for hoursWorked <= 40
hours. If hoursWorked > 40 hours, then (hoursWorked -40) is paid at
an overtime premium rate of 1.5 * payRate. FICA (social security) tax is 6% and
Federal income tax is 14%. Union dues of $10/week are withheld. If there are 3 or more
covered dependents, $15 more is withheld for dependent health insurance.

a) Write a program that, on a weekly basis, accepts hours worked then outputs gross
pay, each withholding amount, and net (take-home) pay.
b) Add 'repeat at user discretion' feature.

14
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley
Another random document with
no related content on Scribd:
groups. To these four divisions we, however, add temporarily a fifth,
viz. Pupipara. This is included by Brauer in Schizophora, but it
appears to be really an unnatural complex, and had better be kept
separate till it has been entirely reconsidered. These great sections
may be thus summarised:—

Series 1. Orthorrhapha Nemocera.—Antennae with more than 6


segments, not terminated by an arista; with the segments of the
flagellum more or less similar to one another. Palpi slender and
flexible, four- or five-jointed.[364]

Series 2. Orthorrhapha Brachycera.—Antennae variable, but


never truly Nemocerous nor like those of Cyclorrhapha; when an
arista is present it is usually placed terminally, not superiorly;
when an arista is not present the flagellum terminates as an
appendage consisting of a variable number of indistinctly
separated segments; thus the flagellum is not composed of
similar joints; [rarely are the antennae as many as seven-
jointed]. Palpi only one- or two-jointed.[365] Around the insertion
of the antennae there is no definite arched suture enclosing a
small depressed space. The nervuration of the wings is usually
more complex than in any of the other divisions.

Series 3. Cyclorrhapha Aschiza.—Antennae composed of not


more than three joints and an arista; the latter is not terminal.
Front of head without definite arched suture over the antennae,
but frequently with a minute area of different colour or texture
there. This group consists of the great family Syrphidae, and of
four small families, viz. Conopidae, Pipunculidae, Phoridae, and
Platypezidae. The section is supposed to be justified by its being
Cyclorrhaphous in pupation, and by the members not
possessing a ptilinum (or having no trace of one when quite
mature). The Syrphidae are doubtless a natural group, but the
association with them of the other families mentioned is a mere
temporary device. The greatest difficulty is experienced in
deciding on a position for Phoridae, as to which scarcely any two
authorities are agreed.

Series 4. Cyclorrhapha Schizophora, or Eumyiid flies. The


antennae consist of three joints and an arista. In the Calyptratae
the frontal suture, or fold over the antennae, is well marked and
extends downwards along each side of the face, leaving a
distinct lunule over the antennae. In the Acalyptrate Muscids the
form of the head and of the antennae vary much and are less
characteristic, but the wings differ from those of Brachycera by
their much less complex nervuration.

Series 5. Pupipara. These are flies of abnormal habits, and only


found in connection with living Vertebrates, of which they suck
the blood (one species, Braula caeca, lives on bees). Many are
wingless, or have wings reduced in size. The young are
produced alive, full grown, but having still to undergo a
metamorphosis. This group consists of a small number of flies of
which some are amongst the most aberrant known. This is
specially the case with the Nycteribiidae. This Section will
probably be greatly modified, as it is far from being a natural
assemblage.[366]

The Sub-Order Aphaniptera, or Fleas, considered a distinct


Order by many entomologists, may for the present be placed as
a part of Diptera.

It must be admitted that these sections are far from satisfactory.


Brauer divides them into Tribes, based on the nature of the larvae,
but these tribes are even more unsatisfactory than the sections,
hosts of species being entirely unknown in the larval state, and many
of those that are known having been very inadequately studied. We
must admit that the classification of Diptera has at present advanced
but little beyond the stage of arranging them in natural families
capable of exact definition. We may, however, draw attention to the
attempt that is being made by Osten Sacken to remodel the
classification of the Nemocera and Brachycera by the combination of
families into super-families.[367] He proposes to divide the Nemocera
into two super-families: 1. Nemocera Vera, including all the families
from Cecidomyiidae to Tipulidae; 2. Nemocera Anomala, consisting
of the small families Bibionidae, Simuliidae, Blepharoceridae,
Rhyphidae and Orphnephilidae.

For Orthorrhapha Brachycera he adopts the following arrangement:


1. Super-family Eremochaeta, for Stratiomyidae, Tabanidae,
Acanthomeridae and Leptidae; 2. Tromoptera, for Nemestrinidae,
Acroceridae, Bombyliidae, Therevidae, and Scenopinidae; 3.
Energopoda, for Asilidae, Dolichopidae, Empidae and
Lonchopteridae, Phoridae being included with doubt; 4. Mydaidae
remains isolated.

This classification is based on the relations of the eyes and bristles


of the upper surface, and on the powers of locomotion, aërial or
terrestrial. At present it is not sufficiently precise to be of use to any
but the very advanced student.

Blood-sucking Diptera.—The habit of blood-sucking from


Vertebrates is, among Insects, of course confined to those with
suctorial mouth, and is exhibited by various Diptera. It is, however,
indulged in by but a small number of species, and these do not
belong to any special division of the Order. It is remarkable that as a
rule the habit is confined to the female sex, and that a large
proportion of the species have aquatic larvae. This subject has many
points of interest, but does not appear to have yet received the
attention it merits. We give below a brief summary of the facts as to
blood-sucking Diptera.

Series I. Nemocera.—In this section the habit occurs in no less than five
families, viz.:
Blepharoceridae. Curupira; in the female only; larva aquatic.
Culicidae. Culex, Mosquitoes; in the female only; other genera, with one or
two exceptions, do not suck blood; larvae aquatic.
Chironomidae. Ceratopogon, Midge; in the female only; exceptional even
in the genus, though the habit is said to exist in one or two less
known, allied genera; larval habits not certain; often aquatic; in C.
bipunctatus the larva lives under moist bark.
Psychodidae. Phlebotomus: in the female only (?); quite exceptional in the
family; larva aquatic or in liquid filth.
Simuliidae. Simulium, sand-flies; general in the family (?), which, however,
is a very small one; larva aquatic, food probably mixed vegetable and
animal microscopic organisms.
Series II. Brachycera. Tabanidae. Gad-flies: apparently general in the
females of this family; the habits of the exotic forms but little known; in
the larval state, scarcely at all known; some are aquatic.
Series IV. Cyclorrhapha Schizophora: Stomoxys, Haematobia; both sexes
(?); larvae in dung. [The Tse-tse flies, Glossina, are placed in this family,
though their mode of parturition is that of the next section].
Series V. Pupipara. The habit of blood-sucking is probably common to all the
group and to both sexes. The flies, with one exception, frequent
Vertebrates; in many cases living entirely on their bodies, and
apparently imbibing much blood; the larvae are nourished inside the
flies, not on the imbibed blood, but on a milky secretion from the mother.
Sub-Order Aphaniptera. Fleas. The habit of blood-sucking is common to all
the members and to both sexes. The larvae live on dried animal matter.

Fossil Diptera.—A considerable variety of forms have been found in


amber, and many in the tertiary beds; very few members of the
Cyclorrhaphous Sections are, however, among them; the Tipulidae,
on the other hand, are richly represented. In the Mesozoic epoch the
Order is found as early as the Lias, the forms being exclusively
Orthorrhaphous, both Nemocera and Brachycera being represented.
All are referred to existing families. Nothing has been found tending
to connect the Diptera with other Orders. No Palaeozoic Diptera are
known.

Series 1. Orthorrhapha Nemocera


Fam. 1. Cecidomyiidae.—An extensive family of very minute and
fragile flies, the wings of which have very few nervures; the antennae
are rather long, and are furnished with whorls of hair. In the case of
some species the antennae are beautiful objects; in Xylodiplosis
some of the hairs have no free extremities, but form loops (Fig. 220).
In the males of certain species the joints appear to be double, each
one consisting of a neck and a body. Although comparatively little is
known as to the flies themselves, yet these Insects are of importance
on account of their preparatory stages. The larvae have very diverse
habits; the majority live in plants and form galls, or produce
deformations of the leaves, flowers, stems, buds, or roots in a great
variety of ways; others live under bark or in animal matter; some are
predaceous, killing Aphidae or Acari, and even other Cecidomyiids.

Fig. 219—Cecidomyia (Diplosis) buxi. Britain. A, Larva, magnified; B,


pupa; C, imago; D, portion of antenna. (After Laboulbène.)

Fig. 220—One segment of antenna of Xylodiplosis sp.; a, Tip of one


segment; b, base of another. (After Janet.)
The North American Diplosis resinicola lives in the resin exuded as
the results of the attacks of a caterpillar. The larva burrows in the
semi-liquid resin, and, according to Osten Sacken,[368] is probably
amphipneustic. Cecidomyiid larvae are short maggots, narrowed at
the two ends, with a very small head, and between this and the first
thoracic segment (this bears a stigma), a small supplementary
segment; the total number of segments is thirteen, besides the head;
there are eight pairs of stigmata on the posterior part of the body.
Brauer defines the Cecidomyiid larva thus, "peripneustic, with nine
pairs of stigmata, the first on the second segment behind the head;
two to nine on fifth to twelfth segments; body as a whole fourteen-
segmented without a fully-formed head." The most remarkable
peculiarity of Cecidomyiid larvae is that those of many species
possess a peculiar organ—called breast-bone, sternal spatula, or
anchor-process—projecting from the back of the lower face of the
prothoracic segment. The use of so peculiar a structure has been
much discussed. According to Giard,[369] in addition to the part that
protrudes externally, as shown in Fig. 219, A, there is a longer
portion concealed, forming a sort of handle, having muscles attached
to it. Some of these larvae have the power of executing leaps, and
he states that such larvae are provided on the terminal segment with
a pair of corneous papillae; bending itself almost into a circle, the
larva hooks together the breast-bone and the papillae, and when this
connection is broken the spring occurs. This faculty is only
possessed by a few species, and it is probable that in other cases
the spatula is used as a means for changing the position or as a
perforator. Some of the larvae possess false feet on certain of the
segments. Williston says they probably do not moult. In the pupal
instar (Fig. 219, B), the Cecidomyiid greatly resembles a minute
Lepidopterous pupa. The Hessian fly, Cecidomyia destructor, is
frequently extremely injurious to crops of cereals, and in some parts
of the world commits serious depredation. The larva is lodged at the
point where a leaf enwraps the stem; it produces a weakness of the
stem, which consequently bends. This Insect and C. tritici (the larva
of which attacks the flowers of wheat) pupate in a very curious
manner: they form little compact cases like flax-seeds; these have
been supposed to be a form of pupa similar to what occurs in the
Blow-fly; but there are important distinctions. The larva, when about
to undergo its change, exudes a substance from its skin, and this
makes the flax-seed; the larval skin itself does not form part of this
curious kind of cocoon, for it may be found, as well as the pupa, in
the interior of the "flax-seed." Other Cecidomyiids form cocoons of a
more ordinary kind; one species, described by Perris as living on
Pinus maritima, has the very remarkable faculty of surrounding itself,
by some means, with a cocoon of resin. Walsh describes the
cocoon-forming process of certain Cecidomyiids as one of exudation
and inflation; Williston as somewhat of the nature of crystallisation.
Some Cecidomyiids are said to possess, in common with certain
other Diptera, the unusual number of five Malpighian tubes; and
Giard says that in the larva there is only a pair of these tubes, and
that their extremities are united so as to form a single tube, which is
twisted into an elegant double loop.

Thirty years or more ago the Russian naturalist, Wagner, made the
very remarkable discovery that the larva of a Cecidomyiid produces
young; and it has since been found by Meinert and others that this
kind of paedogenesis occurs in several species of the genera
Miastor and Oligarces. The details are briefly as follows:—A female
fly lays a few, very large, eggs, out of each of which comes a larva,
that does not go on to the perfect state, but produces in its interior
young larvae that, after consuming the interior of the body of the
parent larva, escape by making a hole in the skin, and thereafter
subsist externally in a natural manner. This larval reproduction may
be continued for several generations, through autumn, winter, and
spring till the following summer, when a generation of the larvae
goes on to pupation and the mature, sexually perfect fly appears.
Much discussion has taken place as to the mode of origination of the
larvae; Carus and others thought they were produced from the
rudimental, or immature ovaries of the parent larva. Meinert, who
has made a special study of the subject,[370] finds, however, that this
is not the case; in the reproducing larva of the autumn there is no
ovary at all; in the reproducing larvae of the spring-time rudimentary
ovaries or testes, as the case may be, exist; the young are not,
however, produced from these, but from germs in close connection
with the fat-body. In the larvae that go on to metamorphosis the
ovaries continue their natural development. It would thus appear that
the fat-body has, like the leaf of a Begonia, under certain
circumstances, the power, usually limited to the ovaries, of producing
complete and perfect individuals.

Owing to the minute size and excessive fragility of the Gall-midge


flies it is extremely difficult to form a collection of them; and as the
larvae are also very difficult of preservation, nearly every species
must have its life-history worked out as a special study before the
name of the species can be ascertained. Notwithstanding the
arduous nature of the subject it is, however, a favourite one with
entomologists. The number of described and named forms cannot
be very far short of 1000, and each year sees some 20 or 30 species
added to the list. The number of undescribed forms is doubtless very
large. The literature of the subject is extensive and of the most
scattered and fragmentary character.

The Cecidomyiidae have but little relation to other Nemocera, and


are sometimes called Oligoneura, on account of the reduced number
of wing-nervures. Their larvae are of a peculiar type that does not
agree with the larvae of the allied families having well-marked heads
(and therefore called Eucephala), nor with the acephalous maggots
of Eumyiidae.

Fam. 2. Mycetophilidae.—These small flies are much less delicate


creatures than the Cecidomyiidae, and have more nervures in the
wings; they possess ocelli, and frequently have the coxae elongated,
and in some cases the legs adorned with complex arrangements of
spines: their antennae have not whorls of hair. Although very much
neglected there are probably between 700 and 1000 species known;
owing to many of their larvae living in fungoid matter the flies are
called Fungus-gnats. We have more than 100 species in Britain.
Epidapus is remarkable, inasmuch as the female is entirely destitute
of wings and halteres, while the male has the halteres developed but
the wings of very reduced size. E. scabiei is an excessively minute
fly, smaller than a common flea, and its larva is said to be very
injurious to stored potatoes. The larvae of Mycetophilidae are usually
very elongate, worm-like maggots, but have a distinct, small head;
they are peripneustic, having, according to Osten Sacken, nine pairs
of spiracles, one pair prothoracic, the others on the first eight
abdominal segments. They are usually worm-like, and sometimes
seem to consist of twenty segments. Some of them have the faculty
of constructing a true cocoon by some sort of spinning process, and
a few make earthen cases for the purpose of pupation. The pupae
themselves are free, the larval skin having been shed. The
Mycetophilidae are by no means completely fungivorous, for many
live in decaying vegetable, some even in animal, matter.

Fig. 221—Mycetobia pallipes. Britain. A, Larva; B, pupa; C, imago.


(After Dufour.)

The habits of many of the larvae are very peculiar, owing to their
spinning or exuding a mucus, that reminds one of snail-slime; they
are frequently gregarious, and some of them have likewise, as we
shall subsequently mention, migratory habits. Perris has described
the very curious manner in which Sciophila unimaculata forms its
slimy tracks;[371] it stretches its head to one side, fixes the tip of a
drop of the viscous matter from its mouth to the surface of the
substance over which it is to progress, bends its head under itself so
as to affix the matter to the lower face of its own body; then stretches
its head to the other side and repeats the operation, thus forming a
track on which it glides, or perhaps, as the mucus completely
envelops its body, we should rather call it a tunnel through which the
maggot slips along. According to the description of Hudson[372] the
so-called New Zealand Glow-worm is the larva of Boletophila
luminosa; it forms webs in dark ravines, along which it glides, giving
a considerable amount of light from the peculiarly formed terminal
segment of the body. This larva is figured as consisting of about
twenty segments. The pupa is provided with a very long, curiously-
branched dorsal structure: the fly issuing from the pupa is strongly
luminous, though no use can be discovered for the property either in
it or in the larva. The larva of the Australian Ceroplatus mastersi is
also luminous. Another very exceptional larva is that of Epicypta
scatophora; it is of short, thick form, like Cecidomyiid larvae, and has
a very remarkable structure of the dorsal parts of the body; by
means of this its excrement, which is of a peculiar nature, is spread
out and forms a case for enveloping and sheltering the larva.
Ultimately the larval case is converted into a cocoon for pupation.
This larva is so different from that of other Mycetophilidae, that Perris
was at first unable to believe that the fly he reared really came from
this unusually formed larva. The larva of Mycetobia pallipes (Fig.
221) offers a still more remarkable phenomenon, inasmuch as it is
amphipneustic instead of peripneustic (that is to say, it has a pair of
stigmata at the termination of the body and a pair on the first thoracic
segment instead of the lateral series of pairs we have described as
normal in Mycetophilidae). This larva lives in company with the
amphipneustic larva of Rhyphus, a fly of quite another family, and
the Mycetobia larva so closely resembles that of the Rhyphus, that it
is difficult to distinguish the two. This anomalous larva gives rise, like
the exceptional larva of Epicypta, to an ordinary Mycetophilid fly.[373]

But the most remarkable of all the Mycetophilid larvae are those of
certain species of Sciara, that migrate in columns, called by the
Germans, Heerwurm. The larva of Sciara militaris lives under layers
of decomposing leaves in forests, and under certain circumstances,
migrates, sometimes perhaps in search of a fresh supply of food,
though in some cases it is said this cannot be the reason. Millions of
the larvae accumulate and form themselves by the aid of their
viscous mucus into great strings or ribbons, and then glide along like
serpents: these aggregates are said to be sometimes forty to a
hundred feet long, five or six inches wide, and an inch in depth. It is
said that if the two ends of one of these processions be brought into
contact, they become joined, and the monstrous ring may writhe for
many hours before it can again disengage itself and assume a
columnar form. These processional maggots are met with in
Northern Europe and the United States, and there is now an
extensive literature about them.[374] Though they sometimes consist
of almost incredible numbers of individuals, yet it appears that in the
Carpathian mountains the assemblages are usually much smaller,
being from four to twenty inches long. A species of Sciara is the
"Yellow-fever fly" of the Southern United States. It appears that it has
several times appeared in unusual numbers and in unwonted
localities at the same time as the dreaded disease, with which it is
popularly supposed to have some connection.

Fam. 3. Blepharoceridae.[375]—Wings with no discal cell, but with a


secondary set of crease-like lines. The flies composing this small
family are very little known, and appear to be obscure Insects with
somewhat the appearance of Empidae, though with strongly
iridescent wings; they execute aerial dances, after the manner of
midges, and are found in Europe (the Pyrenees, Alps and Harz
mountains) as well as in North and South America. Their larvae are
amongst the most remarkable of Insect forms; indeed, no
entomologist recognises them as belonging to a Hexapod Insect
when he makes a first acquaintance with them. The larva of Curupira
(Fig. 222) lives in rapid streams in Brazil, fixed by its suckers to
stones or rocks. It consists only of six or seven divisions, with
projecting side-lobes; the usual segmentation not being visible.
There are small tracheal gills near the suckers, and peculiar scale-
like organs are placed about the edges of the lobes. Müller considers
that the first lobe is "cephalothorax," corresponding to head, thorax
and first abdominal segment of other larvae, the next four lobes he
considers to correspond each to an abdominal segment, and the
terminal mass to four segments. He also says that certain minute
points existing on the surface, connected with the tracheal system by
minute strings, represent nine pairs of spiracles. These larvae and
their pupae can apparently live only a short time after being taken
out of the highly aërated water in which they exist, but Müller
succeeded in rearing several flies from a number of larvae and
pupae that he collected, and, believing them to be all one species,
he announced that the females exhibited a highly developed
dimorphism, some of them being blood-suckers, others honey-
suckers. It is however, more probable that these specimens
belonged to two or three distinct species or even genera. This point
remains to be cleared up. The larva we have figured is called by
Müller Paltostoma torrentium. It is certain, however, that the Brazilian
Insect does not belong to the genus Paltostoma, and it will no doubt
bear the name used by Osten Sacken, viz. Curupira.

Fig. 222—Under surface of the larva of Curupira (Paltostoma)


torrentium, showing the suckers along the middle of the body,
much magnified. Brazil. (After Fritz Müller.)

The metamorphoses of the European Liponeura brevirostris have


been partially examined by Dewitz, who found the Insects in the
valley of the Ocker in September.[376] He does not consider the
"cephalothorax" to include an abdominal segment; and he found that
two little, horn-like projections from the thorax of the pupa are really
each four-leaved. The pupa is formed within the larval skin, but the
latter is subsequently cast so that the pupa is exposed; its dorsal
region is horny, but the under surface, by which it clings firmly to the
stones of the rapid brook, is white and scarcely chitinised, and
Dewitz considers that the chitinous exudation from this part is used
as a means of fastening the pupa to the stones. Blepharoceridae
possess, in common with Culex, Psychoda and Ptychoptera, the
peculiar number of five Malpighian tubes, and it has been proposed
by Müller to form these Insects into a group called Pentanephria.
Fam. 4. Culicidae (Mosquitoes, Gnats).—Antennae with whorls of
hair or plumes, which may be very dense and long in the male,
though scanty in the female; head with a long, projecting proboscis.
Although there are few Insects more often referred to in general
literature than Mosquitoes, yet the ideas in vogue about them are of
the vaguest character. The following are the chief points to be borne
in mind as to the prevalence of Mosquitoes:—The gently humming
Gnat that settles on us in our apartments, and then bites us, is a
Mosquito; there are a large number of species of Mosquitoes; in
some countries many in one locality; in Britain we have ten or a
dozen; notwithstanding the multiplicity of species, certain Mosquitoes
are very widely diffused; the larvae are all aquatic, and specially
frequent stagnant or quiet pools; they are probably diffused by
means of the water in ships, it being known that Mosquitoes were
introduced for the first time to the Hawaiian Islands by a sailing
vessel about the year 1828. Hence it is impossible to say what
species the Mosquitoes of a given locality may be without a critical
examination. No satisfactory work on the Mosquitoes of the world
exists. Urich states that he is acquainted with at least ten species in
Trinidad. The species common in our apartments in Central and
Southern England is Culex pipiens, Linn., and this species is very
widely distributed, being indeed one of the troublesome Mosquitoes
of East India. The term Mosquito is a Spanish or Portuguese
diminutive of Mosca. It is applied to a variety of small flies of other
families than Culicidae, but should be restricted to these latter. The
irritation occasioned by the bites of Mosquitoes varies according to
several circumstances, viz. the condition of the biter, the condition or
constitution of the bitten, and also the species of Mosquito. Réaumur
and others believed that some irritating fluid is injected by the
Mosquito when it bites. But why should it want to irritate as well as to
bite? Macloskie, considering that the Mosquito is really a feeder on
plant-substances, suggests that the fluid injected may be for the
purpose of preventing coagulation of the plant-juices during the
process of suction. It is a rule that only the female Mosquito bites,
the male being an inoffensive creature, and provided with less
effectual mouth-organs; it has, however, been stated by various
authors that male Mosquitoes do occasionally bite. It is difficult to
understand the blood-sucking propensities of these Insects; we have
already stated that it is only the females that suck blood. There is
reason to suppose that it is an acquired habit; and it would appear
that the food so obtained is not essential to their existence. It has
indeed been asserted that the act is frequently attended with fatal
consequences to the individual that does it. The proper method of
mitigating their nuisance is to examine the stagnant waters in
localities where they occur, and deal with them so as to destroy the
larvae. These little creatures are remarkable from the heads and
thorax being larger and more distinct than in other Dipterous larvae.
Their metamorphoses have been frequently described, and recently
the numerous interesting points connected with their life-histories
have been admirably portrayed by Professor Miall,[377] in an
accessible form, so that it is unnecessary for us to deal with them.
Corethra is placed in Culicidae, but the larva differs totally from that
of Culex; it is predaceous in habits, is very transparent, has only an
imperfect tracheal system, without spiracles, and has two pairs of
air-sacs (perhaps we should rather say pigmented structures
possibly for aerostatic purposes, but not suppliers of oxygen). The
kungu cake mentioned by Livingstone as used on Lake Nyassa is
made from an Insect which occurs in profusion there, and is
compressed into biscuit form. It is believed to be a Corethra. One of
the peculiarities of this family is the prevalence of scales on various
parts of the body, and even on the wings: the scales are essentially
similar to those of Lepidoptera. Though Mosquitoes are generally
obscure plain Insects, there are some—in the South American genus
Megarrhina—that are elegant, beautifully adorned creatures.
Swarms of various species of Culicidae, consisting sometimes of
almost incalculable numbers of individuals, occur in various parts of
the world; one in New Zealand is recorded as having been three-
quarters of a mile long, twenty feet high, and eighteen inches thick.
There is good reason for supposing that Mosquitoes may act as
disseminators of disease, but there is no certain evidence on the
subject. The minute Filaria that occurs in great numbers in some
patients, is found in the human body only in the embryonic and adult
conditions. Manson considers that the intermediate stages are
passed in the bodies of certain Mosquitoes.[378]
Fam. 5. Chironomidae (Gnats, Midges).—Small or minute flies of
slender form, with narrow wings, without projecting rostrum, usually
with densely feathered antennae in the male, and long slender legs.
The flies of this family bear a great general resemblance to the
Culicidae. They are much more numerous in species, and it is not
improbable that we have in this country 200 species of the genus
Chironomus alone. They occur in enormous numbers, and frequently
form dancing swarms in the neighbourhood of the waters they live in.
The species are frequently extremely similar to one another, though
distinguished by good characters; they are numerous about
Cambridge. Many of them have the habit of using the front legs as
feelers rather than as means of support or locomotion. This is the
opposite of what occurs in Culicidae, where many of the species
have a habit of holding up the hind legs as if they were feelers. The
eggs of Chironomus are deposited as strings surrounded by mucus,
and are many of them so transparent that the development of the
embryo can be directly observed with the aid of the microscope.
They are said to possess a pair of air-sacs. The larvae, when born,
are aquatic in habits, and are destitute of tracheal system. They
subsequently differ greatly from the larvae of Culex, inasmuch as the
tracheal system that develops is quite closed, and in some cases
remains rudimentary. There is, however, much diversity in the larvae
and also in the pupae. The little Blood-worms, very common in many
stagnant and dirty waters, and used by anglers as bait, are larvae of
Chironomus. They are said to be αἱ Ἐμπίδες of Aristotle. The red
colour of these larvae is due to haemoglobin, a substance which has
the power of attracting and storing oxygen, and giving it off to the
tissues as they require it. Such larvae are able to live in burrows they
construct amongst the mud. Some of them, provided plentifully with
haemoglobin, are in consequence able to live at great depths, it is
said even at 1000 feet in Lake Superior, and come to the surface
only occasionally. A few are able even to tolerate salt water, and
have been fished up from considerable depths in the sea. It is a
remarkable fact that these physiological capacities differ greatly
within the limits of the one genus, Chironomus, for some of these
species are destitute of haemoglobin, and have to live near the
surface of the water; these have a superior development of the
tracheal system. The pupae of Chironomus have the legs coiled, and
the thorax, instead of being provided with the pair of tubes or
trumpets for breathing that is so common in this division of Diptera,
have a pair of large tufts of hair-like filaments.[379] A very curious
form of parthenogenesis has been described by Grimm[380] as
existing in an undetermined species of Chironomus, inasmuch as the
pupa deposits eggs. Although this form of parthenogenesis is of
much interest, it is not in any way to be compared with the case,
already referred to, of Miastor (p. 461). The "pupa" is at the time of
oviposition practically the imago still covered by the pupal
integument; indeed Grimm informs us that in some cases, after
depositing a small number of ova, the pupa became an imago. This
parthenogenesis only occurs in the spring-generation; in the autumn
the development goes on in the natural manner. The case is scarcely
entitled to be considered as one of paedogenesis.

Gnats of this family, and believed to be a variety of Chironomus


plumosus, are subject to a curious condition, inasmuch as
individuals sometimes become luminous or "phosphorescent"; this
has been noticed more specially in Eastern Europe and Western
Asia. The whole of the body and legs may exhibit the luminous
condition, but not the wings. It has been suggested by Schmidt that
this condition is a disease due to bacteria in the body of the gnat.
[381]

Ceratopogon is a very extensive genus, and is to some extent


anomalous as a member of Chironomidae. The larvae exhibit
considerable variety of form. Some of them are aquatic in habits, but
the great majority are terrestrial, frequenting trees, etc. The former
larvae are very slender, and move after the manner of leeches; they
give rise to imagos with naked wings, while the terrestrial larvae
produce flies with hairy wings. There are also important distinctions
in the pupae of the two kinds; the correlation between the habits, and
the distinctions above referred to, is, however, far from being
absolutely constant.[382] Certain species of midges are in this
country amongst the most annoying of Insects; being of very minute
size, scarcely visible, they settle on the exposed parts of the body in
great numbers, and by sucking blood create an intolerable irritation.
Ceratopogon varius is one of the most persistent of these annoyers
in Scotland, where this form of pest is much worse than it is in
England; in Cambridgeshire, according to Mr. G. H. Verrall, the two
troublesome midges are the females of C. pulicaris and C.
bipunctatus.

Fam. 6. Orphnephilidae.—Small, brown or yellowish flies, bare of


pubescence, with very large eyes contiguous in both sexes, and with
antennae composed of two joints and a terminal bristle; both the
second joint and the bristle are, however, really complex. One of the
smallest and least known of the families of Diptera, and said to be
one of the most difficult to classify. The nervures of the wings are
very distinct. Nothing is known of the habits and metamorphoses;
there is only one genus—Orphnephila; it is widely distributed; we
have one species in Britain.

Fam. 7. Psychodidae (Moth-flies).—Extremely small, helpless flies,


usually with thickish antennae, bearing much hair, with wings
broader than is usual in small flies, and also densely clothed with
hair, giving rise to a pattern more or less vague. These flies are very
fragile creatures, and are probably numerous in species. In Britain
forty or fifty species have been recognised.[383] A South European
form is a blood-sucker, and has received the appropriate name of
Phlebotomus. The life-history of Pericoma canescens has recently
been studied by Professor Miall.[384] The larva is of aquatic habits,
but is amphibious, being capable of existing in the air; it has a pair of
anterior spiracles, by means of which it breathes in the air, and a pair
at the posterior extremity of the body, surrounded by four ciliated
processes, with which it forms a sort of cup for holding air when it is
in the water. The favourite position is amongst the filaments of green
algae on which it feeds. A much more extraordinary form of larva
from South America, doubtless belonging to this family, has recently
been portrayed by Fritz Müller, under the name of Maruina.[385]
These larvae live in rapid waters in company with those of the genus
Curupira, and like the latter are provided with a series of suctorial
ventral discs. Fritz Müller's larvae belong to several species, and
probably to more than one genus, and the respiratory apparatus at
the extremity of the body exhibits considerable diversity among
them.

Fam. 8. Dixidae.—The genus Dixa must, it appears, form a distinct


family allying the Culicid series of families to the Tipulidae. The
species are small, gnat-like Insects, fond of damp places in forests.
We have four British species (D. maculata, D. nebulosa, D.
aestivalis, D. aprilina). The genus is very widely distributed,
occurring even in Australia. The larvae are aquatic, and have been
described by Réaumur, Miall, and Meinert. The pupa has the legs
coiled as in the Culicidae.

Fam. 9. Tipulidae (Daddy-long-legs, or Crane-flies).—Slender


Insects with elongate legs, a system of wing-nervures, rather
complex, especially at the tip; an angulate, or open V-shaped, suture
on the dorsum of the thorax in front of the wings: the female with the
body terminated by a pair of hard, pointed processes, concealing
some other processes, and forming an ovipositor. The curious, silly
Insects called daddy-long-legs are known all over the world, the
family being a very large one, and found everywhere, some of its
members extending their range even to the most inclement climates.
It includes a great variety of forms that would not be recognised by
the uninitiated, but can be readily distinguished by the characters
mentioned above. It is impossible to assign any reason of utility for
the extreme elongation of the legs of these Insects; as everyone
knows, they break off with great ease, and the Insect appears to get
on perfectly well without them. It is frequently the case that they are
much longer in the males than in the females. Other parts of the
body exhibit a peculiar elongation; in some forms of the male the
front of the head may be prolonged into a rostrum. In a few species
the head is separated by a great distance from the thorax, the gap
being filled by elongate, hard, cervical sclerites; indeed it is in these
Insects that the phenomenon, so rare in Insect-structure, of the
elongation of these sclerites and their becoming a part of the actual
external skeleton, reaches its maximum. In several species of
Eriocera the male has the antennae of extraordinary length, four or
five times as long as the body, and, strange to say, this elongation is
accompanied by a reduction in the number of the segments of which
the organ is composed, the number being in the male about six, in
the female ten, in place of the usual fourteen or sixteen. In
Toxorrhina and Elephantomyia the proboscis is as long as the whole
body. In other forms the wings become elongated to an unusual
extent by means of a basal stalk. It is probable that the elongation of
the rostrum may be useful to the Insects. Gosse,[386] indeed,
describes Limnobia intermedia as having a rostrum half as long as
the body, and as hovering like a Syrphid, but this is a habit so foreign
to Tipulidae, that we may be pardoned for suspecting a mistake. The
larvae exhibit a great variety of form, some being terrestrial and
others aquatic, but the terrestrial forms seem all to delight in damp
situations, such as shaded turf or rotten tree-stems. They are either
amphipneustic or metapneustic, that is, with a pair of spiracles
placed at the posterior extremity of the body; the aquatic species
frequently bear appendages or projections near these spiracles. The
pupae in general structure are very like those of Lepidoptera, and
have the legs extended straight along the body; they possess a pair
of respiratory processes on the thorax in the form of horns or tubes.

There are more than 1000 species of these flies known, and many
genera. They form three sub-families, which are by some considered
distinct families, viz.: Ptychopterinae, Limnobiinae or Tipulidae
Brevipalpi, Tipulinae or Tipulidae Longipalpi.

The Ptychopterinae are a small group in which the angulate suture of


the mesonotum is indistinct; the larvae are aquatic and have the
head free, the terminal two segments of the body enormously
prolonged (Fig. 223), forming a long tail bearing, in the North
American Bittacomorpha, two respiratory filaments. Hart[387]
describes this tail as possessing a stigmatal opening at the
extremity; no doubt the structure is a compounded pair of spiracles.
The pupa (Fig. 223, B) has quite lost the respiratory tube at the
posterior extremity of the body, but has instead quite as long a one
at the anterior extremity, due to one tube of the pair normal in
Tipulidae being enormously developed, while its fellow remains
small. This is a most curious departure from the bilateral symmetry
that is so constantly exhibited in Insect-structure. Our British species
of Ptychoptera have the pupal respiratory tube as extraordinary as it
is in Bittacomorpha, though the larval tail is less peculiar.[388] This
group should perhaps be distinguished from the Tipulidae as a
separate family, but taxonomists are not yet unanimous as to this.
Brauer considers that the head of the larva, and the condition of five
Malpighian tubules in the imago, require the association of
Ptychopterinae with the preceding families (Chironomidae, etc.),
rather than with the Tipulidae.

Fig. 223.—Bittacomorpha clavipes. North America x 2⁄1. (After Hart.) A,


Larva; B, pupa: l, the left, r, the right respiratory tube.

The great majority of the Tipulidae are comprised in the sub-family


Limnobiinae—the Tipulidae Brevipalpi of Osten Sacken:[389] in them
the last joint of the palpi is shorter or not much longer than the two
preceding together. They exhibit great variety, and many of them are
types of fragility. The common winter gnats of the genus Trichocera

You might also like