Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.scalabledevelopment.math;
- public class Operations {
- public static int Add_Items = 1;
- public static int Subtract_Items = 2;
- public static int Multiple_Items = 3;
- public static int Divide_Items = 4;
- private int _val;
- //public int Operations = 1;
- public int getIntValue()
- {
- return _val;
- }
- public void setIntValue(int val)
- {
- _val = val;
- }
- public static float staticadd ( float a, float b)
- {
- return ( a + b );
- }
- public static int staticadd ( int a, int b)
- {
- return ( a + b );
- }
- public static float staticmultiply ( float a, float b)
- {
- return ( a * b );
- }
- public static float staticmultiplyfloat ( float a, float b)
- {
- return ( a * b );
- }
- public static int staticmultiply ( int a, int b)
- {
- return ( a * b );
- }
- public static float staticsub ( float a, float b)
- {
- return ( a - b );
- }
- public static float staticoperate ( int op, float a, float b)
- {
- switch(op)
- {
- case (1):
- return (a + b );
- case (2):
- return (a - b);
- case (3):
- return (a * b);
- case (4):
- return (a / b);
- default:
- return 0f;
- }
- }
- public int add(int a, int b)
- {
- return (a + b);
- }
- public float add(float a, float b)
- {
- return (a + b);
- }
- public float multiplyfloat( float a, float b)
- {
- return ( a * b );
- }
- public float removeoperation ( int a, int b )
- {
- return ( a + b);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement