aboutsummaryrefslogtreecommitdiff
path: root/Homework 7/program.cpp
diff options
context:
space:
mode:
authorAsahel <[email protected]>2024-03-01 11:36:05 -0800
committerAsahel <[email protected]>2024-03-01 11:36:05 -0800
commit892e2808ec0b280b653d1ac2f04fff9238fc5427 (patch)
tree2d06d248f2b6a39e4fe543adb6cd76ac44a6da91 /Homework 7/program.cpp
parentadd deadline (diff)
downloadhomework-7-asahellt-892e2808ec0b280b653d1ac2f04fff9238fc5427.tar.xz
homework-7-asahellt-892e2808ec0b280b653d1ac2f04fff9238fc5427.zip
Added contact listHEADmain
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