* This are the 3 c++ files that have to be implemented, two files are cpp and on
ID: 3728698 • Letter: #
Question
* This are the 3 c++ files that have to be implemented, two files are cpp and one header file/
--------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------
Finish the Implementation of the Sequence class. by running the following set of commands: 1.Create sequence called seq; 2.Insert numbers 5, 2, 200, -3.0, 45, -55.5 3.Print out sequence 4.Remove the -3.0 5.Print out sequenceExplanation / Answer
Replacing "// your code goes here" with the updated code :
sequence::value_type sequence::current() const
{
value_type current_item;
// return element at index current_index
current_item = data[current_index];
return current_item;
}
bool sequence::is_item() const
{
bool isAnItem = false;
// check if there is any element in the sequence or not
if(used > 0)
isAnItem = true;
return isAnItem;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.