Closed Thread
Results 1 to 5 of 5

Thread: Need Help Beta Testing!! Calculator 4.0

  1. #1
    Blmaster is offline Learning Programmer
    Join Date
    Jul 2008
    Posts
    50
    Rep Power
    14

    Need Help Beta Testing!! Calculator 4.0

    Hello, I would like some help BETA Testing an application that I have made, Calculator 4.0 BETA.
    I have posted all the other versions in the Java Tutorial but I would like this to be bug-free before I post version 4 because I want everyone who sees it there to know that its gonna work.

    So please tell me if anything is wrong with it... and if you know how to fix it... tell me that too. Refer to the calculator that your os provides as an example of what is right or wrong.

    I have the Code here but i have also attached the .jar file too! so u can just download that and run it. Keyboard functionality has been added.

    Code:
    /*
    	Title: Calculator App
    	Created: August 7, 2008
    	Author: Blmaster
    	Comments:
    		Wanted to see if I could make it.
    		Last Edited: August 20, 2008
    	Changes:
    		See Bottom of Code ||
    		*******************\/
    */
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    
    public class Calculator implements ActionListener, ItemListener, KeyListener		{
    	private final String VERSION = "4.0 BETA";
    //Initializes window, buttons, panels, textfield and other variables
    	JFrame window = new JFrame("Calculator " + VERSION);
    	JMenuBar Menu = new JMenuBar();
    	JMenu mnuProgram, mnuView, mnuHelp;
    	JMenuItem mnuReset, mnuExit, mnuAbout;
    	JCheckBoxMenuItem mnuShowCalc;
    	JPanel pnlBottom, pnlBackspace, pnlClear, pnlButtons, pnlCalculation;
    	JLabel lblFirst, lblOperator, lblSecond, lblEqual, lblResult;
    	JTextField txtDisplay;
    	JButton buttons[] = new JButton[23];
    	
    	final short MAX_INPUT = 30;
    	final float DIVIDE_ZERO_ERROR = (float)-.04060802;
    	final float ERROR = (float)-.04060801;
    	String tempNum;
    	String sign;
    	String F;
    	String S;
    	String R;
    	double number1, number2, result;
    	boolean decimalUsed, secondNum, makeSecondTrue, lblSecondNum;
    //constructor for Calculator class
    	Calculator() {
    		//Window Properties
    		window.setSize(306, 210);
    		window.setLocation(470, 290);
    		window.setLayout(new BorderLayout());
    		window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    		//window.setResizable(false);
    		
    //Making the Menu and Menu Items and adding action listener/item listener
    		mnuProgram = new JMenu("Program");
    		mnuView = new JMenu("View");
    		mnuHelp = new JMenu("Help");
    		Menu.add(mnuProgram);         
    		Menu.add(mnuView);
    		Menu.add(mnuHelp);
    		mnuReset = new JMenuItem("Reset");
    		mnuExit = new JMenuItem("Exit");
    		mnuShowCalc = new JCheckBoxMenuItem("Show Calculations");
    		mnuAbout = new JMenuItem("About Calculator");
    		mnuProgram.add(mnuReset);
    		mnuProgram.add(mnuExit);
    		mnuView.add(mnuShowCalc);
    		mnuHelp.add(mnuAbout);
    		mnuReset.addActionListener(this);
    		mnuExit.addActionListener(this);
    		mnuShowCalc.addItemListener(this);
    		mnuAbout.addActionListener(this);
    		
    		//Making Panels
    /*		pnlButtons holds all the Buttons Except for Backspace, CE, and C buttons
    		pnlClear holds CE and C Buttons
    		pnlBackspace holds the Backspace Button
    		pnlBottom holds all the other Panels so I can put them all at the bottom of the window
    		pnlCalculations holds all the Labels for the Show Calcualtions function			*/
    		pnlBottom = new JPanel();
    		pnlBackspace = new JPanel();
    		pnlClear = new JPanel();
    		pnlButtons = new JPanel();
    		pnlCalculation = new JPanel();
    		
    		//Setting Layouts for the Panels and other Properties
    		pnlBottom.setLayout(new BorderLayout());
    		pnlButtons.setLayout(new GridLayout(4, 5, 2, 2));
    		pnlClear.setLayout(new GridLayout(1, 2, 2, 2));
    		pnlBackspace.setLayout(new GridLayout(1, 2, 2, 2));
    		pnlCalculation.setLayout(new FlowLayout(FlowLayout.CENTER));
    		pnlBottom.setBackground(new Color(200, 200, 200));
    		
    		//Making Labels and adding them to pnlCalculation Panel.
    		lblFirst = new JLabel();
    		lblOperator = new JLabel();
    		lblSecond = new JLabel();
    		lblEqual = new JLabel();
    		lblResult = new JLabel();
    		pnlCalculation.add(lblFirst);
    		pnlCalculation.add(lblOperator);
    		pnlCalculation.add(lblSecond);
    		pnlCalculation.add(lblEqual);
    		pnlCalculation.add(lblResult);
    		
    		//Text Field Properties
    		txtDisplay = new JTextField("0");
    		txtDisplay.setEditable(false);
    		txtDisplay.setHorizontalAlignment(JTextField.TRAILING);
    		txtDisplay.setBackground(Color.WHITE);
    		txtDisplay.setOpaque(true);
    		txtDisplay.addKeyListener(this);
    		
    		//Making Buttons and adding to Panel Buttons
    		buttons[0] = new JButton("0");
    		buttons[10] = new JButton(".");
    		buttons[11] = new JButton("=");
    		buttons[12] = new JButton("/");
    		buttons[13] = new JButton("*");
    		buttons[14] = new JButton("-");
    		buttons[15] = new JButton("+");
    		buttons[16] = new JButton("sqrt");
    		buttons[17] = new JButton("%");
    		buttons[18] = new JButton("1/x");
    		buttons[19] = new JButton("+/-");
    		for(int i=7; i<10; i++)	{
    			buttons[i] = new JButton(String.valueOf(i));
    			pnlButtons.add(buttons[i]);
    		}
    		pnlButtons.add(buttons[12]);
    		pnlButtons.add(buttons[16]);
    		for(int i=4; i<7; i++)	{
    			buttons[i] = new JButton(String.valueOf(i));
    			pnlButtons.add(buttons[i]);
    		}
    		pnlButtons.add(buttons[13]);
    		pnlButtons.add(buttons[17]);
    		for(int i=1; i<4; i++)	{
    			buttons[i] = new JButton(String.valueOf(i));
    			pnlButtons.add(buttons[i]);
    		}
    		pnlButtons.add(buttons[14]);
    		pnlButtons.add(buttons[18]);
    		pnlButtons.add(buttons[0]);
    		pnlButtons.add(buttons[10]);
    		pnlButtons.add(buttons[11]);
    		pnlButtons.add(buttons[15]);
    		pnlButtons.add(buttons[19]);
    		
    		//Creating Backspace Button and adding it to Backspace panel
    		buttons[20] = new JButton("BackSpace");
    		pnlBackspace.add(buttons[20]);
    		
    		//Creating Clear Buttons and adding it to Clear panel
    		buttons[21] = new JButton("CE");
    		buttons[22] = new JButton(" C ");
    		pnlClear.add(buttons[21]);
    		pnlClear.add(buttons[22]);
    		
          /*Adds Action Listener to every button 
    		and adds color to all the numbered buttons
    		plus the decimal and all the other buttons 
    		to red												*/
    		for(int i=0; i<buttons.length; i++)	{
    			buttons[i].addActionListener(this);
    			if(i<11 || (i>15 && i<20))
    				buttons[i].setForeground(Color.blue);
    			else
    				buttons[i].setForeground(Color.red);
    		}
    		
    		//Adds Panels to window and shows window
    		pnlBottom.add(txtDisplay, BorderLayout.NORTH);
    		pnlBottom.add(pnlBackspace, BorderLayout.WEST);
    		pnlBottom.add(pnlClear, BorderLayout.EAST);
    		pnlBottom.add(pnlButtons, BorderLayout.SOUTH);
    		window.add(Menu, BorderLayout.NORTH);
    		window.add(pnlCalculation);
    		window.add(pnlBottom, BorderLayout.SOUTH);
    		window.setVisible(true);
    		pnlCalculation.setVisible(false);
    		
    		//Clears the screen. sets Variables to default.
    		Clear();
    	}
    	
    	public void actionPerformed(ActionEvent click)	{
    		//	Adding Digits to Screen
    		for(int i=0; i<10; i++)	{
    			if(click.getSource() == buttons[i])
    				addDigit(String.valueOf(i));
    		}
    		//	Adding Decimal Point to Screen
    		if(click.getSource() == buttons[10])	{
    			if(!decimalUsed)	{
    				addDigit(".");
    				decimalUsed = true;
    			}
    		}
    		for(int i=11; i<buttons.length; i++)	{
    			if(click.getSource() == buttons[i])	{
    				switch(i)	{
    					case 11:
    						Calculate("=");// EQUAL
    						break;
    					case 12:
    						Calculate("/");//	DIVDIE
    						break;
    					case 13:
    						Calculate("*");//	MULTIPLY
    						break;
    					case 14:
    						Calculate("-");//	SUBTRACT
    						break;
    					case 15:
    						Calculate("+");//	ADD
    						break;
    					case 16://	SQUARE ROOT
    						sqrt();
    						break;
    					case 17://	%
    						percent();
    						break;
    					case 18://	1/x
    						divideByX();
    						break;
    					case 19://	+/-
    						signChange();
    						break;
    					case 20://	BACKSPACE
    						Backspace();
    						break;
    					case 21://	CE
    						ClearExisting();
    						break;
    					case 22://	C
    						Clear();
    						break;
    				}
    			}
    		}
    		// Program -> Reset
    		if(click.getSource() == mnuReset)	{
    			Clear();
    			window.setSize(306, 210);
    			pnlCalculation.setVisible(false);
    			mnuShowCalc.setState(false);
    			JOptionPane.showMessageDialog(null, "Reset!\nEverthing is back to default." 
    			, "Reset", JOptionPane.INFORMATION_MESSAGE);
    		}
    		// Program -> Exit
    		if(click.getSource() == mnuExit)	{
    			System.exit(0);
    		}
    		// Help -> About
    		if(click.getSource() == mnuAbout)	{
    			showAboutDialog();
    		}
    		txtDisplay.requestFocus();
    	}
    
    
    /*	If the Menu Checkbox is clicked it will make the pnlCalculation visible and the window
    	bigger so the user can see it too. if it is unseleceted it will go back to normal			*/
    	public void itemStateChanged(ItemEvent click)	{
    		if(click.getSource() == mnuShowCalc)	{
    			if(click.getStateChange() == ItemEvent.SELECTED)	{
    				window.setSize(306, 235);
    				pnlCalculation.setVisible(true);
    			}	else {
    				window.setSize(306, 210);
    				pnlCalculation.setVisible(false);
    			}
    		}
    	}
    	
    	public void keyPressed(KeyEvent e)	{
    		int key = e.getKeyChar();
    		System.out.println(key);
    		switch(key)	{
    			case KeyEvent.VK_0:
    				addDigit("0");
    				break;
    			case KeyEvent.VK_1:
    				addDigit("1");
    				break;
    			case KeyEvent.VK_2:
    				addDigit("2");
    				break;
    			case KeyEvent.VK_3:
    				addDigit("3");
    				break;
    			case KeyEvent.VK_4:
    				addDigit("4");
    				break;
    			case KeyEvent.VK_5:
    				addDigit("5");
    				break;
    			case KeyEvent.VK_6:
    				addDigit("6");
    				break;
    			case KeyEvent.VK_7:
    				addDigit("7");
    				break;
    			case KeyEvent.VK_8:
    				addDigit("8");
    				break;
    			case KeyEvent.VK_9:
    				addDigit("9");
    				break;
    			case KeyEvent.VK_PERIOD:
    				if(!decimalUsed)	{
    					addDigit(".");
    					decimalUsed = true;
    				}
    				break;
    			case KeyEvent.VK_ENTER:
    				Calculate("=");
    				break;
    			case KeyEvent.VK_SLASH:
    				Calculate("/");
    				break;
    			case 42:
    				Calculate("*");
    				break;
    			case KeyEvent.VK_MINUS:
    				Calculate("-");
    				break;
    			case 43:
    				Calculate("+");
    				break;
    			case KeyEvent.VK_BACK_SPACE:
    				Backspace();
    				break;
    			case KeyEvent.VK_ESCAPE:
    				Clear();
    				break;
    			case KeyEvent.VK_DELETE:
    				ClearExisting();
    				break;
    		}
    	}
    	public void keyTyped(KeyEvent e)	{}
    	public void keyReleased(KeyEvent e)	{}
    	
    	
    
    
    
    
    	
    /*********************************************************************************************************************************	
    	NON-LISTENER METHODS
    /*********************************************************************************************************************************/
    	
    	
    /*	adds Digit to screen
    	But if TempNum is empty and the button we click is 0 then just set the display box to 0	*/
    	public void addDigit(String digit)	{
    		if(tempNum.equals("") && digit.equals("0"))	{
    			txtDisplay.setText("0");
    			tempNum = "";
    			if(lblSecondNum)
    				lblSecond.setText("0");
    			else	{
    				lblFirst.setText("0");
    				lblSecond.setText("_");
    				lblResult.setText("_");
    			}
    		}	else if(tempNum.length() < MAX_INPUT)	{
    			tempNum += digit;
    			if(tempNum.charAt(0) == '.')
    				tempNum = "0" + tempNum;
    			txtDisplay.setText(tempNum);
    			if(makeSecondTrue)
    				secondNum = true;
    			checkLabels();	
    		}
    	}
    	
    /*	Calculates if /, *, -, +, or = sign is pressed 
    	Second and makeSecondTrue are here because
    	Second should only be true if a digit is pressed after the First Part	*/
    	public void Calculate(String operator)	{
    		decimalUsed = false;
    		if(operator.equals("="))	{
    			result = Process();
    			Display(result);
    			number1 = result;
    			secondNum = false;
    			makeSecondTrue = false;
    			lblSecondNum = false;
    		}	else {
    			if(secondNum)	{	/////////////////
    				result = Process();				//
    				Display(result);					//
    				number1 = result;					//
    				lblSecond.setText("_");			//
    				lblResult.setText("_");			//Second Part
    				lblOperator.setText("?");		//
    				lblFirst.setText(R);				//
    				secondNum = false;				//
    			}	else {			/////////////////        ///////////////////
    				number1 = Double.parseDouble(txtDisplay.getText());		//
    				makeSecondTrue = true;												//
    				setFirstLabel();														//
    				lblSecond.setText("_");												//First Part
    				lblResult.setText("_");												//	
    				lblOperator.setText("?");											//
    				lblSecondNum = true;													//
    			}														////////////////////
    			sign = operator;	
    		}
    		lblOperator.setText(sign);
    		tempNum = "";
    	}
    	
    /*	Makes the number in text field SecondNum 
    	Returns the result of whatever calculation the user has pressed ( / , * , - , + )	*/
    	public double Process()	{
    		number2 = Double.parseDouble(txtDisplay.getText());
    		setSecondLabel();
    		if(sign.equals("*"))
    			return (number1 * number2);
    		else if(sign.equals("-"))
    			return (number1 - number2);
    		else if(sign.equals("+"))
    			return (number1 + number2);
    		else if(sign.equals("/"))	{
    			if(number2 == 0)
    				return DIVIDE_ZERO_ERROR; //if second number is 0 and it is a division operator, return DIVIDE_ZERO_ERROR
    										//	so when displayed, it gives a message, "Cannot Divide by Zero"
    			else
    				return (number1 / number2);
    		}
    		else
    			return ERROR;	//anything other than (/, *, -, +) should return ERROR so when displayed it gives error
    	}
    	
    	//Displays a double number unless if some errors are created 
    	public void Display(double num)	{
    		if(num == DIVIDE_ZERO_ERROR)
    			R = "Cannot Divide by Zero!";
    		else if(num == ERROR)
    			R = "Invalid Input for Function!";
    		else	{
    			R = String.valueOf(num);
    			if((R.charAt((R.length()) -1) == '0') && (R.charAt((R.length()) -2) == '.'))
    			R = R.substring(0, R.length() - 2);
    		}
    		txtDisplay.setText(R);
    		setFirstLabel();
    		lblResult.setText(R);
    	}
    	
    	//Square Root function. (sqrt)
    	public void sqrt()	{
    		try	{
    			if(txtDisplay.getText().indexOf("-") == 0)
    				Display(ERROR);
    			result = Math.sqrt(Double.parseDouble(txtDisplay.getText()));
    		}	catch(Exception e)	{
    			result = ERROR;
    		}
    		lblSecond.setText("sqrt( " + txtDisplay.getText() + " )");
    		Display(result);
    		lblFirst.setText("");
    		lblOperator.setText("");
    		secondNum = false;
    		makeSecondTrue = false;
    		lblSecondNum = false;
    		tempNum = "";
    	}
    	
    	//converts number to percent (%)
    	public void percent()	{
    		result = Double.parseDouble(txtDisplay.getText()) / 100;
    		setFirstLabel(txtDisplay.getText());
    		setSecondLabel("100");
    		lblOperator.setText("/");
    		Display(result);
    		secondNum = false;
    		makeSecondTrue = false;
    		lblSecondNum = false;
    		tempNum = "";
    	}
    	
    	//1 Divide by X function (1/x)
    	public void divideByX()	{
    		if(txtDisplay.getText().equals("0"))
    			result = DIVIDE_ZERO_ERROR;
    		else
    			result = 1 / Double.parseDouble(txtDisplay.getText());
    		setSecondLabel(txtDisplay.getText());
    		Display(result);
    		setFirstLabel("1");
    		lblOperator.setText("/");
    		secondNum = false;
    		makeSecondTrue = false;
    		lblSecondNum = false;
    		tempNum = "";
    	}
    	
    	//Makes it negative if positive and vice versa
    	public void signChange()	{
    		if(txtDisplay.getText().equals("0"))	
    		{
    			/* Do Nothing*/
    		}	else	{
    			if(txtDisplay.getText().charAt(0) == '-')
    				tempNum = tempNum.substring(1, tempNum.length());
    			else
    				tempNum = "-" + txtDisplay.getText();
    			txtDisplay.setText(tempNum);
    			checkLabels();
    		}
    	}
    	
    	/*	Checks the labels in pnlCalulation to the correct number corresponding with 
    	whatever user types in.																					*/
    	public void checkLabels()	{
    		if(tempNum.equals(""))	{
    			if(lblSecondNum)	{
    				setFirstLabel();
    				lblSecond.setText("_");	}
    			else	{
    				lblFirst.setText("_");
    				lblSecond.setText("_");
    				lblResult.setText("_");
    				lblOperator.setText("?");
    			}
    		} else	{
    			if(lblSecondNum)
    				lblSecond.setText(tempNum);
    			else	{
    				lblFirst.setText(tempNum);
    				lblSecond.setText("_");
    				lblResult.setText("_");
    				lblOperator.setText("?");
    			}
    		}
    	}
    	
    /*	First Number Label, lblFirst, gets set the number1 without the .0 at the end.
    	Sets lblFirst to whatever number1 is depending on where it is needed.				*/
    	public void setFirstLabel()	{
    		F = String.valueOf(number1);
    		if(F.charAt(F.length() - 1) == '0' && F.charAt(F.length() - 2) == '.')
    			F = F.substring(0, F.length() - 2);
    		lblFirst.setText(F);
    	}
    	public void setFirstLabel(String f)	{
    		if(f.charAt(f.length() - 1) == '0' && f.charAt(f.length() - 2) == '.')
    			f = f.substring(0, f.length() - 2);
    		lblFirst.setText(f);
    	}
    	
    	public void setSecondLabel()	{
    		S = String.valueOf(number2);
    		lblResult.setText("_");
    		if(S.charAt(S.length() - 1) == '0' && S.charAt(S.length() - 2) == '.')
    			S = S.substring(0, S.length() - 2);
    		lblSecond.setText(S);
    	}
    	public void setSecondLabel(String s)	{
    		if(s.charAt(s.length() - 1) == '0' && s.charAt(s.length() - 2) == '.')
    			s = s.substring(0, s.length() - 2);
    		lblSecond.setText(s);
    	}
    	
    	//Backspace
    	public void Backspace()	{
    		if(txtDisplay.getText().length() < 2)	{
    			tempNum = "";
    			txtDisplay.setText("0");
    		} else	{
    			if((txtDisplay.getText().charAt(txtDisplay.getText().length() - 1) == '.' && 
    			txtDisplay.getText().charAt(txtDisplay.getText().length() - 2) == '0') ||
    			(txtDisplay.getText().length() == 2 && txtDisplay.getText().charAt(0) == '-'))	{
    				tempNum = "";
    				txtDisplay.setText("0");
    				decimalUsed = false;
    			}	else	{
    				if(txtDisplay.getText().charAt(txtDisplay.getText().length() - 1) == '.')
    				decimalUsed = false;
    				tempNum = txtDisplay.getText().substring(0, txtDisplay.getText().length() - 1);
    				txtDisplay.setText(tempNum);
    			}
    		}
    		checkLabels();
    	}
    	
    	//Clears First Number or Second Number or everything if result has been shown.
    	public void ClearExisting()	{
    		tempNum = "";
    		txtDisplay.setText("0");
    		decimalUsed = false;
    		checkLabels();
    	}
    	
    	//Resets everything to startup
    	public void Clear()	{
    		tempNum = "";
    		sign = "0";
    		txtDisplay.setText("0");
    		lblFirst.setText("_");
    		lblOperator.setText("?");
    		lblSecond.setText("_");
    		lblEqual.setText("=");
    		lblResult.setText("_");
    		number1 = 0.0; number2 = 0.0; result = 0.0;
    		F = ""; S = ""; R = "";
    		decimalUsed = false;
    		secondNum = false;
    		makeSecondTrue = false;
    		lblSecondNum = false;
    	}
    	
    	//Shows the About Calculator Dialog
    	public void showAboutDialog()	{
    /*		JDialog(Frame, Title, boolean)
    									boolean: for if you want the dialog to be a pop-up so you 
    												have to do something to make it go away or another kind of frame 
    												beside your original frame.												*/
    		JDialog dlgAbout = new JDialog(window, "About Calculator", true);
    		JLabel lblAbout[] = new JLabel[3];
    		JPanel pnlAbout = new JPanel(new GridLayout(lblAbout.length, 1, 0, 0));
    		for(int i=0; i<lblAbout.length; i++)	{
    			lblAbout[i] = new JLabel();
    			pnlAbout.add(lblAbout[i]);
    		}
    		lblAbout[0].setText("Calculator " + VERSION);
    		lblAbout[1].setText("Created by: Blmaster");
    		lblAbout[2].setText("Created: August 7, 2008");
    		pnlAbout.setBackground(Color.green);
    		dlgAbout.add(pnlAbout);
    		dlgAbout.setSize(180, 120);
    		dlgAbout.setLocation(window.getX() + 40, window.getY() + 50);
    		dlgAbout.setResizable(false);
    		dlgAbout.setVisible(true);
    	}
    	
    /*	Since you cant call a class (you can only call a method),
    	we have to make a instance of it. An example would be like,
    	you cant call a car so it magically appears in front of you,
    	but you can make a car. Something like that.
    	The "new" makes a new Calculator and pretty much calls
    	the code in the class contructor. 										 */
    	public static void main(String[] args)	{
    		new Calculator();
    	}
    }
    
    /*
    Version Changes:
    	0.5-	made basic layout of application.
    	1.0-	added basic (/, *, -, +) operator functions.
    	1.1-	added function: lets you keep calculating without hitting "=" button.
    	1.15-	fixed bug: wouldnt work after first time.
    	1.2-	added function: Clear button.
    	1.3-	added function: Clear Exisiting button.
    	1.4- 	reorganized code: works more efficient now.
    	1.6-	added function: change operator sign.
    	1.65- fixed bug: intefered with equal sign.
    	1.7- 	added function: MAX_INPUT for textbox
    	1.75-	fixed bug: after textbox has reached MAX_INPUT, wouldnt work.
    	1.8- 	added function: Backspace button.
    	1.85-	fixed (1.6) bug: 1.6 function wouldnt work after first use.
    	2.0- 	improved: error system, reorganized code, C, CE, Backspace Buttons.
    	2.1-	added function: menu bar. Program --> Reset, Exit
    	2.2- 	added Help --> About to menu bar.
    	2.5- 	added View --> Show Calculations to menu bar. (beta)
    	2/6- 	replaced About with a Dialog Message.
    	2.7-	fixed Show Calculations. (a lot of work)
    	2.8- 	reorganized code: show calculation function is cleaned to work more efficiently.
    	2.9- 	fixed bug: 0 button would add 0 in front of number. Ex. 032
    	2.95-	fixed (1.8) bug: Backspace wouldnt make decimal work if it erases decimal.
    	2.98-	fixed (2.5) bugs: another Show Calculation bug. wouldnt show 0.
    	3.0-	Menu Bar, Show Calculation function, removed all the ".0" at end of number. STABLE
    	3.2-	added (sqrt, %, 1/x, +/-) functions.
    	3.25-	fixed bugs: 3.2 functions intefered with labels.
    	3.4-	reorganized code: more methods for easier understanding.
    	3.5-	added Key Listener: Numper Pad in keyboard works with Calculator.
    	3.55-	fixed (3.2) bugs:	you can start over after doing functions.
    */
    Attached Files Attached Files

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    May 2008
    Location
    Hell
    Posts
    3,852
    Blog Entries
    4
    Rep Power
    49

    Re: Need Help Beta Testing!! Calculator 4.0

    Some errors you should fix direct are, when you divide something with something after you for example started with 2-2 it will print out 0, but afterward when you try 2/2 it will print out 4. I think you should fix it so it won't do stupid counting :S

  4. #3
    Blmaster is offline Learning Programmer
    Join Date
    Jul 2008
    Posts
    50
    Rep Power
    14

    Re: Need Help Beta Testing!! Calculator 4.0

    i dont understand what you are saying...
    are you saying that when I do:
    2 - 2 = then it print out 0 but if i do 2 / 2 = afterward it will print out 4?
    Well i did that but it print out 1 for me... i didnt understand when you said, "when you divide something with something after you for example started with 2 -2"
    did not understand underlined part. could you please explain again and i will try to fix!

  5. #4
    Join Date
    May 2008
    Posts
    2,126
    Blog Entries
    1
    Rep Power
    33

    Re: Need Help Beta Testing!! Calculator 4.0

    It's just a calculator dude. Just do like 60 or 70 operations on it and I'm sure you can get most of the bugs.

  6. #5
    Blmaster is offline Learning Programmer
    Join Date
    Jul 2008
    Posts
    50
    Rep Power
    14

    Re: Need Help Beta Testing!! Calculator 4.0

    yea thats true... im pretty much done anyway! lol

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. .net Framework 4.0 BETA 2
    By iluxon4ik in forum Computer Software/OS
    Replies: 2
    Last Post: 03-11-2010, 02:23 PM
  2. Beta Testing Service
    By dirkfirst in forum Software Development Tools
    Replies: 2
    Last Post: 05-23-2006, 12:24 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts