## 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:

• numerator and denominator of the first fraction,
• numerator and denominator of the second fraction, and
• an operation sign (+, −, *, or /).
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:

• two fields for the numerator and the denominator of the first fraction,
• two fields for the numerator and the denominator of the second fraction,
• one field for the operation symbol,
• one field for the resulting fraction, presented in the usual fraction form p/q (e.g., 1/2);
• one field for the resulting fraction presented as a decimal number (e.g., 0.5).