Equation - /* / Equation.java Authors: Lewis and Loftus / /...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // Equation.java Authors: Lewis and Loftus // // Solution to Programming Project 9.10 // // An object that encapsulates an equation. Equation can be of type // addition, subtraction, multiplication or division. //******************************************************************** public class Equation { private int firstNumber; private int secondNumber; private int equationType; public static final int ADDITION = 0; public static final int SUBTRACTION = 1; public static final int MULTIPLICATION = 2; public static final int DIVISION = 3; public static final String DIVISION_SIGN = "\u00F7"; public static final String[] EQUATION_TYPES = { "Addition", "Subtraction", "Multiplication", "Division" }; void setFirstNumber(int num) { firstNumber = num; } public int getFirstNumber() { return firstNumber; } void setSecondNumber(int num) { secondNumber = num; } public int getSecondNumber() { return secondNumber; } void setEquationType(int type)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Page1 / 2

Equation - /* / Equation.java Authors: Lewis and Loftus / /...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online