Make a simple calculator program

Hello Everyone , today I will make a simple calculator program using from java. This program will be able to like a program calculators that can usually clicking times, for, add, and less.
ok we just create a new project in netbeans
after we create a new project, design of a form like this

and than, create a new package like this, and reate a java class in the package factoy, name a name "factory"


Once we've created a package and classs called factory as above, we get into the package entity and create a classs again named kalkulator.java then ok. Kalkulator.java point here is used to define a data type his calculator. Fill source code like this in class calculator.

After a well-defined data type, enter the package interface. Create javainterface by name interfaceKalkultor

Double-click on interfaceKalkulator, and enter its program code as below.


After we fill the code in the next interfaceKalkulator.java you go to implement the package, create a new clas java, and name implementKalkultor. Double-click on the implement calculator, and enter the source code below


We have finished defining interdace the next implementKalkulator.java kepackage fatory entry and double-click on factory.java earlier. Enter the code as shown below.

For the last. We entered on the form design calculator. Enter the sub menu source code, enter the code below

last orders, we return to the menu design double-click on each button, and enter the code below
ok, the calculator program has been completed, do not forget to save your project. thank you.:D
see you again
Previous
Next Post »
Thanks for your comment