Categories
Java

Bubble Sort in Java

  Machine Problem in Java

 Write a program that will a series of numbers and then it will sort it using bubble sort algorithm in Java programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following [email protected], [email protected], and [email protected]

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

import java.util.Scanner;

/**
 * Machine Problem in Java
 * 
 * Write a program that will a series of numbers and then it will sort it using 
 * bubble sort algorithm in Java programming language.
 * 
 @author Jake Rodriguez Pomperada,MAED-IT, MIT
 www.jakerpomperada.com / www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines
 December 15, 2020  Tuesday   10:22
*/

public class Bubble_Sort {
	
	

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		 Scanner input=new Scanner(System.in);  
		 
		 		
		int elements[]=new int[100];
				
		
		 System.out.println("\n");
	     System.out.print("\t\tBubble Sort in Java");
		 System.out.println("\n");
		 

		 System.out.print("Enter the number of elements you want to store: ");  
	  
		 int n=input.nextInt();  
	  
	
		System.out.println();
		 for(int i=0; i<n; i++)  
		 {  
			 System.out.print("Enter the element No. " + (i+1) + " : ");     
		     elements[i]=input.nextInt();  
		 
		 }  
		 
		 	System.out.println();
		    System.out.println("UnSorted Items of Arrays");
		    System.out.println();
		    
			 for(int i=0; i<n; i++)  
			 {  
			 //reading array elements from the user   
				    System.out.print("" + elements[i] + " ");
			 
			 }  

	     // Bubble Sort Routine Here
			 
	        for (int i = 0; i < n-1; i++)
	            for (int j = 0; j < n-i-1; j++)
	                if (elements[j] > elements[j+1])
	                {
	                    
	                    int temp = elements[j];
	                    elements[j] = elements[j+1];
	                    elements[j+1] = temp;
	        	         }
	        
	        System.out.println("\n");
	        System.out.println("Sorted Items of Array");
	        System.out.println();
		 for(int i=0; i<n; i++)  
		 {  
	    System.out.print("" + elements[i] + " ");
		 
		 }  
		 
		 System.out.println("\n");
	     System.out.print("\tEnd of Program");
	      System.out.println("\n");
		 input.close();
	        
	        
	}

}
Categories
Java

Employees Payroll System in Java

 Machine Problem in Java

Write a simple payroll program that will display the employee’s information. The program should perform the following:

* Ask the user to enter the name of the employee

* Prompt the user to select between full time and part time   by pressing either F (full time) or P (part-time)

* If F is pressed, ask the user to enter his monthly salary.

  Then display his name and salary.

  If P is pressed, ask the user to type his rate(pay) per hour, then   the number of hour, and then the number of overtime. Then display his or her name and wage. The computation pay is:

  hours of overtime x (rate per hour x 125%)

  If an invalid letter is pressed, display an error message.

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following [email protected], [email protected], and [email protected]

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

Employees_Payroll_System.java

import java.text.DecimalFormat;

import java.util.Scanner;

/**
Machine Problem in Java

Write a simple payroll program that will display the employee's
information. The program should perform the following:

 Ask the user to enter the name of the employee
 Prompt the user to select between full time and part time
 by pressing either F (full time) or P (part time)
 If F is pressed, ask the user to enter his monthly salary.
 Then display his name and salary.

  If P is pressed, ask the user to type his rate(pay) per hour, then
  the number of hour and then number of overtime. Then display his
  or her name and wage. The computation pay is:
  hours of overtime x (rate per hour x 125%)

  If an invalid letter is pressed, display an error message.
 
 @author Jake Rodriguez Pomperada,MAED-IT, MIT
 www.jakerpomperada.com / www.jakerpomperada.blogspot.com
 [email protected]
 Bacolod City, Negros Occidental Philippines
 December 4, 2020   Friday 7:52 AM
*/


public class Employees_Payroll_System {
	
	private static DecimalFormat df2 = new DecimalFormat("#.##");

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		  Scanner input = new Scanner(System.in);
	        
