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.
- Login.
- In an xterm window, create a new directory (folder) for this closed lab by
typing the "make directory" command:
mkdir closed-lab08
- Change or move to the new directory (folder) for this closed lab by
typing the "change directory" command:
cd closed-lab08
- 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).
- To see what was copied, type the "list" command:
ls
You should see
- Two files: Justified_Display.cpp and cl8-data.txt
- four directories: AI, AT, CT, and
CI
3. Implementation
- Open the file Justified_Display.cpp in xemacs by typing the command:
xemacs Justified_Display.cpp &
- 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.
- Fill in the procedure bodies for Display_Width and
Load_Naturals.
4. Compile and Test
-
Do a Build Project for Justified_Display.cpp. Correct all
syntax errors.
- 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.