User Tools

Site Tools


opus:spring2014:nhrynkiw:journal

C/C++ Programming Journal

5/8/14

Today is my last day in lab. I finished up improving upon the game code. I have much more varied tunnels and 3 enemies on screen that will move as the player moves either left or right randomly. I also reimplemented my multiply by 11 program into C++ with inheritance. I set two digit and three digit numbers as different classes with their own methods and had them inherit from an allnum class all the variables necessary for carrying. After a little struggling (considering we barely went over object oriented programming in either Joe's class or the lab) I got it working just like the original program. My EoCE is completely finished now and I am pretty satisfied with it.

5/1/14

I worked on the GD picture project and got a picture that meets the requirements. It may look like a first grader did it in MS paint but it is using a loop to draw a sun, I have an outlined triangle for a sail, a semi circle for a boat, and a rectangle for the mast. I also got a bit further on enhancing the game code. I got a level 1 setup and instructed it to run from that but the changes to the tunnels are very minor. I would like to get different colored dirt, maybe add in some more enemies, and definitely enemy movement.

4/28/14

Over the weekend I worked on the mental math functions menu project. I got it all finished, I just need to go back and add “the normal (hard)” way. Once I got the function prototype and declaration working fine it was simple running the function from main. After that is mostly just copying and formatting my multiply by 11 and nikhilam functions. However when I looked at my squares program, it didn't seem like mental math. I went back and looked at the project page for it and realized I had simply replicated the output but not the logical processes. I wrote a new squares program that did it the right way and implemented that into my menu program as well.

4/24/14

I completed the first two asignments on the EoCE, the fibonacci number programs. I spent 3 hours straight in the lab and both started and finished the programs. The reverse Fibonacci sequence was tough, but once Matt helped me realize I could run the normal algorithm simply to get the last value that I can then stick in my reverse algorithm.

4/17/14

I made a lot of progress on my multiply by 11 project. I have the if statements for 1 and 2 digit numbers working and I only have a few kinks to work out with 3 digit numbers. I realized that while my algorithm to eliminate non-numerical input was a good learning experience, it wasn't at all necessary and actually complicated the rest of my program. Now that I have that out my multiply by 11 project should be much more streamlined. I really just need to get it to accept command line arguments now.

4/13/14

I have been working on my multiply by 11 project all week but I am at a road block with my loop that is designed to reject input that isn't numerical or that isn't input at all, but it is stuck looping continuously. I am assuming it is something in my while portion. The loop is running but the comparison just don't seem to be doing what I want. I'll have to bring it up to Joe tomorrow if I don't get any further today. I'm going to go for a walk and clear my head, hopefully I'll figure it out when I come back at it.

4/3/14

I finished my Nikhilam project thanks to Matt. I was able to get it to scale by implementing a loop that multiples the base variable by 10. I have definitely taken a lot from this project that will help future projects of mine.

3/25/14

I've made even more progress on my Nikhilam project. Thankfully Matt pointed out a simple logical error that was preventing my algorithm to get negative numbers. After I fixed that and smoothed out a few things in my code It is working flawlessly. Well, except for the fact I still didn't have it working for anything besides a base of 100. I temporarily implemented a system that asks for input to determine the base but it is not working for a base of 10, just anything larger. I know this isn't permanent, and it definitely leaves a lot room for user error, but hopefully it will lead to something better. I'm thinking maybe implementing a loop, but I am having trouble putting it together logically on paper.

3/24/14

I've made a lot of progress on my Nikhilam project. My big breakthrough was extremely simple. All I had to do was have two different algorithms to get two different products, and simply display them immediately next to each other so they appear as one number. Duh. After I got that going it took a little bit to get it down but it is now working fine for anything above or anything below 100, however I still don't have it working for one below and one above. I also only have it working around a base of 100. I'll have to find some way to get it to recognize the base by itself.

3/17/14

We worked on Structs and Arrays in lecture recently and I have a much better understanding of how they work. I have some ideas on how to implement these into our projects but I still have a ways to go. I started getting my Nikhalim project going but other then a general structure I don't have much yet.

3/12/14

We talked about setting up debian today. I was able to get it set up within hyper-v and transferred the virtual machine to a flash drive to use on CCC computers. The only thing I wasn't sure about getting working that I'll have to ask about what installing GCC onto the virtual machine. I am lost on where to start the Nikhalim project still but I am working on a list of questions to ask when I get a change to.

3/6/14

So I completely forgot about the opus again and need to catch up so I will kind of summarize where I am at now.

I have been struggling with actually writing code but I feel I have a good understanding of the concepts. I am behind on my projects but I have finished up to the Squares project and have started work on the Days of the Week project. I have the mathematical process written out and I am trying to get code written out. I still get confused whenever I need to write code from scratch. Hopefully I'll be able to work through these syntax problems I am having by next week and I'll catch up. Hopefully.

2/21/14

I finished my datatypes project finally! I had been having troubles with getting the right format string specifiers working but after I got that right I wasn't able to get the quantity to work. With Matt's help I was able to get that right by casting the signed datatypes to larger datatypes and then they were displaying the right information.

2/13/14

I have been working on my datatypes project and I've been having a very tough time with getting it working. I have a basic structure to my code and I have gotten a lot of the unsigned datatypes working fine with the size and dataranges. I understand how to calculate the correct bitmask for each value but I haven't been able to get it to work in code.

opus/spring2014/nhrynkiw/journal.txt · Last modified: 2014/05/08 15:52 by nhrynkiw