your task is to implement a simple container of integer numbers. you are given some template code in the container class within the container.py file. you should implement any empty methods of this class, which correspond to the operations described below.

Respuesta :

Using the knowledge of computational language in python it is possible to write a code that given some template code in the container class within the container.py file.

Writting the code:

#include "container.h"

int main()

{

// instantiate int_array object of class array<int> with capacity 5

Container< int > int_array(5);

// set integer elements to values array

// call to Container class member function

int_array.insert(3);

int_array.insert(85);

int_array.insert(19);

int_array.insert(23);

int_array.insert(72);

int_array.insert(5);

int_array.search(5);

int_array.Remove(23);

int_array.print();

cout << "\n-----------------------------\n" << endl;

// instantiate double_array object of class Container<double> with capacity 3

Container< double > double_array(3);

// set float elements to values array

// call to Container class member function

double_array.insert(3.4);

double_array.insert(2.8);

double_array.insert(12.9);

double_array.search(10);

double_array.Remove(3.4);

double_array.print();

cout << "\n-----------------------------\n" << endl;

// instantiate float_array object of class Container<float> with capacity 5

Container< float > float_array(5);

// set float elements to values array

// call to Container class member function

float_array.insert(5.2);

float_array.insert(6.3);

float_array.insert(2.6);

float_array.insert(19.63);

float_array.insert(28.96);

float_array.search(5.2);

float_array.Remove(255.32);

float_array.Remove(2.6);

float_array.print();

cout << "\n-----------------------------\n" << endl;

return 0;

}

See more about python at brainly.com/question/18502436

#SPJ1

Ver imagen lhmarianateixeira
ACCESS MORE