Question: using namespace std; / * NumberList::NumberList ( ) { } NumberList::NumberList ( int l , double n ) { } NumberList::NumberList ( int l ,
using namespace std;
NumberList::NumberList
NumberList::NumberListint l double n
NumberList::NumberListint l const double a
NumberList::NumberListconst NumberList & nl
void NumberList::print
int NumberList::getLength
double NumberList::sum
double NumberList::ave
double NumberList::max
double NumberList::min
bool NumberList::isIndouble n
bool NumberList::pushdouble value
bool NumberList::pop
void NumberList::readistream & inStream
if&inStream &cin
else
file structure: first line contains the number of numbers in the list
remaining lines contain the numbers each separated by a whitespace
bool NumberList::insertdouble number, int position
SELECTION SORT algorithm
void NumberList::sortchar type
bool NumberList::operatorconst NumberList& rhs
NumberList& NumberList::operatorconst NumberList& rhs
avoid selfassignment, only do assignment if RHS is a different object from this
ifthis &rhs
return this;
NumberList& NumberList::operatorconst double& number
iflength
cout "Unable to perform list is filled to capacity
;
else
return this;
NumberList& NumberList::operatorconst NumberList& rhs
iflength
cout "Unable to perform list is filled to capacity
;
else iflength rhslength
cout "Unable to perform list would be over capacity
;
else
return this;
FOR EXTRA CREDIT ON THIS PROJECT GRADE, OVERLOAD THE FOLLOWING OPERATORS
AS NONMEMBER FUNCTIONS
ostream& operatorostream& out, const NumberList& nl
const NumberList operatorNumberList& lhs const double& number
const NumberList operatorNumberList& lhs const NumberList& rhs
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
