Posts

Showing posts from March, 2025

Week 12

Work with some of your fellow classmates and go through your solution to project 1: LDPM Liam Connors What was your strategy for solving the assignments? My strategy for solving the assignments was to thoroughly read through the prompt, what each method asks, and then read the sample output to get an idea of how the program is supposed to run. Did you start writing code right away? Did you plan it out on paper?  After reading the prompt, I didn't plan anything on paper. I just started the assignment. What was THEIR strategy for solving the assignments? Liam's strategy for solving the assignment was to first match the UML diagram with fields/variables/methods. Thne he wrote TODOs for what he couldn't solve. He initially tried to create ac checklist document for the work but it became too overwhelming so he just worked on the assignment. Next time he would skip the understanding the entire assignment and instead spend his time focusing on individual methods to make sure they ...

Week 11

 Summarize the feedback you received about your code     I received feedback that my variable names are clear and meaningful. My Code is functional but suboptimal, where logic adheres to the assignment but could use optimizations. I have an unused import which I already fixed in my final result. My code is clean and readable. And that my existing comments are concise and accurate but not exhaustive. Methods are documented but others lack explanations.       Identify any trends you noticed when evaluating the code of others A few logic errors here and there, as well as setting up the subclasses were a common theme. Was any part of the code a struggle for YOU?     I struggled a lot with the output statements, it is different than C++ and I would sometimes make too many arguments or too little, or silly little things like forgetting the %. toString was a pain to implement, as well as takeDamage. Was any part of writing the code easy for YOU? ...

Week 10

     I had numerous hurdles while doing homework 1. My first hurdle was that for some reason my output would always be blank no matter what. I was not properly adding the line to addFromFile so my outputs were messed up. For addLine I had issues figuring out the proper command to split a string with any whitespace characters as delimiters, so I looked on Stack Overflow and found a user mention to use something along the lines of  myString.split( "\\s+" );. Which would ignore spaces and tabs to grab Hello and World. That worked wonderfully well, but for some reason my code was grabbing ["", "Hello", "there."]  The extra white space in front of hello was throwing me off. Turns out it was an empty string getting added because of leading white space, and I wasn't properly skipping the empty string so it was getting added. So I needed to skip if the trimmed word is empty. As for another issue, implementing the randomWord method had its hiccups. I ...

Week 9

 I think my problem with solving Coding Bat challenges comes from the fact that I didn't know some Java lines like str.substring() and how to do -1 for the end of the string. I also need to think before I get to coding. Which is counterintuitive as I usually just code, then think about what went wrong. I sometimes took a break to solve these challenges. Like I stated previously, I threw code but now I know I should try and plan it better. These assignments took numerous attempts, it says 45 minutes for each assignment, but I probably spent ATLEAST double on both. I'm not as strong of a programmer as I'd like to be, it is a different language, but that shouldn't be an excuse. I will try hard to get good.