To be completed in your first lab session on August 30/31, 2001
This lab will get you started with the machines and the tools that we will be using this semester.
Welcome to the CS 101 Laboratory! Throughout the semester, this laboratory will give you the experience necessary to fully master the concepts introduced during the lecture. If you ever have any questions, raise your hand to flag down a laboratory instructor.
There should always be a handout when you come to labs, which will be a check-off sheet for the day's experiments. This sheet enables the laboratory instructors to track your progress during that lab. Each time you reach a check-off symbol, 4 (other than this one) you should call a laboratory instructor over to examine your work for correctness, and to check-off your completion of the lab to that point. Do not check off the item yourself, as you will have to turn this sheet in at the end of the lab. The sheet serves as our official record of your attendance and progress in the CS 101 laboratory.
You will always need to "logon" to the machine, which means to start it up and get it running with the proper settings for performing the lab activities.
How to "logon":
cpplab.
To
display the files on the K drive, click on the K drive icon in the left
subwindow of the Windows Explorer. The right subwindow displays
files and subdirectories in the top-level of the K drive. To examine
a subdirectory, you can just click on the subdirectory folder. cpplab
subdirectory on the K drive. This directory may be left from a
previous lab. The first thing to do before starting a lab is to
delete this directory and recreate it so that you start with an empty
directory. To delete a directory, simply click on the directory to
select it, then using the "File" pull-down menu, select the
"Delete" option. You will be asked to confirm the
name of the directory you are deleting. You should respond
"OK." When deleting a directory, there is usually an
additional dialog box to confirm that you really want to delete these
files. Usually, you want to pick the "Yes to All" response
for this dialog box. cpplab
.
Show your laboratory instructor that you have completed this step. 4The Internet is the so-called "information superhighway." It's millions of computers that are loosely connected. Any computer is capable of talking to any other computer on the Internet. The files you will be using for today's lab are available on a machine located elsewhere at the University.
www.cs.virginia.edu/cs101/labs/lab00
K:\cpplab\readme.txt
readme.txt
will be on your hard disk. lab00.exe
in your browser window. Because this file is not a text file but an
executable file, the browser will automatically open a "Save As"
dialog. Use this dialog to save lab00.exe
to the same directory
on your local disk. K:
cd cpplab
dir
K:
command changes your working drive to the k: drive, which is where you
will be storing your work in lab. This is the hard disk on your
computer. cd
command
changes your working directory to the cpplab
directory. dir
command produces as output a listing of the contents of the current
working directory. It also indicates how much space is available on
the disk for copying other files. readme.txt
from the command line. Run the following command to examine the
contents of an individual file and then get a check-off from your lab TA.
4type readme.txt
lab00
dir
) to see
that the files hello.cpp
and bigfile.cpp
are present. K:\cpplab\hello.cpp
and hit enter. You may need to use the backspace key to erase any
letters which are already present. This will open a new window
within MS Visual C++ that contains a short C++ program. hello.cpp
file and note the small icon of a document in the top-left corner.
Click on this icon to expose a menu for this window. Select the
Close option to close hello.cpp.
K:\cpplab\bigfile.cpp.
This file is larger than its window. Notice the gray vertical bar
on the right- hand side of the bigfile.cpp
window. Move
the cursor to the down-arrow below this vertical bar and hold down the
mouse button. This should move you down through the file. Now,
notice the square box near the top of this vertical bar. Drag
this box down an inch. This should also move you through the file.
Drag this box to the top of the vertical bar. This should move you
to the top of the file. These Windows controls are called scroll
bars. Show your laboratory instructor that you can use scroll
bars. 4
k:
cd \cpplab
copy hello.cpp a: