-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBucket.h
42 lines (36 loc) · 856 Bytes
/
Bucket.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// Bucket.h
// 430_Assign1
//
// Created by Jonathan Korn on 1/28/14.
// Copyright (c) 2014 Jonathan Korn. All rights reserved.
//
#ifndef ___30_Assign1__Bucket__
#define ___30_Assign1__Bucket__
#define MAXSLOTS 3
#include "Slot.h"
#include <iostream>
using namespace std;
class Bucket
{
private:
Slot slots[3];
int overflow;
int count;
public:
Bucket();
Bucket(Slot slot1);
Bucket(Bucket& anotherBucket);
void set(STR10 key, STR20 data, short slotIndex);
void setKey(STR10 key, short slotIndex);
void setData(STR20 data, short slotIndex);
void setOverflow(int O);
void incrementCount();
STR10 getKey(short slotIndex);
STR20 getData(short slotIndex);
int getCount();
int getOverflow();
bool hasFreeSlot();
bool hasOverflow();
};
#endif /* defined(___30_Assign1__Bucket__) */