aboutsummaryrefslogtreecommitdiff
path: root/Homework 7/program.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Homework 7/program.cpp')
-rw-r--r--Homework 7/program.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/Homework 7/program.cpp b/Homework 7/program.cpp
new file mode 100644
index 0000000..0388026
--- /dev/null
+++ b/Homework 7/program.cpp
@@ -0,0 +1,58 @@
+// Name: Asahel Lopez
+// Date: 3/1/24
+// Class: CST 116
+// Assignment: Homework 7
+
+#include <iostream>
+
+using std::endl;
+using std::cout;
+using std::cin;
+
+int main() {
+
+ class Contact {
+ char* _firstName{};
+ char* _lastName{};
+ char* _streetAddress{};
+ char* _city{};
+ char* _state{};
+ int zip{};
+ char* _email{};
+
+ Contact() = default;
+
+ Contact() {
+ delete[] _firstName;
+ delete[] _lastName;
+ delete[] _streetAddress;
+ delete[] _city;
+ delete[] _state;
+ delete[] _email;
+
+ }
+ class ContactList {
+
+ Contact* contacts_{ nullptr };
+ size_t length_{ 0 };
+ size_t size_{ 0 };
+
+ public:
+
+ ContactList() = default;
+
+ ContactList() {
+ delete[] contacts_;
+ }
+
+ void AddContact(const Contact& contact) {
+
+ }
+ void Print() const {
+
+ }
+ size_t Size()const {
+ return size_;
+ }
+ };
+ }; \ No newline at end of file