Wednesday, December 10, 2014

Payroll System With Payslip Generator in C++

In this article I would like to share with you Payroll System with Payslip Generator that I wrote for a client before using C++ as my programming language what is good about this program it has a login system and a payroll system that will ask the user to enter the time in and time out of employee in a week of work and it generates reports by the end of the computation process. I hope you will find my work useful in your learning in C++ programming. 

I hope you will find my work useful and beneficial in your quest to learn object oriented programming in PHP and MySQL. If you have some questions about my works feel free to send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

People here in the Philippines who wish to contact me can reach me in my mobile numbers 09173084360 and 09993969756.

Thank you very much and Happy Programming.




Sample Output of Our Program

Program Listing

#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <conio.h>

using namespace std;
int some (string s){
    istringstream buffer(s);
    int some_int;
    buffer>>some_int;
    return some_int;
}

 int start();

main() {
     char pass2[20],user[20];
        char ch;
        // Admin Account
        int pass=0,user2=0;
        // User Account
        int pass1=0,user1=0;
        // Employee Account
        int pass3=0,user3=0;

     do {
         system("cls");
         cout << "\t \n =====================================";
         cout << "\t \n          PASSWORD SECURITY             ";
         cout << "\t \n =====================================";
         cout << "\n\n";
         cout << "\t Enter User Name     : ";
         cin >> pass2;
         cout << "\t Enter your Password : ";
         cin >> user;

        // Admin Account
        user2=strcmp(pass2,"admin");
        pass=strcmp(user,"admin");


       // User Account
        user1=strcmp(pass2,"user");
        pass1=strcmp(user,"user");


      // Employee Account
        user3=strcmp(pass2,"emp");
        pass3=strcmp(user,"emp");


         // For Admin Account

        if (pass==0 && user2==0) {
            cout << "\t \n Welcome to the System! Administrator";
            cout << "\n\n";
            start();
         }

         // For user account
        if (pass1==0 && user1==0) {
            cout << "\t \n Welcome to the System! Users";
            cout << "\n\n";
            start();
         }

         // For Employee account
        if (pass3==0 && user3==0) {
            cout << "\t \n Welcome to the System! Employees";
            cout << "\n\n";
            start();
         }


         else {
            cout << "\t \n Intruder Detected Try Again.";
            cout << "\n\n";
           system("pause");
        }

     } while (pass != 0 && user2!=0 || pass1!=0 && user1!=0
              || pass3==0 && user3==0);
       cout << "\n\n";
       system("pause");
}

