···11+---
22+Project: "#6"
33+Professor: "Professor Knoerr"
44+Class: "CS 1210 – Fall 2025"
55+Author: "Kieran Klukas"
66+---
77+88+# Requirements
99+1010+<!--Restate the problem specifications in your own words-->
1111+1212+Search a provided old testament text file for arbitrary reference. It prompts the user for book, chapter, and verse and then searches for that verse. If book is not found then output `Book does not exist in the Old Testament`. If chapter isn't found then `Chapter # does not exist in Book`. Finally if the verse isn't found then output `Verse # does not exist in Book #`. Once the verse is found then append the verse to `verses.txt`.
1313+1414+# Design
1515+1616+<!--How did you attack the problem? What choices did you make in your design, and why?-->
1717+1818+I started with outlining the basic input system [`532c6cf`](https://github.com/cu-cs1210/lab-6-kieranklukas/commit/5b2ced23798fc7cbce79eb445c9592cccf16d6a6). Then worked on setting up a while loop to read the file line by line. I spent a while puzzling over exactly how I wanted to implement this and I am not entirely satisfied with my current solution. It would be interesting to try this problem in a functional language like gleam or erlang and see how much more cleanly I can parse the file. I implemented each reference part sequentially and then went back and made it check for barrier strings to stay within the proper book and chapter. I ended up realizing that the book of Psalms is referenced differently and so made some logic to permit its idiosyncracies [`7c18fff`](https://github.com/cu-cs1210/lab-6-kieranklukas/commit/7c18fffa30ab3e43bcb05ad4dff44f275987cbb8).
1919+2020+# Implementation
2121+2222+<!--Outline any interesting implementation details.-->
2323+2424+I used a single input variable to parse the file word by word until we get to the correct verse. I also check if the input book is listed as `Psalm` or `Psalms` and add or remove an `s` when doing checks or output as appropriate. The output file is also never opened until we find the verse and is immediately closed afterward. Also a minor note of intrest is that you can change the default paths that the program loads from and saves to by adding the paths as arguments (eg. `lab66 test/OT.txt build/verses.txt`).
2525+2626+# Testing
2727+2828+<!--
2929+Explain how you tested your program, enumerating the tests if possible.
3030+Explain why your test set was sufficient to believe that the software is working properly,
3131+i.e., what were the range of possibilities of errors that you were testing for.
3232+-->
3333+3434+I updated the `makefile` to add `make run` so I could compile and run it more easily and updated the test file to have the Zylabs test states as well as more granularly check a happy path and some adversarial paths.
3535+3636+# Outside Help
3737+3838+<!--Did you get help from anyone else on this project? Document their contribution to your learning.-->
3939+4040+No outside help was used beyond minor googling for how to capitalize an entire string and the proper syntax for appending (not covered in zybooks as far as I can tell but I'm sure you will cover it in lectures next week).
4141+4242+# Summary/Conclusion
4343+4444+<!--Present your results. Did it work properly? Are there any limitations?-->
4545+4646+The program works well and should cover most edgecases! As far as I can tell there isn't anything that should be able to break it beyond changing the `OT.txt` to be several GB in size.
4747+4848+# AI Use
4949+5050+<!--How did you use Generative AI in this project?-->
5151+5252+I used claude to generate a more complex test file and then modified it to add the rest of the zybooks tests as I got closer to finishing the project.
5353+5454+# Lessons Learned
5555+5656+<!--List any lessons learned. What might you have done differently if you were going to attack this again.-->
5757+5858+I would definetly want to try a different language for sure if I was doing this independantly but overal I think this implementation is fairly solid and I wouldn't change much. I did find out in this lab that it is always a good idea to check the whole input or you might run into weird bugs like how `PSALMS` is formatted.
5959+6060+# Time Spent
6161+6262+<!--Approximately how many hours did you spend on this project?-->
6363+6464+
-52
coversheet.md
···11----
22-Project: "#6"
33-Professor: "Professor Knoerr"
44-Class: "CS 1210 – Fall 2025"
55-Author: "Kieran Klukas"
66----
77-88-# Requirements
99-1010-<!--Restate the problem specifications in your own words-->
1111-1212-# Design
1313-1414-<!--How did you attack the problem? What choices did you make in your design, and why?-->
1515-1616-# Implementation
1717-1818-<!--Outline any interesting implementation details.-->
1919-2020-# Testing
2121-2222-<!--
2323-Explain how you tested your program, enumerating the tests if possible.
2424-Explain why your test set was sufficient to believe that the software is working properly,
2525-i.e., what were the range of possibilities of errors that you were testing for.
2626--->
2727-2828-I updated the `makefile` to add `make run` so I could compile and run it more easily and updated the test file to have the Zylabs test states as well as more granularly check a happy path and some adversarial paths.
2929-3030-# Outside Help
3131-3232-<!--Did you get help from anyone else on this project? Document their contribution to your learning.-->
3333-3434-# Summary/Conclusion
3535-3636-<!--Present your results. Did it work properly? Are there any limitations?-->
3737-3838-# AI Use
3939-4040-<!--How did you use Generative AI in this project?-->
4141-4242-I used claude to generate a more complex test file and then modified it to add the rest of the zybooks tests as I got closer to finishing the project.
4343-4444-# Lessons Learned
4545-4646-<!--Present your results. Did it work properly? Are there any limitations?-->
4747-4848-# Time Spent
4949-5050-<!--Approximately how many hours did you spend on this project?-->
5151-5252-
+2
src/lab66.cpp
···4343 getline(cin, book);
4444 for (int i = 0; i < book.length(); i++)
4545 normalizedBook += toupper(book[i]);
4646+ if (normalizedBook == "PSALMS")
4747+ normalizedBook == "PSALM";
46484749 cout << "the chapter: ";
4850 cin >> chapter;