	        System.out.println("\n");
	        System.out.print("\tEmployees Payroll System in Java");
	        System.out.println("\n");
	        System.out.print("\tEnter Employees Name : ");
	        String emp_name =input.nextLine();
	        System.out.print("\tPress F for Full Time or P for Part Time : ");
	        char job_criteria =input.next().charAt(0);
	        
	        char select = Character.toUpperCase(job_criteria);
	        
	        System.out.println();
	        
	        if (select == 'F') {
	        	System.out.print("\t------ Full Time Employee ----- ");
	        	System.out.println();
	        	System.out.print("\tEnter Basic Pay :  ");
	            double basic_pay = input.nextDouble();
	            
	            System.out.println("\n");
	            System.out.println("\t-----------------------------------\n");
	            System.out.println("\tEmployees Name :  " + emp_name );
	            System.out.println("\tBasic Pay      :  " + df2.format(basic_pay));
	            System.out.println();
	            System.out.print("\t-----------------------------------\n");
	            System.out.print("\tGross Pay      :    " + df2.format(basic_pay));
	            System.out.println("\n");
	        } else if (select == 'P') {
	        	
	        	System.out.print("\t------ Part Time Employee ----- ");
	        	System.out.println("\n");
	        	System.out.print("\tEnter Rate Per Hour       :  ");
	            double rate_per_hour = input.nextDouble();
	            
	            System.out.print("\tEnter No. of Hour(s) Work :  ");
	            double no_hours_work2 = input.nextDouble();
	            
	            System.out.print("\tEnter No. of Overtime     :  ");
	            double no_overtime = input.nextDouble();
	            
	            double basic_pay2 =  (rate_per_hour * no_hours_work2); 
	            double overtime_pay = (no_overtime * rate_per_hour * 1.25);
	            
	            double gross_pay = (basic_pay2 + overtime_pay);
	            		
	            System.out.println("\n");
	            System.out.println("\t-----------------------------------");
	            System.out.println("\tEmployees Name :  " + emp_name );
	            System.out.println("\tBasic Pay      :  " + df2.format(basic_pay2));
	            System.out.println("\tOvertime Pay   :  " + df2.format(overtime_pay));
	            System.out.print("\t-----------------------------------\n");
	            System.out.println("\tGross Pay      :  " + df2.format(gross_pay));
	            System.out.println("\n");
	        } else {
	           	System.out.println("\n");
		        System.out.print("\tInvalid Option. Please Try Again");
	           }
	        
	     	System.out.print("\tEnd of Program");
	        System.out.println("\n");
    
	   }     
	}


Categories
Java

Payroll Program in Java Using Method Overloading

Machine Problem in Java

Payroll that includes five double field variables that hold hours

worked, rate of pay per hour, withholding rate, gross pay, and net pay, and three String

field variables that holds the last name, first name and position of the employee. 

Create three overloaded computeNetPay() methods. 

When computeNetPay() receives values 

for hours, pay rate, and withholding rate, it computes the gross pay and reduces it by

the appropriate withholding amount to produce the net pay. 

When computeNetPay() 

receives two arguments, they represent the hours and pay rate, and the withholding

rate is assumed to be 10%. 

When computeNetPay() receives one argument, it

represents the number of hours worked, the withholding rate is assumed to be 10%,

and the hourly rate is assumed to be 59.65. 

Name the program as Payroll.java

The gross pay is computed as hours worked multiplied by pay per hour.

Display the last name, first name, position, total pay for the hour’s work, withholding

rate, gross pay and the net pay of the employee.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following [email protected], [email protected], and [email protected]

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking, and Arduino Project development at a very affordable price. My website is www.jakerpomperada.blogspot.com and www.jakerpomperada.com

If you like this video please click the LIKE button, SHARE, and SUBSCRIBE to my channel.

Your support on my channel is highly appreciated.

Thank you very much.

Program Listing

Payroll.java

// Payroll.java
// Author : Mr. Jake Rodriguez  Pomperada, MAED-IT, MIT
// www.jakerpomperada.com , www.jakerpomperada.blogspot.com
// [email protected]
// Bacolod City, Negros Occidental,Philippines
// December 3, 2020   Thursday

import java.text.DecimalFormat;

