CSE 203 Closed Lab 1 Instructions

Table of Contents


1. Objectives

To log into the CSE Networked Windows PC Environment, establish a secure password there, copy existing Phrogram programs to your account, and modify your first Phrogram program.


2. Set Up

  1. Two students should work together at one workstation.
  2. Make sure both students follow the instructions given in the printed document, "The CSE Networked Windows PC Environment - Getting Started in CSE 203".
  3. In the second student's account, follow the instructions given below in section 3, Method.

3. Method

  1. One thing you might wonder about is where you can work on Phrogram programs outside of class time.
    1. The answer to this question is available on the world-wide web (WWW), so you'll want to open a web browser now.  Choose among Internet Explorer, Mozilla Firefox, and Netscape 7.2.  All these are available through icons on your desktop.  If your choice is not already set as your default browser, you will probably want to answer "Yes" to make it so.
    2. Where on the WWW will we find this answer?  On Carmen!  Visit carmen.osu.edu.  (Some time later you may want to set Carmen as your home page in your browser.)
    3. Log in to Carmen and select CSE 203.  Read the "Welcome!" message in News.
    4. Under Content (I. Getting Started), visit "CSE Lab Sites".
    5. Having answered the question, you may now either minimize or close your browser.
  2. By the way, "Phrogram" is pronounced so that it sounds a lot like "program", only the initial sound is "F", not "P".  This pronunciation is according to the lead author, Jon Schwartz.  It's a mystery to me, then, why the logo for Phrogram is a frog!  Or, maybe it's a froag?
  3. At long last, it's time to open the Phrogram IDE (Integrated Development Environment).  IDE is just a fancy name for the place where you can create, change, and edit programs.  Double-click the Phrogram icon on your desktop to launch the Phrogram IDE.
  4. Now, let's configure Phrogram the way we want it to look in this course: from the View menu, select View Advanced Options.  At the bottom of the window, place the mouse between the "Messages" sub-window and the one above it until the mouse cursor looks like a horizontal bar with two opposite-pointing up-and-down arrows coming out of it.  Drag the edge of the "Messages" sub-window up a little way toward the center of the window so that the "Messages" sub-window expands a little.  You may also need to expand the Files view in the right-hand end of the Phrogram window to the left to make it larger.
  5. At last we're ready to do some programming.
    1. In the window with tab label "Untitled.kpl" is the skeleton for a Phrogram program.  (The special filename extension used for Phrogram programs is "kpl".)
    2. On any line of a Phrogram program, the stuff beginning with two slashes, "//", shown in green, is a comment.  The Phrogram compiler ignores comments.  Comments are for the benefit of people when they read programs.  Read the comments in this program now.
    3. Now change the comment on the first line of this program to read "Author: " followed by your two names.  (You can drag the mouse over any part of a program you want to replace, then just start typing: the new typing will replace the selection you made by dragging the mouse.)
    4. Change the comment on the second line to read "Date: " followed by today's date.
    5. Delete the comment on the third line of the program by dragging the mouse to select the entire line and tapping the Delete key.
    6. Change the "word" 'MyNewProgram' to 'Display_a_Window'.
    7. Now find the blue rightward-pointing triangle image of run button in Phrogram's toolbar, and click it to save and run your first Phrogram program.
      1. In the Save As . . . dialog box, double-click "0) My Own" to open the folder in which you may store "my very own" Phrogram programs.
      2. Now click the Save button to save Display_a_Window in that folder.
      3. Now observe what happens when this first program actually runs: . . . Nothing!
    8. Okay, nothing happened when we ran our first program because we didn't give it any instructions to perform in method Main().
    9. Let's tell our program to do something in Main(): replace the entire comment (including those two slashes, "//") that appears below "Method Main()" and above "End Method" with the following line:
      Status( "Our first Phrogram program" )
    10. Now, click the blue Run triangle image of run button to save and run our program.  The program saves to the network drive automatically because we've already given it a title.  Right after saving, the program runs.  What happens?
    11. Where did our phrase "Our first Phrogram program" go in this window?  That place is called the window's Status bar.
    12. Where did the name of our program ("Display_a_Window") go?  That place is called the window's title bar.
    13. The title bar says that our program has stopped.  It isn't going to do anything more.  After looking at it for a while if we wish, we should close a stopped program's window before going on to other things and forgetting about it.  We can do so in either of two ways: click the button image of exit button below the title bar that has the upward-pointing arrow that looks something like a house top or click the close button image of close button marked with an X at the right-hand end of the title bar.
    14. After you typed "Status(", you probably noticed that a window looking like a yellow post-it note came on the screen.  This window described the Status method.  You can see it again just by moving the mouse pointer so that it hovers over the word "Status".  This window is called a "hover caption".  Hover captions in a programming environment are one of the features of Microsoft's Intellisense.  Which of the things said in this window match your experience using the Status method?
  6. If you close the Phrogram IDE with your program (Display_a_Window) still open in a tab, then, the next time you start Phrogram, it will come up in a tab automatically.  You can close Phrogram in either of two ways: click the close button image of close button marked with an X at the right-hand end of the title bar or select Exit Phrogram from the File menu.
  7. You should be able to find file "Display_a_Window.kpl" by opening "Z (User Data)" on the desktop, and then opening "My Phrogram Files" and "0) My Own".
  8. You should also be able to use your OSU web mail account to send your partner the file Display_a_Window.kpl as an attachment to an email.
  9. Your partner should be able to log in and, from her/his OSU web mail account, save this attachment in her/his own "0) My Own" folder.

4. Proctor Check-off

When you are satisfied that you have successfully followed the method, raise your hand and one of the proctors will check your work. Then you are finished with the closed lab.  It's usually better for your education not to leave the classroom very early.  Instead, start in on the homework that's due at the beginning of the next class.