int start() {

    ofstream output ("dtr.txt", ios::app);
    ofstream payslip ("payslip.txt", ios::app);
    ifstream read_file ("employee.txt");

    string id, display;
    string day[]= {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"};
    string time_in[5], time_out[5];
    int time_in_conversion[5], time_out_conversion[5];
    int lunch_break = 1;
    int total_hrs = 0;
    float sss =0.00;
    float pilhealth= 0.00,widtax= 0.00,pagibig = 0.00;

    float net_income =0.00, gross_income=0.00;
    float  gsis = 0.00;
    float  rate_per_hr ;
    float tax = 0.00;
    int regular_time;
    float deduction = 0.00;

    cin.ignore();
    cout<<"Enter employee id: ";
    getline(cin, id);
   output << "\n";
   output << id << setw(3) << ":";
    while (!read_file.eof()){

        getline(read_file, display);

        if (id==display){

            cout<<"Welcome Employee No : "<<id << setw(10);
            getline (read_file, display);
            cout << "\n\n";
            cout<<setw(5) <<"Name          : " << setw(2) << display<<endl;
            payslip << "\n";
            payslip<<"Name        : "<<setw(2) <<display<<endl;
            getline (read_file, display);
            cout<<setw(8) <<"Position       : " << setw(2) << display<<endl;
            payslip<<"\nPosition    : "<<setw(2) <<display <<endl;
            getline (read_file, display);
            cout<<setw(10) <<"Department   : " << setw(2) << display<<endl;
            payslip<<"\nDepartment  : "<<setw(2)<< display<<endl;


            for (int a = 0; a<5 ; a++){
            cout << "\n";
          cout <<setw(5) << day[a];
            cout << "\n";
            cout<<"\tTime in: ";
            cin>>time_in[a];


            cout<<"\tTime out: ";
            cin>>time_out[a];

            output<<  day[a] << setw(8);
            output<<setw(6) << time_in[a] <<"AM"<< "-";
            output<<setw(4) <<time_out[a]<<"PM ";

            time_in_conversion[a] = some (time_in[a]);
            time_out_conversion[a] = some (time_out[a]);

            total_hrs +=((time_out_conversion[a] - time_in_conversion[a])-lunch_break);
            cout<<"\n\tTotal Hours: "<<total_hrs;
            }



cout<<"\n\t Total Worked Hours: "<<total_hrs;

cout<<"\n\t Enter rate per hour: ";
cin>>rate_per_hr;
cout<<"\n\t Enter SSS : ";
cin>>sss;
cout<<"\n\t Enter PagIBIG : ";
cin>>pagibig;
cout<<"\n\t Enter Philhealth: ";
cin>>pilhealth;
cout<<"\n\t Enter Withholding tax: ";
cin>>widtax;

    gross_income = total_hrs*rate_per_hr;
    net_income = gross_income - (pilhealth+widtax+pagibig+sss);
    deduction =(pilhealth+widtax+pagibig+sss);
cout << setprecision(2) << fixed;
cout<<"\nRate per hour       : Php "<<rate_per_hr;
cout<<"\nGross Income        : Php "  <<gross_income;
cout<<"\nTotal deductions    : Php " <<deduction;
cout<<"\nNet Income          : Php "    <<net_income;
payslip << setprecision(2) << fixed;
payslip<<"\n***********Deductions*************";
payslip<<"\n\nSSS            : Php "<<sss;
payslip<<"\nPhilhealth       : Php "<<pilhealth;
payslip<<"\nPagIBIG          : Php "<<pagibig;
payslip<<"\nWitholding tax   : Php "<<widtax;
payslip<<"\n__________________________________";
payslip<<"\n          total  : Php "<<deduction<<endl;
payslip<<"\n\nGross pay      : Php "<<gross_income;
payslip<<"\n Net Income     : Php " <<net_income;
payslip<<"\n\n";
payslip<<"\n*******************************";
output<<"\nTotal hours: "<<total_hrs;
output<<"\n";

output.close();
payslip.close();
    }


    }
cout << "\n\n";
system("pause");
}



Product File Maintenance System in Visual Basic 6

This is another application that is being shared by my close friend Mr. Dave R. Marcellana he called this program Product File Maintenance System in Visual Basic 6 it is a module for his Point of Sale System that we previously published in our website. What is good about this program it will show how to create a basic CRUD application using Visual Basic 6. When we say CRUD it stands for create, retrieve, update and delete of records from our database in this case Dave using Microsoft Access to store all the information to the table. 

I hope you will find the work of  Dave useful in your learning how to create a database application using Microsoft Visual Basic 6 and Microsoft Access.

If you have some questions about our work feel free to send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com. I will be happy to read all your emails and suggestions how I can improve my works in programming.

People here in the Philippines who wish to contact me can reach me at my mobile numbers 09173084360 and 09993969756.

Thank you very much and Happy Productive Programming.


Sample Output of Our Program


Decimal To Binary Converter in C++

In this article I would like to share with you a sample program that I wrote in my spare time I called this program Decimal To Binary Converter 1.0 in C++. What does the program will to is to ask the user to enter any integer value and then it will convert into its binary equivalent. The code is very easy to understand and can be used in your programming assignments and activities in C++ programming. In this program I am using CodeBlocks as my text editor and Dev C++ as my C++ compiler. All this software is freely available over the Internet free to download and use.

If you have some questions about my work feel free to send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com. I will be happy to read all your emails and suggestions how I can improve my works in programming.

People here in the Philippines who wish to contact me can reach me at my mobile numbers 09173084360 and 09993969756.

Thank you very much and Happy Productive Programming.



Sample Output of Our Program

Program Listing

#include <iostream>
#include <stdlib.h>

using namespace std;

int main()
{
    char reply;
   do {
    int decimal_number=0, quotient=0;
    int binary_number[100],a=1,b=0;

    system("COLOR 9A");
    cout << "\n";
    cout << "\t================================\n";
    cout << "\tDecimal To Binary Converter 1.0\n";
    cout << "\t================================\n";
    cout << "\n";
    cout <<"Please Enter Any Decimal Number :=> ";
    cin >> decimal_number;

    quotient = decimal_number;

    while(quotient!=0){
        binary_number[a++]= quotient % 2;
        quotient = quotient / 2;
    }

    cout << "The Binary Value of Decimal Number is "
        <<decimal_number << ". => ";
    for(b = a-1 ; b>0; b--) {
    cout << binary_number[b];
    }
   cout << "\n\n";
  cout << "Do you want to continue y/n : ";
  cin >> reply;
   } while(reply=='Y' || reply=='y');
   cout << "\n\n";
   cout << "\t Thank You For Using This Software.";
   cout << "\n\n";
   system("pause");
}



Tuesday, December 9, 2014

Addition of Numbers in PHP Using OOP

As I try to improve my programming skills in PHP I modify my previous code and converted it into Object Oriented Programming approach. This program is very simple application that will ask the user to enter three numbers and find the total sum of the three numbers. I will give the user a chance to clear the text box using the clear button.

The things that you can learn in this sample program it will introduce you will the concept of object oriented programming by creating a class, creating an object and using the attributes like the variables we declare and the use of behavior or method to carry out the addition of the three numbers. I use Twitter Bootstrap CSS framework to improve the appearance of the web page. I make this program very simple to understand and use for beginners that are new in PHP programming and object oriented approach in PHP.

If you have some questions about my work feel free to send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com. I will be happy to read all your emails and suggestions how I can improve my works in programming.

People here in the Philippines who wish to contact me can reach me at my mobile numbers : 09173084360 and 09993969756.

Thank you very much and Happy Productive Programming.



Sample Output of Our Program

Program Listing

header.php

<head>
<title> Addition of Numbers in OOP </title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<style type="text/css">
#wrapper {
margin: 0 auto;
float: none;
width:70%;
}
.header {
padding:10px 0;
}
.title {
padding: 0 5px 0 0;
float:left;
margin:0;
}
.container form input {
height: 30px;
}
</style>
</head>
<body>
<div id="wrapper">
<div class="header">
<h3 class="title"> Addition of Numbers Using OOP</h3>
<br>
</div>

