c++自定义类模板相关问题

编写一个类模板,保存一组序列数据(
该序列数据可以是int型、char型或者float型,
提示:数据成员是一个一维数组,类型是虚拟类型参数),
该类需要实现对序列数据输入、输出、求和、求平均、
统计序列个数、排序、插入或者删除指定的数据等功能。
在主函数中测试int、char和float型序列数据处理。

#include<iostream>
using namespace std;
#define N 5
//定义Temp类模板 
template <class numtype> 
class  Temp
{
    public:
        Temp(){}//构造函数
        ~Temp();//析构函数 
        putin();
        putout();
        friend  numtype sum(Temp &);
    private:
        numtype num;
}

//输入函数 
Temp::putin ()
{
    cin<<num;
} 

//输出函数
Temp::putout ()
{
    cout<<num<<" ";
} 

//排序函数

//统计序列函数
 
int main()
{
    Temp <int> a[N];
    int i,b,temp;
    //输入数值 
    for(i=0;i<N;i++)
    {
        a[i].putin();
    }
    //输出数据查看 
    for(i=0;i<N;i++)
    {
        a[i].putout();
    }
    
    //求总数 
    for(i=0;i<N;i++)
    {
        int sum=0;
        sum+=a[i];
    } 
    cout<<"输出总数:"<<sum<<endl; 
    
    //求平均值 
    for(i=0;i<N;i++)
    {
        temp+=a[i].num;
    } 
    cout<<"输出平均值:"<<temp/5<<endl;
    
    //删除指定节点函数
    cout<<"删除第";
    cin<<b;
    cout<<"个节点"<<endl;
    b=b-1;//第b个节点减一为对应的数组角标 
    for(i=0;i<N;i++)
    {
        if(i==b)
        {
            a[i]=a[i+1];
            b++;
        }
    }
    delete a[N-1];
    cout<<"输出数组查看如下:"<<endl; 
    for(i=0;i<N-1;i++)
    {
        a[i].putout();
    } 
    
    
    //增加节点函数
    
    
    return 0; 
}

问题:不知道如何实现统计序列个数、插入或者删除指定的数据等功能。
我还想知道在类中可不可以调用对象数组进行相加,在我的代码中我放在了主函数中实现。

谢谢各位帮忙解答一下。