// studenti.h -- defining a Student class using private inheritance
#ifndef _STUDNTI_H_
#define _STUDENTI_H_

#include <iostream>
using namespace std;
#include "arraydb.h"
#include "strng2.h"

class Student : private String, private ArrayDb
{
public:
    Student() : String("Null Student"), ArrayDb() {}
    Student(const String & s)
        : String(s), ArrayDb() {}
    Student(int n) : String("Nully"), ArrayDb(n) {}
    Student(const String & s, int n)
        : String(s), ArrayDb(n) {}
    Student(const String & s, const ArrayDb & a)
        : String(s), ArrayDb(a) {}
    Student(const char * str, const double * pd, int n)
        : String(str), ArrayDb(pd, n) {}
    ~Student() {}
 //   using ArrayDb::operator[];  // alternate approach
 
    double & operator[](int i);
    const double & operator[](int i) const;
//    using ArrayDb::Average; // alternative way of using Average()
    double Average() const;
// friends
    friend ostream & operator<<(ostream & os, const Student & stu);
    friend istream & operator>>(istream & is, Student & stu);
};

#endif

