Your browser is unsupported

We recommend using the latest version of IE11, Edge, Chrome, Firefox or Safari.

Lab Exercises

Sort by:
Wednesday
Jun 07
2023

Lab 13

This lab stored integers in a Binary Search Tree ( BST ), and then prints them out in order.

To Do:

For this lab you are to write a main program that asks the users for a series of integers, until the user enters -999 ( which is ignored. )  As each number is read in, it is added to a Binary Search Tree, either by adding another node to the tree if this is a unique integer, or incrementing a counter if this is a duplicate.  After all numbers are read in, the BST is printed, in order.

Follow the instructions in the comments of the provided starting files, and submit your results to Gradescope, either via upload or via github.  ( Don’t forget to rename lab13.cpp to something including your netid. )

Tuesday
Jun 06
2023

Lab 12

Lab 12 covers the use of git and github.  This is a timed assignment, you have 120 minutes to complete this assignment from the time you start it.

To Do

Follow the instructions in the following file, and those given by your TA.  Note that this assignment must be submitted via github.

Monday
Jun 05
2023

Lab 11

Lab 11 involves polymorphism and exception handling.

To Do

Thursday
Jun 01
2023

Lab 9B

Lab 9B works with overloaded functions and different parameter passing mechanisms.

Follow the given instructions to edit and create the given files

For this lab follow the instructions to edit the given files.  There are some questions to be answered within comment blocks in the files.  At the end of lab period, zip your files together and turn them in using Gradescope.

Wednesday
May 31
2023

Lab 9

Lab9 involves getting started on Project 6 using inheritance.  You should work on this no more than 2 hours before handing in whatever you have gotten done by that time.

To Do

Download the following zip file to bertvm, and unpack it using “unzip”.  Type make to see that it builds ( with warnings ).  Then edit the code to make it as functional as you can in 2 hours.  You may reuse code from lab 8 / Project 5 if you wish.

Thursday
May 25
2023

Lab 8

Lab 8 is the first lab in C++. In this lab, you will begin working with C++ classes by creating Sample and SampleGroup classes. Remember, this is a timed assignment. Please hand in…

To Do

Download the following files to bertvm and follow the instructions given in proj5Base.cpp.  ( This is a starting point for project 5. )  Hand in to Gradescope whatever you have accomplished in the first two hours.  Note that tasks 1-4 are for lab purposes only, and should be removed or commented out before submitting Project 5 as a homework assignment.

  • proj5Base.zip  contains the following:
    • proj5Base.cpp
    • Sample.h
    • Sample.cpp
    • SampleGroup.h
    • SampleGroup.cpp

In order to compile a .cpp file you must use g++:

  g++ -g -o proj5Base proj5Base.cpp Vertex.cpp VertexSet.cpp

The use of a makefile ( to be explained soon ) can make life easier.

Wednesday
May 24
2023

Lab 7

This lab is about Code Reviews, a.k.a. Inspections.

To Do

Review full information on CS 211 code reviews on the code reviews tab of this web site.  Files need are:

Note that these are both undergoing development, and may change in the future.  See the web site tab for further details.

Tuesday
May 23
2023

Lab 6

Questions for this lab session are posted to Gradescope, available at the start of the lab.  This is a timed assignment, you have 120 minutes to complete this assignment from the time you start…

To Do

This lab consists of gradescope questions, some of which are based on the following files:

  • lab2a.c
  • lab5.c ( Use your file from the end of lab 5.  If you don’t have that file any more, you can use this one. )
  • gdb reference card – This may be useful whenever using gdb
Monday
May 22
2023

Lab 5

Lab 5 is about implementing linked lists using C structs and using them with different functions.

To Do

Follow the instructions in the Lab 5 guide to edit lab5.c:

Submit the edited program to Gradescope.  Do not spend more than 90 to 120 minutes working on this lab.

Thursday
May 18
2023

Lab 4

This lab deals with command-line arguments, setting DebugMode, and Valgrind.

To Do

Questions for this lab session are posted to Gradescope, available at the start of the lab.  This is a timed assignment, you have 120 minutes to complete this assignment from the time you start it.

Use the following programs to answer the questions:

Wednesday
May 17
2023

Lab 3

Lab 3 is about structs, and the use of structs with arrays, pointers, and functions.

To Do

Follow the instructions in the Lab 3 Guide and the comments in lab3.c to edit and complete lab3.c

Turn in the edited program to Gradescope.

The following files will be needed for this lab session:

Tuesday
May 16
2023

Lab 2

This lab is a continuation of lab 1, dealing with memory access using pointers, memory storage issues, and the consequences of misusing pointers.

To Do

Questions for this lab exercise are on Gradescope, and refer to the following two programs:

The lab assignment is timed. You have 120 minutes to complete the lab.

Monday
May 15
2023

Lab 1

Lab 1 focuses on editing, compiling, running, and debugging programs on bertvm using command-line tools, and on the relationships between variables, pointers, and addresses.  Tools used will include SecureCRT/SecureFX, vi/vim, gcc, and Gradescope.

To Do

Please review the following before lab, and ensure you can access bertvm, transfer files, and ideally build and run a simple “Hello World” application in C:

Links to the following files will be added before labs start.
( Note that the UIC web site builder does not allow direct download of source code files. 🙁  )