public class Payroll {
	
	private static DecimalFormat df2 = new DecimalFormat("#.##");
	
	public  void EmployeesRecord(String LastName, String FirstName, String Position )
	{
		System.out.println("\n");
		System.out.println("\tEMPLOYEE'S INFORMATION");
		System.out.println();
		System.out.println("\tEmployee's LastName  : " + LastName );
		System.out.println("\tEmployee's FirstName : " + FirstName );
		System.out.println("\tEmployee's Postion   : " + Position );
		System.out.println();
	}
	
	// Method Overloading computeNetPay() No. 1 
	
	public void computeNetPay(double hoursWork, double pay_rate,double withholding_rate)
	{
		double gross_pay=0.00;
		double solve_netpay=0.00;
		double tax=0.00;
		double solve_percentage=0.00;
	
		solve_percentage = (withholding_rate/100);
		
		gross_pay = (hoursWork* pay_rate);
		tax = (gross_pay * solve_percentage);
	
		solve_netpay = (gross_pay - tax);
	
	   System.out.println("\tThe Net Pay is PHP "+ df2.format(solve_netpay));
	}

	
	
	// Method Overloading computeNetPay() No. 2 
	
		public  void computeNetPay(double hoursWork, double pay_rate)
		{
			double gross_pay;
			double solve_netpay;
			double tax;
		
			double withholding_rate = 0.10;
			
			gross_pay = (hoursWork* pay_rate);
			tax = (gross_pay * withholding_rate);
		
			solve_netpay = (gross_pay - tax);
		
		   System.out.println("\tThe Net Pay PHP "+ df2.format(solve_netpay));
		}

		

		// Method Overloading computeNetPay() No. 3 
		
			public  void computeNetPay(double hoursWork)
			{
				double gross_pay;
				double solve_netpay;
				double tax;
			
				double pay_rate = 59.65;
				double withholding_rate = 0.10;
				
				gross_pay = (hoursWork* pay_rate);
				tax = (gross_pay * withholding_rate);
			
				solve_netpay = (gross_pay - tax);
			
			   System.out.println("\tThe Net Pay PHP "+ df2.format(solve_netpay));
			}

			
		
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		    Payroll employee1=new Payroll();
		    
		    Payroll employee2=new Payroll();
		    
		    Payroll employee3=new Payroll();
		    		    
			
		    System.out.println("\n");
			System.out.print("\tPayroll Program in Java Using Method Overloading");
			
			// Method Overloading computeNetPay() No. 1  
			employee1.EmployeesRecord("Pomperada","Jake", "Jave Developer");
			employee1.computeNetPay(15,250.60,12);
			

			// Method Overloading computeNetPay() No. 2  
			employee2.EmployeesRecord("Pomperada","Allie", "Chemical Engineer");
			employee2.computeNetPay(40,485.71);
						
			// Method Overloading computeNetPay() No. 3  
			employee3.EmployeesRecord("Pomperada","Jacob Samuel", "Software Architect");
			employee3.computeNetPay(35);
			
			System.out.println("\n");
			System.out.print("\tEnd of Program");
			System.out.println("\n");
	}

}
Categories
Java

Fahrenheit To Celsius in Java

 I will show you how to write a program using the Java programming language to convert temperature from Fahrenheit to Celsius degree.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following [email protected], [email protected], and [email protected]
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City I also accepting computer repair, networking and Arduino Project development at a very affordable price.

Program Listing


/**
 * @author Jake Rodriguez Pomperada, MAED-IT, MIT
 * [email protected]
 * www.jakerpomperada.com
 * Bacolod City, Negros Occidental
 * September 30, 2020  Wednesday
 */



import java.util.Scanner;
import java.math.RoundingMode;
import java.text.DecimalFormat;


public class Fahrenheit_Celsius {
	
	 private static DecimalFormat df2 = new DecimalFormat("#.##");

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		
		  Scanner input = new Scanner(System.in);
		
		    System.out.println("\n");
		    System.out.print("\t\tFahrenheit To Celsius in Java");
		    System.out.println("\n");

