CS 46A Lab 4, Projects and Workspaces

Problems

Name:
CS46A Instructor:

Create a workspace called Continents.

1. Create and test a DOS Console application project called Continents1 inside the Continents workspace. This should print a greeting to each of the seven continents:

Hello, Asia
Hello, Antarctica
etc.

When you're satisfied the program is working, rebuild a release version of it.

There are two ways to obtain a hardcopy of your program's output. First, start a word processor (e.g. Word or Word pad) document called Lab4. Type your name and your CS46A instructor's name at the top of the document.

Select "Command Prompt" from the desktop's Start menu. Select "Properties" from the console window's shortcut menu. (Right mouse click on the top border of the console window to display its shortcut menu.) Select the "Options" tab. Make sure the "Quick Edit Mode" and "Insert Mode" check boxes are checked. This allows you to do cut and paste in a console window. You can also make other customizations to your console window using this dialog:

Change the console's current directory to the directory containing the release version of Continents1. How many bytes is the executable?

# bytes =

Run Continents1 by typing the name of its .exe file to the console's prompt. You should see the greetings printed. Select the program output. Select Edit/Copy-Enter from the console window's shortcut menu. This copies the selected text to the clipboard. Paste the contents of the clipboard into your word processor document.

Make the console window active again (i.e. click in it with the left mouse button). Press the "Print Scrn" key while holding down the "Alt" key. This copies a snapshot of the console window into the clipboard. Paste the clipboard contents into your word processor document just below the program output.

2. Create another project called Continents2 in your Continents workspace. This project should be an MFC App Wizard project that displays greetings to the seven continents in the application's child windows (release version). Take a snapshot of the running application and paste it into your Lab4 document.

3. Create another project called Continents3 in your Continents workspace. This project should be another console application project. Create a web page that displays greetings to all seven continents. Open the web page using a web browser. Take a snapshot of the and paste it into your Lab4 document.

Print and submit the Lab4 document.

Instructors often also want a floppy containing the executable files you created. Insert a floppy disk. Start Windows NT Explorer from the Start menu on the desktop. Locate the executable files for Continents1 and Continents2 in the right pane of the Explorer's window. Drag them to the Floppy (A:) icon in the left pane of the Explorer's window. Click the Floppy (A:) icon. You should see the executable files you just copied displayed in the right pane. Make sure both executables can run from the floppy disk. Eject the floppy, put a label on it, write your name on the label, and submit it.