-
Notifications
You must be signed in to change notification settings - Fork 0
/
p3.h
49 lines (39 loc) · 1.22 KB
/
p3.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
43
44
45
46
47
48
49
#ifndef _P3_H_
#define _P3_H_
#include <iostream>
#include <string>
class Person {
public:
std::string first;
std::string last;
int height;
int weight;
Person *nextHeight;
Person *nextWeight;
Person();
Person(std::string first, std::string last, int height, int weight);
};
class PersonList {
private:
Person *headHeightList;
Person *headWeightList;
int size;
public:
PersonList();
int getSize();
void printByHeight(std::ostream &os);
void printByWeight(std::ostream &os);
bool exists(std::string first, std::string last);
int getHeight(std::string first, std::string last);
int getWeight(std::string first, std::string last);
bool add(std::string first, std::string last, int height, int weight);
bool remove(std::string first, std::string last);
bool updateName(std::string first, std::string last, std::string newFirst, std::string newLast);
bool updateHeight(std::string first, std::string last, int height);
bool updateWeight(std::string first, std::string last, int weight);
void deepCopy(const PersonList &src);
~PersonList();
PersonList(const PersonList &src);
const PersonList &operator=(const PersonList &src);
};
#endif