CSE 221 Closed Lab 8 Instructions


Table of Contents


1. Objectives

To implement the two global operations Display_Width and Load_Naturals in the test driver Justified_Display.cpp.


2. Set Up

Two students should work together at ONE workstation.

  1. Login.


  2. In an xterm window, create a new directory (folder) for this closed lab by typing the "make directory" command:
         mkdir closed-lab08
  3. Change or move to the new directory (folder) for this closed lab by typing the "change directory" command:
         cd closed-lab08
  4. Copy the catalog for this closed lab by typing the "copy" command:
        cp -R /class/sce/now/221/closed-labs/catalogs/closed-lab08/*  . 
    NOTE: The period . is part of the command. It denotes the current directory (folder).

  5. To see what was copied, type the "list" command:
         ls
    You should see

3. Implementation

  1. Open the file Justified_Display.cpp in xemacs by typing the command:
         xemacs Justified_Display.cpp &
  2. In the Global Context section of Justified_Display.cpp, fill in the template instantiation to create a component called Sequence_Of_Naturals which is an appropriate customized verion of Sequence_Kernel_1a_C.


  3. Fill in the procedure bodies for Display_Width and Load_Naturals.

4. Compile and Test

  1. Do a Build Project for Justified_Display.cpp. Correct all syntax errors.
  2. Once all syntax errors are corrected, test your implementations by doing a Justified_Display < cl08-data.txt command in a terminal window.


5. Proctor Check-off

When you are satisfied that your implementation is working correctly, raise your hand and one of the proctors will come check it. Then you are finished with the closed lab.