	      	 System.out.print("\tTemperature in Fahrenheit: ");
	        double fahrenheit = input.nextDouble();

	        double  celsius =(( 5 *(fahrenheit - 32.0)) / 9.0);
	        
	        System.out.println("\n");
	        System.out.println("\tThe " + fahrenheit + " Degree Fahrenheit is equal to "
	        + df2.format(celsius) + " in Celsius");
	         System.out.print("\n\n");
			System.out.println("\tEnd of Program");
	        System.out.println("\n\n");
	}

}
Categories
Java

Celsius To Fahrenheit in Java

Write a program using Java programming language to convert temperature from Celsius to Fahrenheit degree.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following [email protected], [email protected], and [email protected]
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City I also accepting computer repair, networking and Arduino Project development at a very affordable price.

Program Listing


/**
 * @author Jake Rodriguez Pomperada, MAED-IT, MIT
 * [email protected]
 * www.jakerpomperada.com
 * Bacolod City, Negros Occidental
 * September 30, 2020  Wednesday
 */


import java.util.Scanner;
import java.math.RoundingMode;
import java.text.DecimalFormat;

public class Celsius_Fahrenheit {
	
	 private static DecimalFormat df2 = new DecimalFormat("#.##");

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		
	    System.out.println("\n");
	    System.out.print("\t\tCelsius To Fahrenheit in Java");
	    System.out.println("\n");

     	 System.out.print("\tTemperature in Celsius : ");
          double celsius = input.nextDouble();

        /* Convert Celsius to Fahrenheit */
         double Fahrenheit = celsius * (9f / 5) + 32;
        
        System.out.println("\n");
        System.out.println("\tThe " + celsius + " Degree Celsius is equal to "
        + df2.format(Fahrenheit) + " degree in Fahrenheit.");
         System.out.print("\n\n");
		System.out.println("\tEnd of Program");
        System.out.println("\n\n");
	
	}

}
Categories
Java

Difference of Two Integers in Java

 In this article I will show you how write a program that asking the user to give two integer numbers and then the program will compute the difference of the two integer using Java programming language. 

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following [email protected], [email protected], and [email protected]
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.
Here in Bacolod City I also accepting computer repair, networking and Arduino Project development at a very affordable price.

/* difference.java
 * Author : Jake Rodriguez Pomperada, MAED-IT, MIT
 * September 27, 2020
 * www.jakerpomperada.blogspot.com
 * www.jakerpomperada.com
 * [email protected]
 * Bacolod City, Negros Occidental
 */

import java.util.Scanner;

public class difference {

    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);
        
        System.out.println("\n");
        System.out.print("\tDifference of Two Integers in Java");
        System.out.println("\n");
        System.out.print("\tGive First Value  : ");
        int firstInt = in.nextInt();
        System.out.print("\tGive Second Value : ");
        int secondInt = in.nextInt();

        System.out.println("\n");
        System.out.printf("\tDifference of two integers: %d%n", firstInt - secondInt);
        System.out.println();
        System.out.println("\tEnd of Program");
        System.out.println("\n");
    }
}
Categories
Java

Remove Consonants in Java

I wrote this program to ask the user to give string and then the program to remove the consonants in the given string using Java programming language.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following [email protected], [email protected], and [email protected] mobile number here in the Philippines is 09173084360. My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking, and Arduino Project development at a very affordable price. My personal website is http://www.jakerpomperada.com


My programming website is http://www.jakerpomperada.blogspot.comI am also a book author you can purchase my books on computer programming and information technology in the following links below. https://www.unlimitedbooksph.com/

Program Listing

// demo.java
// Written By: Jake Rodriguez Pomperada
// Barangay Alijis, Bacolod City, Negros Occidental Philippines.
// www.jakerpomperada.com
// [email protected]
// May 14, 2020  Thursday

package test;

import java.util.Scanner;

public class demo {

   static String Remove_Consonants(String str)
   {
    return  str.replaceAll("[BCDFGHJKLMNPQRSTVXZbcdfghjklmnpqrstvxz]","" );
   }
	
	public static void main(String[] args) {
     
	Scanner in = new Scanner(System.in);
     
     String str_given,display_result;
     
    System.out.print("\n\n");
    System.out.print("\tRemove Consonants in Java");
    System.out.print("\n\n");
    System.out.print("\tGive a String : ");
    str_given = in.nextLine();
    
    System.out.print("\n"); 
    System.out.print("\tString : " + str_given);
    display_result = Remove_Consonants(str_given);
    System.out.print("\n");
    System.out.print("\tResult : " + display_result);
    System.out.println();  
	}

}
Categories
Java

Sum of Two Numbers in Java

A simple java program to accept two numbers and then it will compute the sum of two numbers and display the results on the screen.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, website design and development using WordPress, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following [email protected], [email protected], and [email protected]
My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.
Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Program Listing

package com.example.java;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        System.out.print("Enter a numeric value: ");
        String input1 = sc.nextLine();
        double d1 = Double.parseDouble(input1);

        System.out.print("Enter a numeric value: ");
        String input2 = sc.nextLine();
        double d2 = Double.parseDouble(input2);

        double result = d1 + d2;

        System.out.println("The answer is " + result);

    }
}
Categories
NodeJS

Positive and Negative Number Checker in NodeJS

I wrote this simple program using NodeJS to ask the user to give a number and then the program will check and determine if the given number is a positive or negative number.

I am currently accepting programming work inventory system, enrollment system, accounting system, payroll system, information system, IT projects, school and application development, programming projects, thesis, and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following [email protected], [email protected], and [email protected]
My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.


Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Sample Program Output
// num.js
/* Positive and Negative Number Checker in NodeJS    */
/* March 22,2020  Thursday   4:57 PM  */
// Bacolod City,Negros Occidental Philippines
/* Written By: Mr. Jake R. Pomperada   */

var readline = require('readline');

var rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

console.log('\n');
console.log('Positive and Negative Number in NodeJS\n');
console.log('Author : Jake R. Pomperada');
console.log('\n');
rl.question('Enter first value : ', function (x) {
    var a = parseInt(x);


    if (isNaN(a))      {
        console.log('\n');
        console.log("The given value is not a number. Try Again.");
      } else if (a>=0) {
        console.log('\n');
        console.log('The given number ',a, ' is a Positive Number.');
      }
      else {
        console.log('\n');
        console.log('The given number ',a, ' is a Negative Number.');
      }
      console.log('\n');
      console.log('End of Program');
      rl.close();
    
});
Categories
Java

Math Calculator in Java

A simple math calculator program that I wrote in Java programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.


My email address is the following [email protected], [email protected], and [email protected]
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, web development using WordPress, Computer Networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/

Program Listing

Math_Calculator.java

import java.util.*;

public class Math_Calculator {
    public static void main(String[] args){
    Scanner Input = new Scanner(System.in);
    System.out.println("Enter Number");
    System.out.println("1 - Addition");
    System.out.println("2 - Subtraction");
    System.out.println("3 - Division");
    System.out.println("4 - Multiplication");
    
    int choice = Input.nextInt();
    if(choice==1){
        System.out.println("Enter first number");
        double num1 = Input.nextDouble();
        System.out.println("Enter Second number");
        double num2 = Input.nextDouble();
        double sum = num1+num2;
        System.out.println("sum= " + sum);
        
        
        }
    else if(choice==2){
        System.out.println("Enter first number");
        double num1 = Input.nextDouble();
        System.out.println("Enter Second number");
        double num2 = Input.nextDouble();
        double difference = num1-num2;
        System.out.println("difference= " + difference);
        
       
        }
    else if(choice==3){
        System.out.println("Enter first number");
        double num1 = Input.nextDouble();
        System.out.println("Enter Second number");
        double num2 = Input.nextDouble();
        double qoutient = num1/num2;
        System.out.println("qoutient= " + qoutient);
        
        }
   else if(choice==4){
        System.out.println("Enter first number");
        double num1 = Input.nextDouble();
        System.out.println("Enter Second number");
        double num2 = Input.nextDouble();
        double product = num1*num2;
        System.out.println("product= " + product);
        }
       else{
            System.out.println("invalid");
       }
    }
}