Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit cba8190e4e796e74edf4b4f6783518ec5dbd54b6 unknown committed Oct 21, 2010
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="classes"/>
+</classpath>
@@ -0,0 +1,2 @@
+classes/**
+.svn
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>mathfacts</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,10 @@
+src.dir=src
+build.dir=build
+classes.dir=classes
+common.build=../builds
+lib.dir=../jars
+major.revision=0.9
+revision=0
+manifest.title=MathFacts
+manifest.vendor=Newellista
+manifest.main-class=org.newell.mathfacts.MathFactsPopupFrame
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project name="mathfacts" basedir="." default="build">
+ <property file="build.properties" />
+
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${classes.dir}" />
+ </target>
+
+ <target name="compile" >
+ <mkdir dir="${classes.dir}" />
+ <javac srcdir ="${src.dir}"
+ destdir="${classes.dir}"
+ compiler="javac1.5" >
+ </javac>
+ </target>
+
+ <target name="build" depends="compile">
+ <mkdir dir="${build.dir}"/>
+ <tstamp>
+ <format property="TODAY" pattern="yyyy-MM-dd hh:mm:ss" />
+ </tstamp>
+ <jar destfile="${build.dir}/${ant.project.name}-${major.revision}.${revision}.jar" basedir="${classes.dir}" >
+ <manifest>
+ <attribute name="Built-By" value="${user.name}"/>
+ <attribute name="Implementation-Title" value="${manifest.title}"/>
+ <attribute name="Implementation-Version" value="${major.revision}.${revision} ${TODAY}"/>
+ <attribute name="Implementation-Vendor" value="${manifest.vendor}" />
+ <attribute name="Main-Class" value="${manifest.main-class}" />
+ </manifest>
+ </jar>
+ <copy file="${build.dir}/${ant.project.name}-${major.revision}.${revision}.jar" tofile="${lib.dir}/${ant.project.name}.jar" />
+ <copy file="${build.dir}/${ant.project.name}-${major.revision}.${revision}.jar" todir="${common.build}" />
+ </target>
+
+ <target name="install" depends="build" >
+ <copy file="${build.dir}/${ant.project.name}-${major.revision}.${revision}.jar" tofile="${common.build}/${ant.project.name}.jar" />
+ </target>
+
+ <target name="clean-build" depends="clean,build" />
+</project>
Binary file not shown.
@@ -0,0 +1,21 @@
+#
+#Thu Mar 29 08:17:54 MDT 2007
+Operation.1=2
+Operation.0=1
+SecondUpperBound.1=20
+SecondUpperBound.0=20
+NumberOfProfiles=2
+FirstLowerBound.1=1
+FirstLowerBound.0=1
+NumberOfProblems.1=50
+NumberOfProblems.0=50
+SecondLowerBound.1=1
+FirstUpperBound.1=20
+SecondLowerBound.0=1
+FirstUpperBound.0=20
+FontSize.1=18
+CarryFlag.1=1
+Name.1=Subtraction
+Name.0=Addition
+CarryFlag.0=1
+FontSize.0=18
@@ -0,0 +1,42 @@
+package org.newell.mathfacts;
+
+
+public class AdditionProblem extends MathProblem
+{
+ private static final String OPERATION = "+ ";
+
+ public AdditionProblem( ProblemConstraints problemConstraints )
+ {
+ super( problemConstraints );
+ }
+
+ protected void generateProblem()
+ {
+ firstNumber = getRandomInteger( getProblemConstraints().getFirstLowerBound(), getProblemConstraints().getFirstUpperBound() );
+ secondNumber = getRandomInteger( getProblemConstraints().getSecondLowerBound(), getProblemConstraints().getSecondUpperBound() );
+
+ if( secondNumber > firstNumber )
+ {
+ int tmp = firstNumber;
+ firstNumber = secondNumber;
+ secondNumber = tmp;
+ }
+ }
+
+ public boolean isCorrect()
+ {
+ return false;
+ }
+
+ @Override
+ public int evaluate()
+ {
+ return firstNumber + secondNumber;
+ }
+
+ @Override
+ public String getOperation()
+ {
+ return OPERATION;
+ }
+}
Oops, something went wrong.

0 comments on commit cba8190

Please sign in to comment.