CS 150 - Intro to Programming - Spring 2002

| CS150 | Labs | Projects | Assignments | CodeSamples | Help Resources | Style Guide |


Lab Introduction and Assessment:

This lab exercise is designed to access your level of computer literacy and make you aware of the prerequisite skills needed to complete the lab and programming assignments. You will not be graded on this assignment, however it is assumed that you can complete the following exercise with little help. If any of these tasks are difficult for you, it is your responsibility to gain the skill necessary to complete them, no additional class or lecture time will be spent on the prerequisites. If this exercise is difficult for you, consider taking CS101 before trying this class.

Part 1 - Logging on and Launching applications

The log on procedure is the same for the machines in Darwin 16 (macs) and Darwin 19c (pcs). Enter student as the user name and leave the password field blank.
user name: student
password: leave blank

Launching Applications - Before we can use an application it must be started or launched. The best source of information on how to launch a program or any other application specific question is the help system provided with the operating system and each application. Therefore, once we launch the help system, we should be able to discover how to do all other tasks. The examples below will show you how to launch the help menus for the pc and the mac. For the rest of the lab, you should refer to the help menus for information on any task you need help with.

Launching The Help System:
PC: Click Start, click Help - the help program starts.
Mac: Click the Help Menu->choose Help Center - the help program starts.

Start the help program and leave it open so you can refer to it as needed.

Navigate to the topic on how to start a program:
pc: Click the Contents Tab -> How To... ->Run Programs
mac: Mac Help -> files and programs -> opening files and progams

Scan the help menus to become familiar with their content.

Launch your favorite browser: Access this page from the CS150 Web Site. http://www.cs.sonoma.edu/~hillyard/150ref.html

Part 2 - Working with files and folders:

All lab assignments and programming projects involve working with files and folders. The work you do with files and folders falls into two general categories:

View the help topics concerning files and folders:
pc: Click the Contents Tab -> How To... ->Work with files and folders
mac: Mac Help -> files and programs -> opening files and progams

Organizing and managing files and folders:

While you are working in the lab all your work should be stored on the hard drive (C: drive). Working from a floppy disk will cause problems later on. Each machine in the lab has a student folder that has been created for you to store your work. This folder is intended to be a temporary work area - you should copy your files from your disk to the hard drive each time you start to work and remove any files from the hard drive when you have finished (you should of course save your work to a floppy first!!). This section of the lab outlines the skills needed to work with files and folders. Complete each task below.

Create a folder:

Locate the student folder on the hard drive, open the folder and create a new folder yourLastNameLabIntro. Note the naming convention - no spaces - first word lower case, each following word upper case. For example the instructors folder would be named hillyardLabIntro. You must follow this convention when saving and submitting work.

Create and save a document:

Launch a text editor (notepad or simple text - do not use "word"). Open a new document. Enter the following text (exactly as typed - except for the name) into the document:

//Robert Hillyard - use your name here
//Lab Intro

#include<iostream>

using namespace std;

int main()
{
cout << "Will it work??" << endl;
return 0;
}

Save the document as: yourLastNameDoc1.txt in the yourLastNameLabIntro folder.
Close the text editor.

Edit and save an existing document:

Launch a text editor. Open yourLastNameDoc1.txt. Modify the program as follows:

//Robert Hillyard - use your name here
//Lab Intro

#include<iostream>

using namespace std;

int main()
{
cout << "Will it work??" << endl;
cout << "Of course it will!!" << endl;
return 0;
}

Save the document as: yourLastNameDoc2.txt in the yourLastNameLabIntro folder.
Close the text editor.

Searching for files and folders

Often you will need to find a file or folder but can't quite remember where you stored it or what the exact name of the file was. To help with this common problem both the pc and mac have programs to help you find folders or files.

pc: Start -> Find -> Files or Folders...
mac: Apple Icon -> Sherlock

Make sure you know how to use this tool!!!

Part 3 - Checking out

Check Out Procedure:

Now assume you have finished your work for the day. Before leaving the lab you need to: save your work to a floppy disk, submit your work to the server, remove files from the hard drive, empty the Trash/Recycle Bin, call the instructor, logout.

save your work to a floppy:

- if you have a disk with you, create a folder: yourLastNameLabIntro on the disk. Then move (or copy) yourLastNameDoc1.txt and yourLastNameDoc2.txt to this folder.

- if you do not have a disk with you, submit your work as noted below - then during your next lab session, ask the instructor to transfer the files to your disk. Since it is unlikely that you will have a disk on the first day be sure to follow this procedure next lab.

submit your work to the server:

Each lab and programming project will require you to submit an electronic versions of your work. There are basically two steps to completing this process. First locate the drop box (folder) on the server (see hints below). Then drag the folder you wish to submit to the drop box on the server. As noted below always verify with the instructor that your files were received - never assume anything when transferring data.

To locate the server:
pc: Start->Windows Explorer ->Network Neighborhood ->compsci_2->cs150->labs->lab1

mac: Apple Icon ->Recent Servers - Data

Submit your work to the server - you should submit a folder (yourLastNameLabIntro) with two files in it (yourLastNameDoc1.txt and yourLastNameDoc2.txt). Verify with the instructor that your work is in the drop box.

Important: You cannot retrieve, copy over, or change anything once you have placed it in the server drop box. If you wish to submit a later version of a program or lab you have already copied to the file server, add "_a" to the name of the folder containing the later version and redeposit it into the drop box. For example, if Robin Smith turns in a second version of this exercise, its folder would be named smithLabIntro_a. Try to avoid turning in multiple folders in this way, but if you must, use this naming convention so your instructor will know which version to grade.

Remove files from the hard drive:

select the files you wish to delete and drag them to the Trash/Recycle Bin or press the Delete key.

Empty Trash/Recycle Bin

pc: right click the Recycle Bin icon -> select Empty Recycle Bin
mac: Special Menu ->Empty Trash

Final Check Out:

When you have finished the lab you must have the instructor check the state of your machine and verify that your files were dropped before you leave the lab - if this procedure is not followed, one point will be deducted from that lab. To facilitate this process, you should have the desk top in the following configuration: Have a window open that shows the content of the student folder on the hard drive and a window that shows the contents of your disk. All other applications should be closed and the Trash should be empty. When ready call the instructor.

Log Out:

Close all remaining applications and log out.

pc: Start -> Shut Down - or - ctrl+alt+delete -> Shut down
mac: Special Menu ->logout