Labs

LAB 1: INTRODUCTION TO C++ PROGRAMMING

  • The main purpose of this lab is to introduce C++ programming concepts related to input/output, data types and type casting. Please comment your programs. Your teaching assistant will ensure that you are setup to use the Linux command line compiler g++.
  • Lab Description: [PDF]

LAB 2: USING PRE-DEFINED FUNCTIONS IN C++

  • The main purpose of this lab is to introduce C++ programming concepts related to branching, looping and predefined functions. In this lab you will create a game call Guess That Number! The game has an unlimited number of rounds. In each round the program selects a random number that the user has to guess.
  • Lab Description: [PDF]

LAB 3: PROGRAMMER DEFINED FUNCTIONS IN C++

  • The main purpose of this lab is to create functions and learn about call-by-reference parameters.
  • Lab Description: [PDF]

LAB 4: Creating a Calendar IN C++

  • Note: This is a take home lab.
  • This lab will give you an opportunity to practice using C++. In this lab you will be making a text-based calendar program that looks like:
      JANUARY 2018                   
    
      S  M Tu  W Th  F  S            
         1  2  3  4  5  6           
      7  8  9 10 11 12 13            
     14 15 16 17 18 19 20           
     21 22 23 24 25 26 27            
     28 29 30 31

    Your calendar should be able to print months in the future and in the past.

  • Lab Description: [PDF]

LAB 5: Code Style & Documentation

  • The main purpose of this lab is to reinforce the lectures on code style and documentation.
  • Lab Description: [PDF]
  • Source Files: [lab05.cpp]

LAB 6: Programming Tic-Tac-Toe

  • The main purpose of this lab is to get more experience programming in C++ by extending a tic-tac-toe game.
  • Lab Description: [PDF]
  • Source Files: [tictactoe_final.cpp]

LAB 7: Programming Connect 4

  • The main purpose of this lab is to get more experience programming in C++ by completing the Connect 4 game that we built in class.
  • Lab Description: [PDF]
  • Source Files: [connectfour_v2.cpp]

LAB 8: DYNAMIC ARRAYS

  • The main purpose of this lab is to introduce you to dynamic variables and specifically to dynamic arrays.
  • Lab Description: [PDF]

LAB 9: (More) Programming Tic-Tac-Toe

  • The main purpose of this lab is to implement a two-dimension dynamic array in the previously created Tic-Tac-Toe game.
  • Lab Description: [PDF]
  • Source Files: [tictactoe_final.cpp] (or you Lab 6 submission)

LAB 10: A Queue Class In C++

  • The main purpose of this lab is to implement a queue class to store data and perform basic data analysis.
  • Lab Description: [PDF]
  • Source Files: [lab10.cpp]