index.php

<html>
<body>
<?php include 'template-parts/header.php' ?><br>
<?php 
class find_sum {
    private $val1 , $val2, $val3;
    public function __construct($val_1, $val_2, $val_3){
        $this->val1 = $val_1;
        $this->val2 = $val_2;
$this->val3 = $val_3;
    }
    public function add(){
       return $this->val1 + $this->val2 + $this->val3;
    }
}
?>
<div class="container home">
<?php
    $value1 = $_POST['num1'];
    $value2 = $_POST['num2'];
$value3 = $_POST['num3'];
    if(isset($_POST['solve']))
    {
        $add_calc = new find_sum($value1,$value2,$value3);    
$result = "The total sum of $value1, $value2 
         and $value3 is ".$add_calc->add().".";
    }
if (isset($_POST['clear']))
{
$value1=""; $value2=""; $value3="";
$holder=""; $result="";
}
?>
<form action="index.php" method="post">
<font size="4">
<label> Enter First Number: </label>
<input type="text" placeholder="first number"  name="num1" value="<?php echo $value1; ?>" />
<br />
<label> Enter Second Number: </label>
<input type="text" placeholder="second number"  name="num2" value="<?php echo $value2; ?>"  />
<br />
<label> Enter Third Number: </label>
<input type="text" placeholder="third number"  name="num3" value="<?php echo $value3; ?>"  />
<br /> </font>
<input type="submit" name="solve" value="Compute"
 title="Click here to find the total sum." class="btn btn-info">
