diff --git a/Assignments/MP4_CalebFontenot/cmake-build-debug/.cmake/api/v1/reply/index-2024-04-13T02-03-22-0917.json b/Assignments/MP4_CalebFontenot/cmake-build-debug/.cmake/api/v1/reply/index-2024-04-13T04-03-40-0561.json similarity index 100% rename from Assignments/MP4_CalebFontenot/cmake-build-debug/.cmake/api/v1/reply/index-2024-04-13T02-03-22-0917.json rename to Assignments/MP4_CalebFontenot/cmake-build-debug/.cmake/api/v1/reply/index-2024-04-13T04-03-40-0561.json diff --git a/Assignments/MP4_CalebFontenot/cmake-build-debug/.ninja_deps b/Assignments/MP4_CalebFontenot/cmake-build-debug/.ninja_deps index 7b594a3..5e5ce24 100644 Binary files a/Assignments/MP4_CalebFontenot/cmake-build-debug/.ninja_deps and b/Assignments/MP4_CalebFontenot/cmake-build-debug/.ninja_deps differ diff --git a/Assignments/MP4_CalebFontenot/cmake-build-debug/.ninja_log b/Assignments/MP4_CalebFontenot/cmake-build-debug/.ninja_log index 88004e9..19be33c 100644 --- a/Assignments/MP4_CalebFontenot/cmake-build-debug/.ninja_log +++ b/Assignments/MP4_CalebFontenot/cmake-build-debug/.ninja_log @@ -1,26 +1,11 @@ # ninja log v5 -2024 2093 1712973500312389382 MP4_CalebFontenot 7933c6881fbc11b8 -1 468 1712972086391510945 CMakeFiles/MP4_CalebFontenot.dir/simpleMenu.cpp.o e8315fd0f4387cfd -3 2024 1712973500242388051 CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o 6231a95715fd0807 -2 669 1712973782223750576 CMakeFiles/MP4_CalebFontenot.dir/main.cpp.o c51f12945362e592 -0 40 1712973802912144022 build.ninja c57effa8c2ea19ff -3 469 1712973803386153037 CMakeFiles/MP4_CalebFontenot.dir/simpleMenu.cpp.o d6d8e46ab59e338b -3 645 1712973803562156384 CMakeFiles/MP4_CalebFontenot.dir/main.cpp.o 6a28d6d3ac55d82 -3 1899 1712973804813180176 CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o 9553c706a29f838c -1899 1972 1712973804888181602 MP4_CalebFontenot d4b691c624f75324 -2 2078 1712974851411591150 CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o 9553c706a29f838c -2078 2160 1712974851501592823 MP4_CalebFontenot d4b691c624f75324 -3 443 1712974980993004187 CMakeFiles/MP4_CalebFontenot.dir/simpleMenu.cpp.o d6d8e46ab59e338b -443 512 1712974981061005455 MP4_CalebFontenot d4b691c624f75324 -2 2004 1712975421239249676 CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o 9553c706a29f838c -2004 2079 1712975421317251141 MP4_CalebFontenot d4b691c624f75324 -2 465 1712975914080525447 CMakeFiles/MP4_CalebFontenot.dir/simpleMenu.cpp.o d6d8e46ab59e338b -465 535 1712975914149526747 MP4_CalebFontenot d4b691c624f75324 -2 662 1712976372659063498 CMakeFiles/MP4_CalebFontenot.dir/main.cpp.o 6a28d6d3ac55d82 -2 1946 1712976373939086741 CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o 9553c706a29f838c -1946 2016 1712976374012088067 MP4_CalebFontenot d4b691c624f75324 -2 652 1712976502028421921 CMakeFiles/MP4_CalebFontenot.dir/main.cpp.o 6a28d6d3ac55d82 -2 2028 1712976503401447044 CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o 9553c706a29f838c -2028 2101 1712976503475448398 MP4_CalebFontenot d4b691c624f75324 -2 2021 1712976752366027708 CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o 9553c706a29f838c -2021 2096 1712976752442029113 MP4_CalebFontenot d4b691c624f75324 +1 28 1712981020549224181 build.ninja c57effa8c2ea19ff +1958 2029 1712980458391046848 MP4_CalebFontenot d4b691c624f75324 +4 474 1712980975523343313 CMakeFiles/MP4_CalebFontenot.dir/simpleMenu.cpp.o d6d8e46ab59e338b +4 605 1712980975653345859 CMakeFiles/MP4_CalebFontenot.dir/main.cpp.o 6a28d6d3ac55d82 +4 1958 1712980458318045361 CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o 9553c706a29f838c +1 6 0 clean ea9dea1471b82a9d +4 481 1712981021044233856 CMakeFiles/MP4_CalebFontenot.dir/simpleMenu.cpp.o d6d8e46ab59e338b +3 641 1712981021204236983 CMakeFiles/MP4_CalebFontenot.dir/main.cpp.o 6a28d6d3ac55d82 +4 1932 1712981022493262175 CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o 9553c706a29f838c +1932 2001 1712981022563263543 MP4_CalebFontenot d4b691c624f75324 diff --git a/Assignments/MP4_CalebFontenot/cmake-build-debug/CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o b/Assignments/MP4_CalebFontenot/cmake-build-debug/CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o index 6cf5999..8c018fe 100644 Binary files a/Assignments/MP4_CalebFontenot/cmake-build-debug/CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o and b/Assignments/MP4_CalebFontenot/cmake-build-debug/CMakeFiles/MP4_CalebFontenot.dir/userData.cpp.o differ diff --git a/Assignments/MP4_CalebFontenot/cmake-build-debug/MP4_CalebFontenot b/Assignments/MP4_CalebFontenot/cmake-build-debug/MP4_CalebFontenot index b406490..fc814ec 100755 Binary files a/Assignments/MP4_CalebFontenot/cmake-build-debug/MP4_CalebFontenot and b/Assignments/MP4_CalebFontenot/cmake-build-debug/MP4_CalebFontenot differ diff --git a/Assignments/MP4_CalebFontenot/cmake-build-debug/data.dat b/Assignments/MP4_CalebFontenot/cmake-build-debug/data.dat index 4f513a9..477e8c9 100644 --- a/Assignments/MP4_CalebFontenot/cmake-build-debug/data.dat +++ b/Assignments/MP4_CalebFontenot/cmake-build-debug/data.dat @@ -1 +1 @@ -22 serialization::archive 19 0 0 1 0 0 0 11 Potato Chip 20 123 Potato Chip Lane 11 Potatoville 10 California 13 6969potatoZIP 17 +1 (111) 111-1111 9.99999999901000023e+09 1713074400 \ No newline at end of file +22 serialization::archive 19 0 0 2 0 0 0 11 Potato Chip 20 123 Potato Chip Lane 11 Potatoville 10 California 13 6969potatoZIP 17 +1 (111) 111-1111 9.99999999901000023e+09 1713074400 23 Testington McTesterface 16 123 Testing Lane 10 Testington 15 Testtachutsetts 8 7050test 17 +1 (234) 567-8910 9.87654321000000089e+06 1711951200 \ No newline at end of file diff --git a/Assignments/MP4_CalebFontenot/userData.cpp b/Assignments/MP4_CalebFontenot/userData.cpp index ff532f2..524e98d 100644 --- a/Assignments/MP4_CalebFontenot/userData.cpp +++ b/Assignments/MP4_CalebFontenot/userData.cpp @@ -53,22 +53,21 @@ userData enterRecord() { std::printf("Enter phone #: "); std::getline(std::cin, pUserData->phone); - do { + while (true) { std::printf("Enter account balance: $"); std::string temp; std::getline(std::cin, temp); - try { pUserData->accountBal = std::stod(temp); if (pUserData->accountBal < 0) { - throw std::invalid_argument(); + throw std::invalid_argument("less than zero"); } else { break; } } catch (const std::invalid_argument &e) { std::cerr << "Invalid input for balance. Please enter a valid number." << std::endl; } - } + } std::printf("Entering date of last payment...\n"); std::tm tm = enterDate(); pUserData->dateOfLastPayment = std::mktime(&tm); @@ -155,17 +154,21 @@ void changeEntry(std::vector& data) { break; } case 6: { - std::printf("Old value: %.2lf\nEnter new balance: $", selectedEntry->accountBal); - std::string temp; - std::getline(std::cin, temp); - try { + while (true) { + std::printf("Old value: %.2lf\nEnter new balance: $", selectedEntry->accountBal); + std::string temp; + std::getline(std::cin, temp); + try { selectedEntry->accountBal = std::stod(temp); if (selectedEntry->accountBal < 0) { - throw std::invalid_argument(); - } + throw std::invalid_argument("less than zero"); + } else { + break; + } } catch (const std::invalid_argument &e) { std::cerr << "Invalid input for balance. Please enter a valid number." << std::endl; } + } break; } case 7: { @@ -254,4 +257,4 @@ std::vector getData() { ia >> data; } return data; -} \ No newline at end of file +} diff --git a/ZIPs/MP4_CalebFontenot.zip b/ZIPs/MP4_CalebFontenot.zip index 382aded..f0b85c7 100644 Binary files a/ZIPs/MP4_CalebFontenot.zip and b/ZIPs/MP4_CalebFontenot.zip differ