CS 1401 Introduction to Computer Science
Fall 2013, Lab 11

Objective. The purpose of this lab is to practice Graphical User Interfaces (GUI).

Assignment. By using a design in section 16.7 of our textbook (pp. 615-616) as a sample, create a fraction calculator. Your calculator should enable the user to type in:

After the user presses the button marked "Compute", then, depending on the operation, your calculator should display, correspondingly, the sum, the difference, etc. of the two input fractions. Display the answer both as a fraction and as a decimal.

The calculator should have 7 fields:

Once the four numbers are read, your program should:

Comment In case you have not done so already, you can download the source code for all examples from the textbook at the textbook web site: http://www.cs.armstrong.edu/liang/. Select the "Solution" tab, click on "Source Code for Examples", and follow instructions to download either one large zip file with all book examples, or navigate to a chapter and get to a specific java file.

For extra credit. Feel free to add additional graphical features to your fractions calculator. Numerous ways to add such features are described in Chapters 12, 16, and 17. The TAs will give extra credit for each such feature.

When it is due. Lab 11 is due at the beginning of the first lab section on the week of November 18, i.e.: