- Mar 28, 2025
-
-
Devon-Harstrom authored
-
Devon HARSTROM authored
Done Assignment merging into main See merge request !1
-
Devon-Harstrom authored
Made readme better briefly explaining code, testing, refactoring, added test badge, image of output. All Done
-
Devon-Harstrom authored
I decomposed conditionals since some of them were needlessly nested which makes it harder to read for exampl getFieldValue had like 4/5 nestings which is way too much also did it on the other get methods I implemented and added one more test to make sure that after the decomposing of condtionals code like this still worked if(_exceptions.length == 0) { printIndented(depth, " Exceptions-> NONE"); return; } Done Assignment!
-
Devon-Harstrom authored
was doing the identical code for exceptions, modifiers and parameters so, I extracted the method to reduce the repetitive code. I also Pulled out getting field value into its own class since the method was getting pretty large.
-
Devon-Harstrom authored
Smaller refactors made I changed the name of t to _type and ct to _componentType as I missed them from naming refactor. Next I also fixed the warning from Class _class and any other use of Class. Instead using Class <?> since it can be any type even Class<?>[] Lastly, I quickly changed the for loop in the code from standard for(int i=0; i<length; i++) style to for (Field field: _fields) Style
-
Devon-Harstrom authored
Done Refactoring 3, Extracted methods again I pulled getConstructor, getMethods and getFields. Overall the code was not readable at all and extracting the method allowed for it to be much easier to read Ran all the tests and everything past as usual
-
Devon-Harstrom authored
For example Class c was changed to Class _class and Constructors[] cc was changed to _constructors etc. The name change is _followed by the proper name This make it way easier to read the code rather than my initial lettered variables For testing I added a test for a simple class with no recursion to see if method and field are in the output since I already did Super class and Interface I just checked method and Field to make sure the refactoring didn't change anything
-
Devon-Harstrom authored
First REFACTOR! I extracted two methods in inspector.java I extracted getSuperclass and getInterface getSuperclass is for getting the immediate super class and interface for interface both print the results I then look to make sure the output contains the proper words. I also tested both with recursive true or false to make sure it still prints even if set to false
-
Devon-Harstrom authored
I finally formatted th output exactly like the Example output, it took a while to get exactly right, but as the solution I created a method called printIndented which repeats tabs based on recursive depth and add spaces when I needed to
-
Devon-Harstrom authored
Finished part 6 ... hopefully. took me forever to figure out the object.get() and have the hash print correctly as well as the recursive call Also added if the field is an arraystill need to fix formatting as well as add some testing especially testing during the refactors
-
Devon-Harstrom authored
Added part 5 adding methods, basically same thing from part 4 I just changed the variables and added the return type Next Ill improve the testing, fix the formatting as well as add part 6
-
Devon-Harstrom authored
-
Devon-Harstrom authored
added the start of a testing file it just creates a simple object and test the output file to see if its the same as my predicted file for future testing Ill use different types of objects maybe some with inheritance or multiple constructors ect.
-
- Mar 27, 2025
-
-
Devon-Harstrom authored
-
Devon-Harstrom authored
-
Devon-Harstrom authored
-
Devon-Harstrom authored
got the name, exceptions, parameters and modifiers. In the future I want to also refactor the code as it not wrriten the best, methods can be extracted and made into one method to eliminate reused code. Also names need to change, was thinking too much about names so was just using the single letter variables like c which was given in the first place but want to change this to clazz of _class, etc.
-
- Mar 26, 2025
-
-
Devon-Harstrom authored
-
Devon-Harstrom authored
Added/adjusted from the tutorial participation code changed the name and superclass code slightly, and add interfaces as an array. Printing is a pit rough, visually so might want to fix that later. Also forgot to make a branch so pushing to main for now and then switching to a working branch
-
- Mar 21, 2025
-
-
Devon-Harstrom authored
-
Devon HARSTROM authored
-
Devon-Harstrom authored
Added files and also added a print statement
-
Devon HARSTROM authored
-