122 Lab week 1


Labs Start On the Hour

Please arrive at 026 Kla early enough to be seated and do the following:

If you arrive late, your lab instructor will not be able to take time away from the other students to fill you in on what you missed.

Getting Ready

Your UO DuckID is a username and password, and you need to know your DuckID before you go to your lab. Your DuckID is different from the "UO Id" and "PAC" that DuckWeb asks you on its login page. (Confusing? You bet, and that's what Identity 2.0 is all about and why we'll study it in 110.)

Skill Assessment Notation:
In 110, we'll assess skill-acquisition using three levels: E (Exposure), F (Familiarity), M (Mastery).

Micro Labs on Campus: In addition to 026 Kla, Visual C++ 2005 Express Edition is installed in 013 Kla and 101 Mck, but it is not installed in other micro labs on campus.

Saving your Lab Work: The My Documents folder on the PCs in 026 Kla is cleared periodically. If you want to save a copy of your lab work, use SSH's File Transfer window to upload your files and/or folders to your shell.uoregon.edu account. Or bring a USB drive with you to your lab and keep your /110 folder stored on that drive.

122 IT Applications/DuckWare CD: Apart from Visual C++, alll the software applications we use in the lab (SSH, FireFox, Fugu, ...) is on the DuckWare CD, and can be installed on your personal computer. The DuckWare CD is available from MicroHelp, 151 McKenzie. See also: OS X applications and Parallels Desktop.

Lab Exercises

  1. Lab lists. After week 1, you will not be required to use DuckWeb to change labs; we will handle it informally instead. For labs that are full, two names may be added beyond the max, on the condition that the added students may have to watch over someone's shoulder. Students registered for a lab have first access to a computer. If your name is added to a new lab list, be sure it is deleted from the original list.

    See the 122 FAQ for further details.


  2. 122 Information Architecture: Local Host and Remote Host.

    Local Host:

    Create a folder named 122 on your local file system (or USB drive). Create a subfolder in 122 named projects. Create subfolders in 122 named examples, p1, p2, p3 and p4.

    This is your 122 root folder on the local host, and I will use the syntax /122 to refer to it hereafter.

    Remote Host:

    SSH to shell.uoregon.edu.

    Open SSH's ftp window and use it to create a public_html directory if you do not already have one. Create a 122 directory in public_html.

    This is your 122 archive on the remote server shell.uoregon.edu. It's Unix pathname is ~/public_html/122. In Unix, tilde (~) is a Unix shortcut for the pathname to your home directory.

    Use SSH to create subdirectories in 110 named p1, p2, p3, and p4. This can be done in a single step by dragging the 122 folder from the local host and dropping it into the public_html folder on the remoter server.

    Each of these subdirectories is a 122 project folder, which you will use for permanent storage of the .cpp files your create. After writing, testing and debugging your C++ programs and submitting them in Blackboard, you will ftp them to one of your 122 project "archive" directories.

    As stated on the syllabus, you must keep copies of all your work archived on uoregeon.edu until your final grade is completely resolved.

  3. Follow your Lab Instructor's directions to Start Visual C++ 2005 Express Edition and do the following:

    1. Open Using the Visual C++ IDE in FireFox. Your lab instructor will explain the basics of creating a Visual C++ Project.

    2. Your lab instructor will explain the steps necessary to download and install Visual C++ on your home computer. Detailed instructions which you can follow at home are in IDE Supplements A, at the text's website.

    3. Your lab instructor will briefly explain how to Download the C++ Examples in the Book to your home computer. On your home computer, be sure to install the examples in a folder named /110/liang/

      You can download an individual example by adding the name of the example shown in your textbook to this URL: http://www.cs.armstrong.edu/liang/cpp/example/

               http://www.cs.armstrong.edu/liang/cpp/example/Welcome.cpp

               http://www.cs.armstrong.edu/liang/cpp/example/ComputeArea.cpp

      The examples are also available on the CIS web server, cs.uoregon.edu:

               http://www.cs.uoregon.edu/classes/07F/cis122/code/Liang/examples/


    4. Right-click the link for welcome.cpp (see above) and choose Open Link New Tab.


    5. In Visual C++, create a new project named 122 and use Project > Add New Item to add a new C++ program to your 122 project.

      Copy the C++ program from the browser window, paste it into Visual C++ and save the program as /122/examples/welcome.cpp.

      Compile and run the program.


    6. Replace "Welcome to C++" with "Hello World!!". Add the using namespace std; statement. Delete all references to std:: then save, compile and run the program. If you introduce syntax errors into the program and will not compile, watch as your lab instructor carries out step D, below, to learn how to correct syntax errors.

    7. Replace main with Main. Recompile and study the error message(s). Correct the syntax error and run the program.

    8. In Firefox open ComputeArea1.cpp. Time permitting, your lab instructor will describe how the program prompts and reads input from the user. Study this example.

      Save welcome.cpp as /122/p1/greet-by-name.cpp. Modify the program to prompt the user for her/his first name, read it into a variable of type string (this will require #include <string>) and then greets the user by name. Edit/Compile/Debug/Run your program.

      If you do not have time to complete this in your lab, complete it on your own time outside of lab and class; you will submit this program as part of project 1.

The 110 Learning Environment

At the start of the term, your lab instructor will regularly stop and ask the question, "Can all of you hear me, especially in the back of the room? Can you understand what I am saying?"

It's important that you are able to follow along as the instructor presents material. If you cannot hear or understand what is being said, please raise your hand and say (polite always works) that you are having difficulty following the presentation. The lab instructor will appreciate your assistance.

Also, please keep in mind that your responsibility is to pay attention and follow the instructor's directions. In particular, you should not be reading email, surfing the web, visiting with other students, etc., during the lab. Save those activities for after the lab.