This commit is contained in:
Rebecca Schofield 2015-09-15 22:23:41 -05:00
parent 773544da13
commit d69186dc44
3 changed files with 4 additions and 12 deletions

View file

@ -42,12 +42,6 @@ public:
}
}
void Attribute(string n, vector<string> a){
name = n;
values = a;
}
void erase(int position)
{
values.erase(values.begin()+ position);

View file

@ -22,7 +22,7 @@ public:
for(int i = 0; i < att.size(); i++) {
//Loop through the elements in the i'th column
for(int j = 0; j < att[i].values.size(); j++){
for(int j = 0; j < att[i].getValues().size(); j++){
//In this column, at this element's spot, assign an element from the tuple vector to this spot
att[i].addRow(tuple[i]);
@ -47,8 +47,6 @@ public:
}
}
int getSize() { return size; }
string getTableName() {
return name;
}
@ -68,7 +66,7 @@ public:
cout << "Column Title: " << input << endl;
for(int j = 0; j < att[i].getSize(); j++) {
cout << att[i].values[j] << endl;
cout << att[i].getValues()[j] << endl;
}
break;
@ -81,10 +79,10 @@ public:
void display() {
cout<<"\n\nDisplay of relation--------------------------------"<<endl;
cout<<"Relation name: "<<name<<endl;
for (int i = 0; i < attributeNames.size(); ++i)
for (int i = 0; i < size; ++i)
{
cout<<"\nAttribute name: "<<attributeNames[i]<<": ";
cout<<"\nAttribute name: "<<att[i].getName()<<": ";
att[i].display();

BIN
a.out

Binary file not shown.