Wednesday, November 17, 2021

Network Reset in Windows 10

For Loop in C

 A simple program that demonstrate for loop using 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 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.





Program Listing

#include <stdio.h>


int main()

{

  int a=0;


  for (a=1; a<=10; a++) {

   printf("%4d",a);

    }

 return 0;

}


Tuesday, November 16, 2021

Addition of Two Numbers Using OOP in Java

Addition of Two Numbers Using OOP in Java

 A simple addition of two number using OOP (Object-Oriented Programming) approach 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 jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.




Program Listing

package test;


import java.util.Scanner;

class  Addition_OOP {

    public int val_a;

    public int val_b;

    public int sum;

    

    static Scanner input = new Scanner(System.in);

    

public void getdata() {

  

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

  System.out.print("Addition of Two Numbers Using OOP in Java ");

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

  System.out.print("Give First Value  : ");

  val_a = input.nextInt();

  System.out.print("Give Second Value :  ");

  val_b = input.nextInt();

 

 }

 

  public void calculate(){

     sum =(val_a + val_b);

  }

          

 

 public void display() {

  System.out.println();

  System.out.println("The sum of " + val_a + " and "

          + val_b + " is " + sum + ".");

  System.out.println();

  System.out.println("End of Program");

  

 }

 

 public static void main(String args[]) {

  Addition_OOP add = new Addition_OOP();

  add.getdata();

  add.calculate();

  add.display();

  input.close();

 }

}

Text Color and Sleep in Dev C++

Text Color and Sleep in Dev C++

 A simple program to demonstrate how to use text color and sleep in Dev C++. I hope you will find my work useful.

Machine Problem in C++

Create a program that will print your  name "Jake" with a delay of 1 second. 

Color should be in alternate. (blue,red,green and yellow) using Dev C++.

blue - 1

red - 4

green - 2

yellow - 6


 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.





Program Listing

/* demo.cpp

   Jake Rodriguez Pomperada, MAED-IT, MIT

   www.jakerpomperada.blogspot.com and www.jakerpomperada.com

   jakerpomperada@gmail.com

   Bacolod City, Negros Occidental Philippines.

*/


#include <iostream>

#include <windows.h>

#include <conio.h>


using namespace std;


int main()

{

        HANDLE color=GetStdHandle(STD_OUTPUT_HANDLE); //just once

       

        // Text Color and Sleep in Dev C++

        while(!kbhit())

{

        cout << "  ";

         SetConsoleTextAttribute(color, 1);

cout<<"J";

        Sleep(1000);

        SetConsoleTextAttribute(color, 4);

        cout<<"a";

         Sleep(1000);

        SetConsoleTextAttribute(color,2);

        cout<<"k";

        Sleep(1000);

        SetConsoleTextAttribute(color, 6);

        cout<<"e";

}

       return 0;

}



Monday, November 15, 2021

US Dollar To Philippine Peso Algorithm and Flowcharts

Human Resource Information System in C++

Human Resource Information System in C++

 A simple Human Resource Information System in C++ that I wrote a long time ago I hope you will find my work useful.

 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.





Program Listing

#include <iostream>

#include <iomanip>

#include <cmath>

#include <stdlib.h>

#include <string.h>

#include <conio.h>

#include <ctype.h>


using namespace std;


const int PASSLEN = 5;

 

void menu()

{

FILE *fp, *ft ;

char another, choice ;

struct employee

{

char emp_id_no[300];

char name[300];

char address[300];

char position[300];

    float salary;

    char email[300];

    long int mobile;

    long int sss,tin,pag_ibig,philhealth;

} ;

struct employee emp;

char employee_id[300];

long int recsize;

    int flag=0;

fp = fopen ("EMPLOYEE.TXT", "rb+" ) ;

if ( fp == NULL )

{

fp = fopen ( "EMPLOYEE.TXT", "wb+" ) ;

if ( fp == NULL )

{

puts ( "Cannot open file" ) ;

exit(0) ;

}

}

recsize = sizeof ( employee ) ;

while ( 1 )

{

        system("CLS");

        system("COLOR F0"); 

        

cout << fixed <<setprecision(2);

        cout <<"\n";

cout << "\n\t==========================================";

cout <<"\n";

cout <<"\n\t HUMAN RESOURCE INFORMATION SYSTEM IN C++";

cout <<"\n\n";

cout << "\tCreated By Jake R. Pomperada,MAED-IT,MIT   ";

cout <<"\n\t==========================================";

cout <<"\n\n";

cout << "\t[1] INSERT EMPLOYEE RECORD";

cout <<"\n";

cout << "\t[2] BROWSE EMPLOYEE RECORD";

cout <<"\n";

cout << "\t[3] EDIT EMPLOYEE RECORDS" ;

cout <<"\n";

cout  <<"\t[4] FIND EMPLOYEE RECORDS";

cout <<"\n";

cout << "\t[5] REMOVE EMPLOYEE RECORDS";

cout <<"\n";

cout  << "\t[6] QUIT PROGRAM" ;

cout <<"\n\n";

cout  <<"\tSELECT YOUR OPTION :=> ";

fflush (stdin) ;

choice = getche() ;

switch ( choice )

{

case '1' :

fseek ( fp, 0 , SEEK_END ) ;

another = 'Y' ;

while ( another == 'Y' )

{

system("cls");

cout <<"\n";

cout << "\t=== INSERT NEW EMPLOYEE RECORD ===";

cout <<"\n\n";

cout <<"\tEmployee ID Number           : ";

                    fflush (stdin) ;

gets(emp.emp_id_no);;

cout << "\tEmployee Name               : ";

fflush (stdin) ;

gets(emp.name);

cout <<"\tEmployee Home Address        : ";

fflush (stdin) ;

gets(emp.address);

                    cout <<"\tEmployee Position            : ";

fflush (stdin) ;

gets(emp.position);

cout << fixed <<setprecision(2);

    cout <<"\tEmployee Salary              : ";

cin >> emp.salary;

cout <<"\tEmployee Email Address       : ";

fflush (stdin) ;

gets(emp.email);

cout <<"\tEmployee Mobile Number       : ";

    scanf("%ld",&emp.mobile);

cout <<"\tEmployee SSS Number          : ";

    scanf("%ld",&emp.sss);

cout << "\tEmployee TIN Number         : ";

scanf("%ld",&emp.tin);

cout << "\tEmployee PAG-IBIG Number    : ";

scanf("%ld",&emp.pag_ibig);

cout << "\tEmployee PHILHEALTH Number  : ";

scanf("%ld",&emp.philhealth);

cout << "\n";

                    fwrite (&emp,recsize, 1,fp) ;

cout << "\n\n";

cout  << "\n\tAdd New Employee Record (Y/N) : " ;

fflush (stdin) ;

another = toupper(getche()) ;

}

break ;

case '2' :

        system("cls");

rewind ( fp );

cout << "\n\n";

                cout <<"\t=== VIEW EMPLOYEE RECORD ===";

                cout <<"\n\n";

while (fread( &emp, recsize, 1, fp ) == 1 )

        {

       cout <<"\n\tEmployee ID No              : " <<emp.emp_id_no;

       cout <<"\n\tEmployee Name               : " <<emp.name;

       cout <<"\n\tEmployee Home Address       : " <<emp.address;

       cout <<"\n\tEmployee Position           : " <<emp.position;

       cout <<"\n\tEmployee Salary             : PHP " <<emp.salary;

       cout <<"\n\tEmployee Email Address      : " <<emp.email;

       cout <<"\n\tEmployee Mobile Number      : " <<emp.mobile;

       cout <<"\n\tEmployee SSS Number         : " <<emp.sss;

       cout <<"\n\tEmployee TIN Number         : " <<emp.tin;

       cout <<"\n\tEmployee PAG-IBIG Number    : " <<emp.sss;

       cout <<"\n\tEmployee PHILHEALTH Number  : " <<emp.philhealth;

       cout <<"\n";

       }

          cout <<"\n\n";

         system("pause");

break ;

case '3' :

another = 'Y' ;

while ( another == 'Y' )

{

system("cls");

          cout <<"\t=== EDIT STUDENT GRADE RECORD ===";

        cout <<"\n\n";

          cout <<"\tEnter Employee ID Number : ";

                cin >> employee_id;

    rewind ( fp ) ;

cout <<"\n";

while ( fread ( &emp, recsize, 1, fp ) == 1 )

{

if ( strcmp ( emp.emp_id_no,employee_id) == 0 )

{

cout <<"\tEnter Employee ID Number  : ";

                    fflush (stdin) ;

                    gets(emp.emp_id_no);

cout << "\tEmployee Name            : ";

fflush (stdin) ;

gets(emp.name);

cout <<"\tEmployee Home Address     : ";

fflush (stdin) ;

gets(emp.address);

                    cout <<"\tEmployee Position         : ";

fflush (stdin) ;

gets(emp.position);

cout << fixed <<setprecision(2);

cout <<"\tEmployee Salary             : ";

cin >> emp.salary;

cout<<"\tEmployee Email Address       : ";

fflush (stdin) ;

gets(emp.email);

cout <<"\tEmployee Mobile Number      : ";

    scanf("%ld",&emp.mobile);

cout <<"\tEmployee SSS Number         : ";

    scanf("%ld",&emp.sss);

cout << "\tEmployee TIN Number        : ";

scanf("%ld",&emp.tin);

cout << "\tEmployee PAG-IBIG Number   : ";

scanf("%ld",&emp.pag_ibig);

cout << "\tEmployee PHILHEALTH Number : ";

scanf("%ld",&emp.philhealth);

cout << "\n";

fseek ( fp, - recsize, SEEK_CUR ) ;

fwrite ( &emp, recsize, 1, fp ) ;

break ;

}

}

if (strcmp(emp.emp_id_no,employee_id) != 0 )

                 {  

                   cout <<"\n\n";

                   cout <<"\tNo Employee Record in the Database.";

                   cout <<"\n";

                   system("pause");

                   break;

                   }

                 cout <<"\n\n";

     cout  <<"\n\tEdit Another Employee Record (Y/N) : ";

fflush ( stdin ) ;

another = toupper(getche());

}

break ;

      case '4' :

   rewind ( fp ) ;

   another = 'Y' ;

while ( another == 'Y' )

{

system("cls");

        cout <<"\t=== Find Employee Records ===";

        cout <<"\n\n";

     cout <<"\tEnter Student ID Number : ";

                 fflush (stdin) ;

gets(employee_id);

cout <<"\n";

rewind ( fp ) ;

while ( fread ( &emp, recsize, 1, fp ) == 1 )

{

if ( strcmp (emp.emp_id_no,employee_id) == 0 )

{

        cout <<"\n";

        cout <<"\n\tEmployee ID No              : " <<emp.emp_id_no;

      cout <<"\n\tEmployee Name               : " <<emp.name;

      cout <<"\n\tEmployee Home Address       : " <<emp.address;

        cout <<"\n\tEmployee Position           : " <<emp.position;

        cout <<"\n\tEmployee Salary             : PHP " <<emp.salary;

          cout <<"\n\tEmployee Email Address      : " <<emp.email;

      cout <<"\n\tEmployee Mobile Number      : " <<emp.mobile;

        cout <<"\n\tEmployee SSS Number         : " <<emp.sss;

        cout <<"\n\tEmployee TIN Number         : " <<emp.tin;

        cout <<"\n\tEmployee PAG-IBIG Number    : " <<emp.sss;

        cout <<"\n\tEmployee PHILHEALTH Number  : " <<emp.philhealth; 

                    cout <<"\n\n";

        system("pause");

         break;

}

}

      if (strcmp(emp.emp_id_no,employee_id) != 0 )

          {

            cout <<"\n\n";

            cout <<"\tNo Employee Record Found in the Database.";

            cout <<"\n";

            system("pause");

            break;

           }

                    cout  <<"\n\n";

cout  <<"\n\tFind Another Student Record (Y/N) : " ;

fflush ( stdin ) ;

another = toupper(getche());

}

break ;

case '5' :

another = 'Y' ;

while ( another == 'Y' )

{

system("cls");

                    cout <<"\t=== REMOVE EMPLOYEE GRADE RECORD ===";

                    cout <<"\n\n";

cout <<"\tEnter Employee ID Number : ";

                    fflush (stdin) ;

gets(employee_id);

cout <<"\n";

ft = fopen ("TEMP.DAT", "wb" ) ;

rewind (fp) ;

while ( fread (&emp, recsize, 1, fp ) == 1 )

{

if ( strcmp (emp.emp_id_no,employee_id) != 0 )

fwrite ( &emp, recsize, 1, ft ) ;

                 else

                flag=1;

                  }

fclose ( fp ) ;

fclose ( ft ) ;

remove ( "EMPLOYEE.TXT" ) ;

rename ( "TEMP.DAT", "EMPLOYEE.TXT" ) ;

    fp = fopen ( "EMPLOYEE.TXT", "rb+" ) ;

       if(flag==1) {

         cout <<"\n\n";

         cout <<"\tRecord Successfully Deleted From the Database.";

         cout <<"\n";

         system("pause");

         }

else {

             cout <<"\n\n";

             cout <<"\tRecord Not Found in the Database.";

             cout <<"\n";

            system("pause");

             }

                    cout <<"\n";

cout << "\tRemove Another Employee Record (Y/N) : " ;

fflush (stdin) ;

another = toupper(getche());

}

break ;

case '6' :

fclose ( fp ) ;

cout <<"\n\n";

cout <<"\tEND OF PROGRAM";

cout <<"\n\n";

cout << "\tThank You Very Much For Using This Software.";

cout <<"\n\n";

system("PAUSE");

exit(0);

}

}

} // End of Code


string passget()

{

char password[PASSLEN], letter;

int loop;

int len;

string password2;

//Get Password and replace letters with *--------------

loop = 0;

while(loop != PASSLEN)

{

password[loop] = '\0';

loop++;

}

loop = 0;

len = 0;

letter = '\0';

while( letter != '\r' )

{

letter = getch();

if( letter == '\b' && password[0] == '\0')

{

loop = 0;

len = 0;

}

else

{

if( letter == '\b' && password[0] != '\0')

{

cout << "\b";

cout << " ";

cout << "\b";

loop--;

password[loop] = '\0';

len--;

}

else

{

if( isprint( letter ) != 0 && loop < PASSLEN)

{

password[loop] = tolower(letter);

cout << "*" ;

}

loop++;

if (loop <= PASSLEN)

len++;

}

}

}

//Convert Password from character array to string

loop = 0;

len = len;

password2 = "";

while (loop != len)

{

password2 = password2+password[loop];

loop++;

}

return password2;

 } // End of Function Password


void start()

{

string password;

system("COLOR F0"); 

cout << "\n\n";

cout << "\tPASSWORD SECURITY VERSION 1.0";

cout << "\n\n";

cout << "\tEnter Your Password: ";

password = passget();

if (password == "admin") {

menu();

}

else {

cout << "\n\n";

cout << "\tPassword Denied Try Again !!!";

start();

}

} // End of Start Function


int main()

 {

  start();

 }