<input type="submit" name="clear" value="Clear"
 title="Click here to clear text box." class="btn btn-info">
</form>
<?php
echo "<br>";
echo "<font size='5'>";
echo $result;
echo "</font>";
?>
</div>
</body>
</html>

Monday, December 8, 2014

Users Address Book in PHP and MySQL Using OOP

Hi there In this article I would like to share with you an application that I wrote using PHP and MySQL using object oriented programming approach. Most of the database applications that I developed through the years in PHP and MySQL is written in structured or procedural format. One of the benefits of object oriented approach in programming particularly in PHP and MySQL is that our application is becomes more easier to maintain, update compared to structured approach. Object oriented programming is design for large scale software development that more developers or programmers involved.

 I called this program Users Address Book it allows the user to add, edit and update information of the person about this address,mobiles numbers and other important information related to the person. It introduces the beginners in object oriented approach on how to create and object and use it effectively in writing a database application in PHP and MySQL.

I hope you will find my work useful and beneficial in your quest to learn object oriented programming in PHP and MySQL. If you have some questions about my works feel free to send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

People here in the Philippines who wish to contact me can reach me in my mobile numbers 09173084360 and 09993969756.

Thank you very much and Happy Programming.



Main Page of Our Program


Add of Record Page


After we save the record it will return to main page


Update of Record Page


Saturday, December 6, 2014

Point of Sale System in Visual Basic 6

In this article I would like to share with you an application that is written by a friend of mine named Mr. Dave R. Marcellana. This fellow is a close friend of mine he is also a programmer just like me I ask him if he can share some of his codes to us and he agree to share his Point of Sale System written entirely in Microsoft Visual Basic 6 and Microsoft Access.

This system is very useful in small and medium businesses just like a retail store or a small supermarket. It can track down daily sales, generate reports and perform of inventory of stocks that makes running a business is a breeze and efficient.

If you have some questions about this application your can send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much and Happy Productive Programming.










Sample Output of Our Program


Odd and Even Number Using Function in C++

In this article I would like to share with you how to write a function that will check if the number being given by our user is odd or even number in C++. The code is very simple and very easy to follow. I hope you will find my useful in your quest in learning C++ as your primary programming language.

If you have some questions regarding about my work in C++ please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

People here in the Philippines can reach me through my mobile number 09173084360 and 09993969756.



Sample Output of Our Program

Program Listing

#include <iostream>

using namespace std;

int odd_even(int value);

int odd_even(int value)
{
    if (value %2 == 0 ) 
    {
        cout << "The number is " << value << " Even Number.";
     }
    else 
    {
        cout << "The number is " << value << " Odd Number.";
     }
    cout << "\n\n";
    system("pause");
  
}


main()
{
      int number=0;
      
      cout << "Enter a Number : ";
      cin >> number;
      odd_even(number);
}     
      

Set Precision in C++

In this article I would like to share with you a very short and simple program in C++ how to use set precision function in your C++ program. As a programmer using C++ there are some programming problems which deals with decimal values. One of the most interesting solution that I find is the use of C++ library file called iomanip or input / output manipulator. A standard library file in C++ that adds functionality in our program.

Our program will as the user to enter a number and then it will display the number with only two decimal places using the set precision function in C++. If you have some questions regarding about my work in C++ please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

People here in the Philippines can reach me through my mobile number 09173084360 and 09993969756.

Thank you very much and God Bless.



Sample Output of Our Program

Program Listing

#include <iostream>
#include <iomanip>

using namespace std;

main()
{
      float price=0.00;
      cout << setprecision(2) << fixed;
      
      cout << "Set Precision Demo ";
      cout << "\n\n";
      cout << setw(20) << "Enter price : ";
      cin >> price;
      cout << setw(10) <<  "The price is " << price;
      cout << "\n\n";
      system("pause");
}




Wednesday, December 3, 2014

Employee's Payroll System Using Javascript



This program will show you how to use Javascript in developing an employees payroll system what the program will do is to ask the user the number of hours the employee works and the rate per hour after that our program will compute and display the salary of the employee.

