Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

using namespace std; / * NumberList::NumberList ( ) { } NumberList::NumberList ( int l , double n ) { } NumberList::NumberList ( int l ,

using namespace std;
/*
NumberList::NumberList()
{
}
NumberList::NumberList(int l, double n)
{
}
NumberList::NumberList(int l, const double a[])
{
}
NumberList::NumberList(const NumberList & nl)
{
}
void NumberList::print()
{
}
int NumberList::getLength()
{
}
double NumberList::sum()
{
}
double NumberList::ave()
{
}
double NumberList::max()
{
}
double NumberList::min()
{
}
bool NumberList::isIn(double n)
{
}
bool NumberList::push(double value)
{
}
bool NumberList::pop()
{
}
void NumberList::read(istream & 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::insert(double number, int position)
{
}
//SELECTION SORT algorithm
void NumberList::sort(char type)
{
}
bool NumberList::operator==(const NumberList& rhs)
{
}
NumberList& NumberList::operator=(const NumberList& rhs)
{
//avoid self-assignment, only do assignment if RHS is a different object from this
if(this != &rhs)
{
}
return *this;
}
NumberList& NumberList::operator+=(const double& number)
{
if(length ==100)
cout << "Unable to perform +=, list is filled to capacity
";
else
{
}
return *this;
}
NumberList& NumberList::operator+=(const NumberList& rhs)
{
if(length ==100)
cout << "Unable to perform +=, list is filled to capacity
";
else if(length + rhs.length >100)
cout << "Unable to perform +=, list would be over capacity
";
else
{
}
return *this;
}
//**************************************
//FOR 10% EXTRA CREDIT ON THIS PROJECT GRADE, OVERLOAD THE FOLLOWING OPERATORS
//AS NON-MEMBER FUNCTIONS
ostream& operator<<(ostream& out, const NumberList& nl)
{
}
const NumberList operator+(NumberList& lhs, const double& number)
{
}
const NumberList operator+(NumberList& lhs, const NumberList& rhs)
{
}
*/
Create a testNL.cpp with invoice.txt of
6
123456
#include "NumberList.h" #include #include using namespace std; int main() { }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions