CSE 143: Homework 0 |
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. To succeed in this course, the first thing you should do is become comfortable with all the tools you'll be using. That way, when you have to actually write big complex programs, you can spend your time thinking about the solution and not get bogged down in learning how to use unfamiliar software.
This assignment will not be graded. We won't check that you've completed it. You don't have to do it, but as my old calculus professor used to say, "It would be good for your soul". Feel free to skip sections that are obvious to you, but be sure to at least read over this entire assignment and do the parts that you're not sure about.
The very first thing you'll want to do is become familiar with the
course's web pages. These days, we use the web as the 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.
Make 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.
If you're new to our computing environment (which may the case if you
transfered here without having taken CSE/ENGR 142), you can find some
useful tips under "Notes to incoming students" on the
CSE/ENGR 142 web page.
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 be able to get there without searching around blindly.
This course also makes heavy use of mailing lists. You should be at
least be aware of the ones that matter to you. You should probably
subscribe to those lists too, although you can optionally just check
the
hypermail archives. It is strongly recommended that
you subscribe to
Now, you're ready to learn the programming tools. We don't want to
restrict what system you use to do development; you may already
be proficient in some other tool. If you're inexperienced, you're
best off sticking to the IPL's setup: Microsoft DevStudio on Windows 95
PCs. You'll get better support from the course staff. You'll have
better access to sample executables. And code you develop for other
systems may not work under this one, which could create headaches at
grading time (TAs with headaches are unhappy TAs).
If you haven't used DevStudio (also known as Developer Studio or MSVC)
before, there are pages of tips
that can help get you started.
Once you're up and running, create a new console application and in it,
a new C++ source file called "hello.cpp". Type in the following program,
exactly as you see it here:
Here's a straightforward programming exercise to get you warmed up and
ready for the rest of the quarter.
Your task is to help your instructor cope with these mysterious
US temperatures by converting them into degrees celsius. Note that
the conversion is celsius = (farentheit - 32.0) * (5.0 / 9.0).
Your program should repeatedly prompt the user for a temperature in
degrees farentheit, and output the corresponding temperature in degrees
celsius. Here's a sample dialog with the program:
A sample solution will be available here once you (yes, you)
have had a chance to try writing this program yourself.
After completing each homework, you will be asked to turn it in
using your web browser. To give you a chance to practice using
it, we've set up a practice web page for you to use. To see how
it will work, try this:
I hope you've had a chance to read through this assignment, and carry
out the portions that you feel are necessary for your success in this
course. See you in class!
Step 1: The Web
Step 2: The Mailing Lists
cse143-announce
, since it's important
that you be aware of up-to-the-minute course information.
Step 3: A Simple C++ Program
Compile it and run it. Voilà! A working C++ program.
#include <iostream.h>
void main( void )
{
cout << "Dogs everywhere!" << endl;
}
Step 4: A Slightly More Complicated C++ Program
Your 143 instructor for this quarter is a proud Canadian and feels a
great deal of righteousness concerning the metric system. In fact,
he finds it difficult to decode temperatures given in farentheit,
often venturing out of the house inappropriately dressed.
Please enter a temperature in degrees farentheit:
72
72 F = 22.2222 C
Please enter a temperature in degrees farentheit:
110
110 F = 43.3333 C
Please enter a temperature in degrees farentheit:
18.0
18 F = -7.77778 C
In this course, your input and output should correspond as closely as
possible to our specifications. Be sure to prompt the user using
exactly the same text you see above.
To help you compare your program to the "correct" solution, here is
a sample executable for Windows 95. Save the
content of the link to a file (shift-click in netscape) and it should
run as is.
Step 5: Electronic Submission
Conclusion
cse143-webmaster@cs.washington.edu