Our program will only stop processing the salary of the employee but give -1 to the number of hours work and rate per hour. What is good about this program it will sum all the salary of all employees being processed to get the final sum of the salary to be paid by the company. 

I hope you will find my code useful in learning programming using JavaScript.
 If you have some questions feel free to send me an email     at jakerpomperada@yahoo.com and jakerpomperada@gmail.com

My mobile numbers are 09173084360 and 09993969756

Thank you very much and Happy Programming.





Sample Output of Our Program


    




Saturday, November 29, 2014

Coin Head and Tail Checker

This program will check the occurrence of head and tail in a coin if it is being flip by the person. I wrote this program when I started programming in Visual Basic 6 as one of my programming assignments. I hope you will find this code useful.

I hope you can learn from this simple program that I wrote. If you find my work useful please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much and Happy Programming.



Sample Output of Our Program



Monthly Sales Commission Solver in Visual Basic 6

This program that I wrote in Visual Basic 6 will compute the monthly sales commission of an employee per monthly for every product he or she sold to their customer. The code is very short and easy to understand by learners in Visual Basic 6 programming

I hope you can learn from this simple program that I wrote. If you find my work useful please send me an email at jakerpomperada@yahoo.com andjakerpomperada@gmail.com.

Thank you very much and Happy Programming.



Sample Output of Our Program






Fahrenheit To Celsius Converter in Visual Basic 6

This one of the earliest program that I wrote in Microsoft Visual Basic 6 to convert temperature in Fahrenheit to its Celsius equivalent. The code is very simple and easy to follow for beginners in Visual Basic 6 programming.

I hope you can learn from this simple program that I wrote. If you find my work useful please send me an email at jakerpomperada@yahoo.com andjakerpomperada@gmail.com.

Thank you very much and Happy Programming.


Sample Output of Our Program



Calculator in Visual Basic 6

This very simple program that I wrote in Visual Basic 6 a very long time ago when I started learning how to program in visual basic 6. This program is a calculator program that will ask the user to enter two values and then the user can select in four operations using command buttons such as add, subtract, divide and multiply.

I hope you can learn from this simple program that I wrote. If you find my work useful please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much and Happy Programming.


Sample Output of Our Program



Friday, November 28, 2014

SMS Sender System in Visual Basic NET

  This simple program will allows you to send sms using your Visual Basic NET I wrote this application using Microsoft Visual Studio 2010. For my GSM Modem I'm using Sun BroadBand Internet with sim.  The code will also work in Globe Tattoo and Smart Bro Plugin.

The code is very simple and very easy to understand. I hope you will benefit from it. If you have some questions please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com

People here in the Philippines can reach me through my mobile numbers 09173084360 and 09993969756. Thank you very much and Happy Productive Programming.



Sample Output of Program




Tuesday, November 25, 2014

Sending SMS Using PHP Via GSM Modem


     After I was able to send sms text message in Visual Basic 6 my intention to improve my skills and knowledge in programming does not stop there. My next plan is to write an application to send sms using PHP as my programming language. PHP is one of my favorite language I earned from it and it is easy to learned for beginners. After some research over the Internet I find a class code in PHP that enables us to send sms using a gsm modem. 

I modify the code to suit to my needs and then test using my gsm modem provided by Sun Broadband Internet. In my computer at home it runs on Windows XP the gsm modem uses communication port 3 for sending information specially sms messages. After some trial and error and refinement of my code I was able to send text messages from PHP into my mobile phone. 

My code works using globe tattoo, sun broadband internet and smart bro plugin gsm modem here in the Philippines. If you are trying to use my code in your country please check your telecommunication company about it. I hope you find my work useful and beneficial in your programming assignments and projects which involves integrating SMS functionality in your application. 

Questions and comments your can send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com. People here in the Philippines who wish to contact me can reach me in my mobile number 09173084360 and my telephone number at home at (034) 4335675. Thank you very much and Happy Programming.





Sample Output of Our Program



Check your GSM Modem here device manager to determine the communication port before you run the program