Friday, December 4, 2020

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 jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

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
 jakerpomperada@gmail.com
 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");
    
   }     
}





Thursday, December 3, 2020

Qualified to Vote in Java

Qualified to Vote in Java

 Machine Problem

Write a program using Java language that determines if the input age is qualified to vote or not.  The qualifying age is 18 years old and above. 

 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 jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

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

Qualified_To_Vote.java

/**

* Machine Problem

*

* Write a program using Java language that determines 

* if the input age is qualified to vote or not. 

* The qualifying age is 18 years old and above. 

* @author Jake Rodriguez Pomperada,MAED-IT, MIT

* www.jakerpomperada.com / www.jakerpomperada.blogspot.com

* jakerpomperada@gmail.com

* Bacolod City, Negros Occidental Philippines

* December 3, 2020   Thursday

*/




import java.util.Scanner;


public class Qualified_To_Vote {


public static void main(String[] args) {

// TODO Auto-generated method stub

  Scanner input = new Scanner(System.in);

        

        System.out.println("\n");

        System.out.print("\tQualified to Vote in Java");

        System.out.println("\n");

        System.out.print("\tEnter Your Age : ");

        int age =input.nextInt();

        

        System.out.println("\n");

        

        if  (age >= 18) {

       

        System.out.println("\tAt the age of " + age + " years old.\n");

        System.out.println("\tYou are qualified to vote");

        } else {

        System.out.println("\tAt the age of " + age + " years old.\n");

        System.out.println("\tYou are too young to vote.");

        }

        

        System.out.println("\n");

        System.out.println("\tEnd of Program");

        System.out.println("\n");

}


}


Payroll Program in Java Using Method Overloading

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 jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

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

// jakerpomperada@gmail.com

// 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");

}


}



Addition of Three Numbers in Ruby

Addition of Three Numbers in Ruby

 I wrote this program to ask the user to give three integer numbers and then the program will compute its sum and display the results using Ruby 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 jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

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

addition.rb

# addition.rb
# Author   : Jake Rodriguez Pomperada,MAED-IT, MIT
# Date     : December 3, 2020  
# Address  : Bacolod City, Negros Occidental
# Tools    : Eclipse IDE and Ruby Version 2.6.3
# Location : Bacolod City, Negros Occidental  
# Emails   : jakerpomperada@gmai.com and jakerpomperada@yahoo.com
puts "\n\n"
print "\tAddition of Three Numbers in Ruby";
puts "\n\n"
print "\tGive First Value  : ";
val1 = gets;
print "\tGive Second Value : ";
val2 = gets;
print "\tGive Third Value  : ";
val3 = gets;

val1 = val1.to_i;
val2 = val2.to_i;
val3 =  val3.to_i;
sum = sum.to_i;

sum = (val1+val2+val3);
print "\n";
print "\tThe sum of ",val1,",",val2," and ",val3," is ",sum,".";
puts "\n\n"
print "\tEnd of Program";
puts "\n"


Wednesday, December 2, 2020

How to Use String and Integer Variables in C++

How to Use String and Integer Variables in C++

 In this tutorial I will show you how to use string and integer variables in C++ 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 jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

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

#include <iostream>



using namespace std;


int main() {


string student_name;

    string school;

string course_year_section;

int age=0;




std::cout << "Name : ";

    getline(cin,student_name);

std::cout << "Age  : ";

cin >> age;

cin.ignore();

std::cout << "School : ";

    getline(cin,school);

    std::cout << "Course, Year and Section : ";

    getline(cin,course_year_section);

    

std::cout << "\n\n";

std::cout << "\tDISPLAY RESULTS";

std::cout << "\n\n";

std::cout << "Name   :" << student_name <<"\n";

std::cout << "Age    :" << age <<"\n";

std::cout << "School  :" << school <<"\n";

std::cout << "Course, Year and Section  :"

<< course_year_section <<"\n";

}




Qualified To Vote in C

Qualified To Vote in C

 Machine Problem

Write a program using C language that determines if the input age is qualified to vote or not.  The qualifying age is 18 years old and above. 

 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 jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

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


/* vote.c

   Mr. Jake Rodriguez Pomperada,MAED-IT, MIT

   www.jakerpomperada.com, www.jakerpomperada.blogspot.com

   jakerpomperada@gmail.com

   Bacolod City, Negros Occidental Philippines


Machine Problem


Write a program using C language that determines 

if the input age is qualified to vote or not. 

The qualifying age is 18 years old and above. 


*/



#include <stdio.h>


int main() {


int age=0;


printf("\n\n");

printf("\tQualified To Vote in C");

printf("\n\n");

printf("\tGive Your Age : ");

scanf("%d",&age);

printf("\n\n");

if(age>=18) {

printf("\tAt the age of %d  years old.\n\n",age);

printf("\tYou are qualified to vote.");

} else {

printf("\tAt the age of %d  years old.\n\n",age);

printf("\tYou too young to vote.");

}

  printf("\n\n");

  printf("\tEnd of Program");

  printf("\n\n");

}

Arithmetic Operators in C

Arithmetic Operators in C

 Machine Problem in C

The sum of the first and second number, then the difference of the sum(total first and second number) and the third number product of the difference( sum and third) and the Fourth. The quotient of the product(difference and fourth) and the fifth number.

 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 jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

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

/* Machine Problem in C


The sum of first and second number, 

then the difference of the sum(total first and second number) and 

the third number product of the difference( sum and third) and

the Fourth. The quotient of the product(difference and fourth)

and the fifth number.


arithmetic.c


Mr. Jake Rodriguez Pomperada,MAED-IT, MIT

www.jakerpomperada.com, www.jakerpomperada.blogspot.com

jakerpomperada@gmail.com

December 2, 2020   Wednesday

Bacolod City, Negros Occidental Philippines


*/


#include <stdio.h>



int main()

{

float first=0,second=0;

float third=0,fourth=0;

float fifth=0;

float sum=0,difference=0;

float product=0, quotient=0;

float sum_all = 0;

printf("\n\n");

printf("\tArithmetic Operators in C");

printf("\n\n");

sum = (first+second);

difference = (first-second);

first = 100; second = 10;


sum = first + second;

third = 5;


difference = sum - third;

printf("\tThe sum of %5.2f and %5.2f is %5.2f.",first,second,sum);

printf("\n\n");

printf("\tThe difference between %5.2f and %5.2f is %5.2f."

      ,first,second,difference);

 

    fourth = 2;

product  = difference * fourth;

printf("\n\n");      

printf("\tThe product of %5.2f and %5.2f is %5.2f."

,difference,fourth,product);

fifth = 20;

quotient =  (product / fifth);

printf("\n\n");      

printf("\tThe quotient of %5.2f and %5.2f is %5.2f."

,product,fifth,quotient);

printf("\n\n");  

printf("\tEnd of Program");  

printf("\n\n");  

}