Category Archives: C++ course

C++ II, The Final! (du du dUUUU)

Our last quiz was cancelled so that we could focus on our final. Considering that this is the last C++ class offered at this college, I’m glad we got extra time to focus on it.
I realize while building my program that there are potentially a lot of files with “real” programs I could build in the work force. Using Visual Studio, keeping the tabs organized proved to be annoying. Having tabs auto-open when running and debugging…ugh. I’m beginning to see why some developers have 2 or 3 giant ass monitors and any previous taunts about their “overdoing it nerd style” are officially recanted.
I had a lot of fun with this program. Did a lil ASCII art 🙂
mathcap

Final, The Math Game
Program requirements:
Generate simple math fact problems. Validate user input at every opportunity. The program should keep track of the following statistics: 1. The user’s name 2. The total correct answers 3. The total wrong answers 4. The total earnings.
A separate text file must be created for every user.  Must demonstrate use classes. Must demonstrate use of pointers. Must have a separate .h file for each class prototype. Must have a separate .cpp file for each class prototype.

My grade: 110 out of 100 (got extra credit, FYEAH ASCII ART!!!!)
https://github.com/Velourious/the_final/tree/master

C++ II, Quiz 4

For this assignment, we were given the header files.
We had to write a program that lets a user create a circle with a default value of 1, or create a square with a default length of 1 or a triangle with a default base of 1 and a height of 1.  The program had to provide a way to increase or decrease the above mentioned dimensions by a value of 1.  Finally the program had to allow the user to display the property values of the above named shapes.
We were introduced to classes and had to build the definition files for the included headers.

My grade: 30 out of 30 (WOOT!)
Quiz 4
https://github.com/Velourious/quiz_4/tree/master
(Click “main.cpp” to see the program. The “[shape].cpp” files were also written by me.)

C++ II, Quiz 3

For this quiz, we were given an input file that contained student names and associated scores. We were to pull the information from that file and: 1) Create a structure of “studentType” that holds the student’s name, score, and letter grade. 2) Find the highest score and list the students who received that score. 3) Output results to a separate file.

My grade: 25 out of 30. When I ran the program, it ran perfectly. When the professor ran the program, the highest score was not displayed. I wasn’t aware that the output would differ. When I asked the professor why we were getting different results he replied, “Thank you for the vote of confidence, but if I know what makes every C++ compiler tick, I would not be teaching at a community college, I would be teaching at Harvard, MIT or some other Elite university”

*shrugs* 25 out of 30 it is then. I will be testing my programs on a second computer from now on.

Quiz 3
https://github.com/Velourious/quiz_3
(Click “main.cpp” to see program. Click “Out.txt” to see output file.)

C++ II, Quiz 2

Quiz 2 – Display all of the vowels from user input. Display the vowel input the most and the number of times it was input.
My grade: 25 out of 30.
Professor’s comments:
“Good job

However you can’t use

const int SIZE = 10000;
char *inputPtr = nullptr;
inputPtr = new char[SIZE];  //pointing to dynamic char array

because this way you are creating a small non-dynamic memory space to get around the issue of capturing and dynamically allocating just the EXACT amount of memory”

Quiz 2
https://github.com/Velourious/quiz_2/tree/master
(Click “main.cpp” to see program)

Starting C++ II, Quiz 1

I’ve already completed C++ I at my community college. I left the class with an A. Going in to C++ II, I was feeling pretty good. I finished my first quiz for this next course and turned it in and…. what a way to start – with a big fat 0. My program crashed on my professor.

He’s the same professor I took for C++ I. I really like the way he teaches – which is why I signed up with him for this next course – but, he’s very adamant about turning in projects that DO NOT CRASH and he definitely tries to crash them. It’s good, though. I’d hate to be at a job turning in work that crashes.

Not that he had to do much to crash it. For the quiz, we had to take a user’s numeric input and display the even digits. I thought I had tested every scenario: What if the user inputs alphabet? What if the user inputs white space? What if the user inputs special characters? What if there are no even digits to display?
But, I did not: What if the user doesn’t put in anything? My program crashes.
I’d like to go back and fix it, however, quiz 2 is already underway. I will be testing for no input whatsoever 🙂

Quiz 1 – Display even digits. If none, state that no even digits to display. The professor included a “starter file” that we were to build off of.
https://github.com/Velourious/quiz_1/tree/master
(Click on “main.cpp” to see the program)