122 Lab week 5


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.


Lab Exercises

  1. Open Using Visual C++.

    Review slides 15-17 (eof-controlled while loops) in the ch. 4 PPTs.

    Study
    subtractionTutorLoop.cpp, which we covered in this week. Ask your lab instructor any questions you have about it.

  2. five-six-props-eof.cpp.

    Follow your lab instructor's directions to edit/compile/run/ this program:

    Open a project in Visual C++ and
    add a file named five-six-props-eof.cpp to the project. Copy the c++ code from your five-six-props.cpp program from project 2, paste it into five-six-props-eof.cpp and save it. Compile and test the program.

    Add an eof-controlled while loop to five-six-props-eof.cpp so that it generates this I/O specification:
    enter an integer (ctrl-z, Enter to exit): 10
    is 10 divisible by 5 and 6? false
    is 10 divisible by 5 or 6? true
    is 10 divisible by 5 or 6, but not both? true
    
    enter an integer (ctrl-z, Enter to exit): 30
    is 30 divisible by 5 and 6? true
    is 30 divisible by 5 or 6? true
    is 30 divisible by 5 or 6, but not both? false
    
    enter an integer (ctrl-z, Enter to exit): [user enters ctrl-z]
    exiting . . 
    

/etc

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.


The 122 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.