a gleam implementation of a CS assignment originally written in cpp

docs: update coversheet

Changed files
+66 -52
src
+64
COVERSHEET.md
···
+
---
+
Project: "#6"
+
Professor: "Professor Knoerr"
+
Class: "CS 1210 – Fall 2025"
+
Author: "Kieran Klukas"
+
---
+
+
# Requirements
+
+
<!--Restate the problem specifications in your own words-->
+
+
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`.
+
+
# Design
+
+
<!--How did you attack the problem? What choices did you make in your design, and why?-->
+
+
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).
+
+
# Implementation
+
+
<!--Outline any interesting implementation details.-->
+
+
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`).
+
+
# Testing
+
+
<!--
+
Explain how you tested your program, enumerating the tests if possible.
+
Explain why your test set was sufficient to believe that the software is working properly,
+
i.e., what were the range of possibilities of errors that you were testing for.
+
-->
+
+
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.
+
+
# Outside Help
+
+
<!--Did you get help from anyone else on this project? Document their contribution to your learning.-->
+
+
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).
+
+
# Summary/Conclusion
+
+
<!--Present your results. Did it work properly? Are there any limitations?-->
+
+
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.
+
+
# AI Use
+
+
<!--How did you use Generative AI in this project?-->
+
+
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.
+
+
# Lessons Learned
+
+
<!--List any lessons learned. What might you have done differently if you were going to attack this again.-->
+
+
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.
+
+
# Time Spent
+
+
<!--Approximately how many hours did you spend on this project?-->
+
+
![hackatime badge](https://hackatime-badge.hackclub.com/U062UG485EE/lab-6)
-52
coversheet.md
···
-
---
-
Project: "#6"
-
Professor: "Professor Knoerr"
-
Class: "CS 1210 – Fall 2025"
-
Author: "Kieran Klukas"
-
---
-
-
# Requirements
-
-
<!--Restate the problem specifications in your own words-->
-
-
# Design
-
-
<!--How did you attack the problem? What choices did you make in your design, and why?-->
-
-
# Implementation
-
-
<!--Outline any interesting implementation details.-->
-
-
# Testing
-
-
<!--
-
Explain how you tested your program, enumerating the tests if possible.
-
Explain why your test set was sufficient to believe that the software is working properly,
-
i.e., what were the range of possibilities of errors that you were testing for.
-
-->
-
-
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.
-
-
# Outside Help
-
-
<!--Did you get help from anyone else on this project? Document their contribution to your learning.-->
-
-
# Summary/Conclusion
-
-
<!--Present your results. Did it work properly? Are there any limitations?-->
-
-
# AI Use
-
-
<!--How did you use Generative AI in this project?-->
-
-
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.
-
-
# Lessons Learned
-
-
<!--Present your results. Did it work properly? Are there any limitations?-->
-
-
# Time Spent
-
-
<!--Approximately how many hours did you spend on this project?-->
-
-
![hackatime badge](https://hackatime-badge.hackclub.com/U062UG485EE/lab-6)
+2
src/lab66.cpp
···
getline(cin, book);
for (int i = 0; i < book.length(); i++)
normalizedBook += toupper(book[i]);
+
if (normalizedBook == "PSALMS")
+
normalizedBook == "PSALM";
cout << "the chapter: ";
cin >> chapter;