CSE 143 Summer 2000

Homework 0

Due: Electronic submission by 10 pm, Wednesday 6/21.  Paper receipt due in quiz section on Thursday 6/22.

 

This assignment will not be a big factor in your grade.  But you should do it anyway.  Only Part 5 will be checked (and graded generously.)

Starting a new course like this one can be daunting. You'll be learning a new programming language, and (possibly) a new set of tools to interact with that language. The first thing you should do is become comfortable with the tools you'll be using. That way, when you have to actually write bigger, more complex programs, you can spend your time thinking about the solution and not get bogged down with unfamiliar software.

Summary

Step 1: The Web

The first thing you should do is become familiar with the course's web pages. The web is a primary means of disseminating course information. You are expected to look to the web for answers before you ask the staff, and to check it regularly for updated information.

Be sure you're pretty handy with some web browser. Then go to the course's main web page. Read all the information labeled as "required reading". You are responsible for this information - you are expected to know, understand and follow all the rules and regulations for this course.

Browse around the rest of the web pages, and get a sense for where everything is. When the time comes to find information fast, you'll want to have a general idea of where to look.

Step 2: Mailing Lists and Newsgroups

Besides the web, this course also uses several mailing lists and newsgroups.  Everyone must subscribe to cse143-announce.  This is a low-traffic list for important announcements from the course staff.

The newsgroup uwash.class.cse143.bboard is for general discussion about course topics.  You should check this regularly.  Feel free to contribute to the discussion and post questions, answers, or other course-related notes here.

There are several other mailing lists besides cse143-announce for more specialized discussions.  You should be at least be aware of the ones that matter to you.  You can subscribe to those lists, or you can optionally just check the hypermail archives.

Step 3: A Simple C++ Program

Next are the programming tools. You are free to use any modern C++ implementation, but if you're new to computing, you're probably best off using the IPL's setup: Microsoft Visual C++ 6.0 on Windows PCs. You'll get better support from the course staff, and this is the system that is used to compile your programs when you turn them in.  If you haven't used Visual Studio before, look on the CSE 143 and CSE 142 web pages for tips.

Create a new, empty console application (File > New... > Win32 console application) and, in it, a new C++ source file named bugs.cpp. Type in the following program, exactly as you see it here (but with a different message if you like):

		#include <iostream.h>

		int main( )
		{
			cout << "Bugs everywhere!" << endl;
		}

Compile and run it.  If you encounter any errors, fix them.

Step 4: A Slightly More Complicated C++ Program

Here's another straightforward programming exercise.  Give it a try.

Write a simple C++ program to convert Fahrenheit temperatures to Celsius. It should repeatedly prompt the user for a temperature in degrees Fahrenheit, and output the corresponding temperature in degrees Celsius.  You should use C++ stream I/O (cout and cin; see text, Appendix A), not C's printf and scanf. The conversion is Celsius = (Fahrenheit-32.0) * (5.0/9.0). Here's a sample dialog with the program:

		Please enter a temperature in degrees Fahrenheit: 
		72
		72 F = 22.2222 C
		Please enter a temperature in degrees Fahrenheit: 
		110
		110 F = 43.3333 C
		Please enter a temperature in degrees Fahrenheit: 
		18.0
		18 F = -7.77778 C

Step 5: Electronic Submission

After completing homework assignments, you must turn them in using your web browser. For this assignment, you should turn in the C++ program from step  4, above.

  1. Start with a file containing the C++ program you created in step 4.
  2. Turn it in using this turnin form. Follow the directions on the form itself.
  3. After you turn in your program, you should see a "receipt" which you should print out, staple, and hand in during your quiz section.  This is all that you need to turn in - you don't need to hand in a floppy disk, for example - but you must turn in the receipt to get your homework graded.