// studentc.h -- defining a Student class using containment
#ifndef _STUDNTC_H_
#define _STUDENTC_H_

#include <iostream>
using namespace std;
#include "arraydb.h"
#include "strng2.h"    // from Chapter 11

class Student
{
private:
    String name;
    ArrayDb scores;
public:
    Student() : name("Null Student"), scores() {}
    Student(const String & s)
        : name(s), scores() {}
    Student(int n) : name("Nully"), scores(n) {}
    Student(const String & s, int n)
        : name(s), scores(n) {}
    Student(const String & s, const ArrayDb & a)
        : name(s), scores(a) {}
    Student(const char * str, const double * pd, int n)
        : name(str), scores(pd, n) {}
    ~Student() {}
    double & operator[](int i);
    const double & operator[](int i) const;
    double Average() const;

// friends
    friend ostream & operator<<(ostream & os, const Student & stu);
    friend istream & operator>>(istream & is, Student & stu);
};

#endif

