aboutsummaryrefslogtreecommitdiff
path: root/Project1/Contact_list.h
diff options
context:
space:
mode:
authorConnor McDowell <[email protected]>2024-03-03 15:16:08 -0800
committerConnor McDowell <[email protected]>2024-03-03 15:16:08 -0800
commit36f63ce5a5ac9642ea0d63e44ba91c98a08e16e4 (patch)
tree8e3969324f127e54a659586918bf5c8106f5e595 /Project1/Contact_list.h
parentall functions refactored to fit in contact list. testing now. (diff)
downloadarchived-homework-7-connormcdowell275-36f63ce5a5ac9642ea0d63e44ba91c98a08e16e4.tar.xz
archived-homework-7-connormcdowell275-36f63ce5a5ac9642ea0d63e44ba91c98a08e16e4.zip
first commit of the day, following lecture. again.
Diffstat (limited to 'Project1/Contact_list.h')
-rw-r--r--Project1/Contact_list.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/Project1/Contact_list.h b/Project1/Contact_list.h
new file mode 100644
index 0000000..1748a44
--- /dev/null
+++ b/Project1/Contact_list.h
@@ -0,0 +1,40 @@
+#ifndef CONTACT_LIST_H
+#define CONTACT_LIST_H
+
+#include "Contacts.h"
+
+class contact_list
+{
+private:
+
+ contact* contacts_{ nullptr };
+
+ size_t length_{ 0 };
+
+ size_t size_{ 0 };
+
+public:
+ contact_list() = default;
+ ~contact_list();
+
+ void set_length(size_t MAX);
+ size_t get_length();
+
+ void set_size(size_t size);
+ size_t get_size();
+
+ void DeleteContact(contact newContact[], size_t MAX);
+
+ void CopyList(const contact* contacts, const size_t& size);
+
+ void AddContact(const contact& contact, size_t MAX, size_t& t);
+
+ void Update(contact newContact, size_t MAX);
+
+ void Print(contact newContact[], size_t& MAX) const;
+
+ size_t Size() const;
+};
+
+
+#endif CONTACT_LIST_H