Assignments and Labs for CS121 (Program Design and Development C/C++) at WSU, taught by Andy O'Fallon. This code is from the Fall 2011 course.
This repository contains all my code and miscellaneous files for CS121 that I could find. There is no guarentee on any of it working perfectly, particularly Programming Assignment 6 (Battleship).
NOTE: all of these programs are command-line based and programmed in C on Windows-platforms (although they should compile under other operating systems).
Labs and assignemnts can be found under the Assignments folder.
- common: contains my common menu system code that I used later in the semester to make creating menus easier.
- Programming Assignments: contains programming assignments for the class.
- Answers: contains the 'correct' answer for programming assignment 1, as provided by the professor.
- clalculator: contains a calculator program, as provided by the professor.
- ProgramAssignment1: a program to solve several basic phyiscs equations and a more general mathematical equation. The equations are pre-programmed, but users can input variables (no validity checking for inputs). We were required to program in a single function and all in a single class, so it is a rather ugly and basic program.
- Programming Assignment 2: a program to solve the same equations as ProgramAssignment1 but in a slightly better way (we were allowed to use functions for some of the assignment).
- Programming Assignment 3: a program that reads in information (5 student records) from an external file and then outputs an analysis of the data.
- Programming Assignment 4: a program that simulates the 'Craps' game.
- Programming Assignment 5: a program allowing a user to play a math game, where random equations are generated which the user must answer.
- Programming Assignment 6: the very beginnings of a battleship game. Unfortuanately I could not find a copy of my finished version of the program. If I do, I will upload it.
- Turned in ZIPS: various zip files that are turned in versions of the programming assignments.
- webber_pa7.zip: a game based on Poker.
- Labs: contains labs for the class.
- Lab 1
- Task 1: Hello World!
- Task 2: Solves some basic mathematical equations. Similur to Programming Assignment 1, but we were given some extra freedom.
- Lab 2
- Task 1: A program which computes the formula of a perpendicular line to that of input coordinates.
- Task 2: A program which computes the Body Mass Index (BMI) of a person based on their height and weight.
- Task 3: A program which calculates the gear ratio between a minimum and maximum speed.
- Task 4: A program which calculates the Bowl Championship Series score of a college football team.
- Lab 3 (I combined all tasks were combined into a task 1).
- Task 1: A program which performs character processing on data from a file and outputs the results.
- Lab 4 (NOTE: from here, comments are sparse as we were asked to not worry about them for labs).
- Task 1: Calculates sales tax and total cost for a purchase price.
- Task 2: Calculates the day number for the current date (i.e. January 3rd, 2015 = Day 3)
- Task 3: Calculates a receipt for a phone bill.
- Task 4: Displays recipes for bread.
- Lab 5
- Task 1: Calculates electricity bill.
- Task 2: Calculates an average from numbers in an input file (one number per line).
- Task 3: Unfinished as I had to leave early for that lab.
- Lab 6 (All tasks are combined into a single program).
- Task 1: Allows access to the tasks for the lab: prime numbers, employee pay, and number guess game
- Lab 7: Allows access to the tasks for the lab: internet cost calculator, broadway revenue
- Lab 8: Allows access to the tasks for the lab: reading a file and reversing an array, random arrays, word guessing game.
- Lab Final: sorts an unsorted list of people using Bubble Sort.
- Lab3Task1: a copy of lab 3.
- Lab 1