CS 101 (Fall 2002)
Lab 1: Expressions, Functions, and Procedural Abstraction


Authors: Jonathan D. Wetherbee
Lab Assigned Design Due
(In class)
10 AM
Implement
(In Lab)
Demo
(In Lab)
Lab Due
(In class)
Friday
10 AM
9 Sep None 10-11 Sep 17-18 Sep 20 Sep

Goals:

By the end of this lab, you should...

Before starting:

[[[download project folder for PC]]]

Assignment:

You're a programmer for Texas Instruments and the new high-tech CS101 Calculator is about to be released. Your job in this lab is to code the mathematical and boolean functions into the calculator. You will write a MyGruntWork class that implements GruntWork.
  1. Begin by opening the MyGruntWork.java file in Emacs. (When you choose "Open File..." from the Files menu, a message will appear at the bottom of the screen asking which file you wish to open. Please see a TA if you need assistance.) Supply the necessary header information (name, lab section, etc.). This is the only file you are allowed to modify for this lab. Look over the file carefully before modifying it! Please note the following:

    The JavaDoc (documentation) for this lab details the input parameters and return values that each method should compute.

    Hint: To avoid making the same mistakes over and over, test very frequently as you go. That is, type in the body of a procedure, compile, execute, and verify the results, and then go on to the next problem.  After you get the hang of it, you can write more code before you test.  Detailed instructions for running your program are listed below.

  2. Execute your program by opening Lab1.java (in the same folder as MyGruntWork.java) and compiling it (choose "Compile" under the "JDE" menu). After the compile has finished successfully (you will see a message saying so), you may run the program by choosing "Run App" from the "JDE" menu.

    You should see a calculator interface. Fully test each method to ensure the high-tech CS101 Calculator is ready to be released.


Run the SAMPLE SOLUTION!!


What To Turn In:

For every CS101 lab you turn in, you should fill in a cover sheet and staple it on the front of your lab. Attach a paper printout of the following:

  1. your MyGruntWork.java file containing the methods you wrote
This must be turned in by the start of class on the due date.  Check that you have header information (name, email, date, and lab section) at the top of the file, and you must have demonstrated your lab to have the printout graded.

If you need help printing, ask a TA or refer to the help homepage, which has detailed instructions for how to print from the labs.



Last modified 08:25:32 CDT 12 September 2002 by Ron K. Cytron