Sunday, August 30, 2015

Passed and Failed Grade Counter in Java

In this article I would like to share a sample program that will ask the user to enter a series of grades and then our program will count and display the passing and failing grades among students in a class using one dimensional array in Java.

If you have some questions about programming, about my work please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.

Sample Program Output


Program Listing

/*
pass_failed_grades_array.java
Programmer By: Mr. Jake R. Pomperada, MAED-IT
Date : July 23, 2015
Tools: NetBeans 8.0.2, Java SE 8.0

Problem No. 4:
  
Write a program that will ask the user to give ten grades and then
the program will enumerate the passing and failing grade based on
the grades given by the user. Take note the passed grade is 75%.
*/
              

import java.util.Scanner;

class pass_failed_grades_array{
    
public static void main(String[] args) {
      
     Scanner input = new Scanner(System.in);
     char ch;
        
  do { 
      int [] values; 
      values  = new int[10];  
      int x=0;
      int no_passed=0, no_failed=0;
      System.out.print("PASS AND FAILED GRADE PROGRAM");
      System.out.println();
      for (int a=0; a<10; a++)
      {
         x=1;
         x+=a;
         System.out.print("Enter value in item no. " + x + " : ");
         values[a] = input.nextInt();
        }       
         System.out.println(); 
         System.out.print("LIST OF PASSING GRADES");
         System.out.println();
      for (int a=0; a<10; a++)
      {
         if(values[a]>= 75) {
                System.out.print(" " + values[a]+ " ");
                no_passed++;  
           }
       
      }        
      System.out.println(); 
      System.out.print("LIST OF FAILING NUMBERS ");
      System.out.println(); 
      for (int a=0; a<10; a++)
      {
         if(values[a] < 75) {
               System.out.print(" " + values[a]+ " ");
               no_failed++;  
              }
      }     
     System.out.println("\n\n");  
     System.out.println("Number of Passing Grade is " + no_passed + ".");
     System.out.println("Number of Failing Grade is " + no_failed + ".");
     System.out.println();
     System.out.print("\nDo you want to continue (Type y or n) : ");
     ch = input.next().charAt(0);                        
     } while (ch == 'Y'|| ch == 'y');  
     System.out.println();
     System.out.print("\t THANK YOU FOR USING THIS PROGRAM");
     System.out.println("\n\n");
  }
} // End of Code
    

Login Security in Visual Basic 6

Visual Basic 6 is one of the most popular visual programming language developed by Microsoft way back in 1998 ever since this language used in many applications such as business application programs I have developed many customized programs in Visual Basic 6 throughout in my career however I gradually move on in web programming in PHP and MySQL because of the demand and ever changing needs of my clients. Anyway in this article I would like to share with you a login security system that I wrote in Visual Basic 6 and Microsoft Access that will protect your database application against unauthorized access I called this program login security system.

If you have some questions about programming, about my work please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.




Sample Program Output



Saturday, August 29, 2015

Positive and Negative Number Lister Using One Dimensional Array in Java

In this program that I wrote it will ask the user to enter a series of numbers and then the program will check and determines which of the number given by the user is the positive or negative number using one dimensional array in Java.

If you have some questions about programming, about my work please send mu an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.


Sample Program Output

Program Listing

/*
positive_negative_numbers_array.java
Programmer By: Mr. Jake R. Pomperada, MAED-IT
Date : July 23, 2015
Tools: NetBeans 8.0.2, Java SE 8.0

Problem No. 4:
  
Write a program that will ask the user to give ten numbers and then
the program will enumerate the positive and negative numbers based 
on the given numbers by the user.
*/
              

import java.util.Scanner;

class positive_negative_numbers_array{
    
public static void main(String[] args) {
      
     Scanner input = new Scanner(System.in);
     char ch;
        
  do { 
      int [] values; 
      values  = new int[10];  
      int x=0;
      System.out.print("POSITIVE AND NEGATIVE NUMBERS PROGRAMS");
      System.out.println();
      for (int a=0; a<10; a++)
      {
         x=1;
         x+=a;
         System.out.print("Enter value in item no. " + x + " : ");
         values[a] = input.nextInt();
        }       
         System.out.println(); 
         System.out.print("LIST OF POSITIVE NUMBERS");
         System.out.println();
      for (int a=0; a<10; a++)
      {
         if(values[a]>= 0) {
                System.out.print(" " + values[a]+ " ");
                }
       
      }        
      System.out.println(); 
      System.out.print("LIST OF NEGATIVE NUMBERS ");
      System.out.println(); 
      for (int a=0; a<10; a++)
      {
         if(values[a] < 0) {
               System.out.print(" " + values[a]+ " ");
                }
      }     
     System.out.println("\n\n"); 
     System.out.print("\nDo you want to continue (Type y or n) : ");
     ch = input.next().charAt(0);                        
     } while (ch == 'Y'|| ch == 'y');  
     System.out.println();
     System.out.print("\t THANK YOU FOR USING THIS PROGRAM");
     System.out.println("\n\n");
  }
} // End of Code
    

Average Grade Using One Dimensional Array in Java

In this example I wrote a program that will compute the average grade of the student on his or her several subjects using one dimensional array in Java the code is very simple to understand and use.

If you have some questions about programming, about my work please send me an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.


Sample Program Output

Program Listing

/*
average_array.java
Programmer By: Mr. Jake R. Pomperada, MAED-IT
Date : July 23, 2015
Tools: NetBeans 8.0.2, Java SE 8.0

Problem No. 2:
  
Write a program that will ask the user to give eight grades for
eight subjects and then our program will find average grade of 
the student from the eight subjects.
*/
              

import java.util.Scanner;

class grade_array {
    
public static void main(String[] args) {
      
     Scanner input = new Scanner(System.in);
     char ch;
     String[] subjects = new String[]
     {"Computer", "Math", "English","Physical Education",
      "History","Science","Music and Arts","Filipino"};
     
  do { 
      int [] values; 
      values  = new int[8];  
      int x=0,average_grade=0,total_sum=0;
      System.out.print("Average Grade Solver");
      System.out.println();
      for (int a=0; a<8; a++)
      {
         x=1;
         x+=a;
         System.out.print("Enter your subject grade on " + subjects[a] + " : ");
         values[a] = input.nextInt();
         total_sum+=values[a];
         average_grade = total_sum/8;
      }
     System.out.println(); 
     System.out.println();
     System.out.print("Your average grade is 8 subject is " + average_grade + ".");
     System.out.println();
     System.out.print("\nDo you want to continue (Type y or n) : ");
     ch = input.next().charAt(0);                        
     } while (ch == 'Y'|| ch == 'y');  
     System.out.println();
     System.out.print("\t THANK YOU FOR USING THIS PROGRAM");
     System.out.println("\n\n");
  }
} // End of Code

Odd and Even Numbers in Java Using One Dimensional Array

About this program that I wrote it will ask the user to enter a series of integer number and then the number is being stored in one dimensional array. Our program will enumerate the odd and even numbers based of the numbers given by our user.

If you have some questions about programming, about my work please send mu an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.


Sample Program Output

Program Listing

/*
odd_even_numbers_array.java
Programmer By: Mr. Jake R. Pomperada, MAED-IT
Date : July 23, 2015
Tools: NetBeans 8.0.2, Java SE 8.0

Problem No. 3:
  
Write a program that will ask the user to give ten numbers and then
the program will enumerate the odd and even numbers based on the 
given numbers by the user.
*/
              

import java.util.Scanner;

class odd_even_numbers_array {
    
public static void main(String[] args) {
      
     Scanner input = new Scanner(System.in);
     char ch;
        
  do { 
      int [] values; 
      values  = new int[10];  
      int x=0;
      System.out.print("ODD AND EVEN NUMBERS PROGRAMS");
      System.out.println();
      for (int a=0; a<10; a++)
      {
         x=1;
         x+=a;
         System.out.print("Enter value in item no. " + x + " : ");
         values[a] = input.nextInt();
        }       
         System.out.println(); 
         System.out.print("LIST OF EVEN NUMBERS");
         System.out.println();
      for (int a=0; a<10; a++)
      {
         if(values[a]%2 == 0) {
                System.out.print(" " + values[a]+ " ");
                }
      }        
      System.out.println(); 
      System.out.print("LIST OF ODD NUMBERS ");
      System.out.println(); 
      for (int a=0; a<10; a++)
      {
         if(values[a]%2 != 0) {
               System.out.print(" " + values[a]+ " ");
                }
      }     
     System.out.println("\n\n"); 
     System.out.print("\nDo you want to continue (Type y or n) : ");
     ch = input.next().charAt(0);                        
     } while (ch == 'Y'|| ch == 'y');  
     System.out.println();
     System.out.print("\t THANK YOU FOR USING THIS PROGRAM");
     System.out.println("\n\n");
  }
} // End of Code
    



Sum and Average of Five Numbers Using Two Dimensional Array in Java

Two dimensional array is also known as matrix in Java in this article I would like to share with you a sample program that I wrote that demonstrate how to declare and use two dimensional array in Java programming language I called this program Sum and Average of Five Numbers Using Two Dimensional Array in Java.

What does the program will do is to ask the user to enter five numbers and then the program will compute the sum and average of the five numbers given by the user.

If you have some questions about programming, about my work please send mu an email at jakerpomperada@gmail.com and jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.


Sample Program Output


Program Listing

/*
average_sum_two_dimensional.java
Programmer By: Mr. Jake R. Pomperada, MAED-IT
Date : July 23, 2015
Tools: NetBeans 8.0.2, Java SE 8.0

Problem No. 1:
  
Write a program that will ask the user to give five numbers 
and then our program will find the total sum and average of
five numbers using two dimensional array.
*/


import java.util.Scanner;

class average_sum_two_dimensional {
    
public static void main(String[] args) {
      
     Scanner input = new Scanner(System.in);
     char ch;
   
  do { 
      int [][] values; 
      values  = new int[5][1];  
      int total_sum=0, average=0;
      System.out.print("Sum and Average of Five Numbers");
      System.out.println();
      for (int a=0; a<5; a++)
        for (int b=0; b<1; b++) {  
      {
        
         System.out.print("Enter value in item no." + (a+1) + " : ");
          
         values[a][b]= input.nextInt();
         total_sum += values[a][b];
         average = total_sum/5;
      }
    } 
     System.out.println(); 
     System.out.print("The total sum is " + total_sum + ".");
     System.out.println();
     System.out.print("The average of five numbers is " + average + ".");
     System.out.println();
     System.out.print("\nDo you want to continue (Type y or n) : ");
     ch = input.next().charAt(0);                        
     } while (ch == 'Y'|| ch == 'y');  
     System.out.println();
     System.out.print("\t THANK YOU FOR USING THIS PROGRAM");
     System.out.println("\n\n");
  }
}


Sunday, August 16, 2015

Objects in JavaScript

In this article I would like to share with you sample program in JavaScript  that will teach you how to create an object and calling an object. Objects is a basic thing in Object Oriented Programming principle which contains properties and methods. The code is very simple and easy to understand.

If you have some questions about programming, about my work please send me an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.





Sample Program Output


Program Listing

<html>
    <head>
        <title> Objects in JavaScipt</title>
    <head>
        <style>
h1,h3  {
    font-family:arial;
color: blue;
   };
 </style>  
    <body>      
 <h1> Objects in JavaScript </h1>
 <br>
      <script>
            var person = {
                firstname : 'Jacob Samuel',
                lastname : ' Pomperada ',
                
                greet : function(persons_name) {
                    alert(' Hello ' + persons_name + ' How are you today? ');
                    },
                
                greet2 : function() {
                    alert('Hi ' + this.firstname  + ' ' +  this.lastname + ' God Bless you');
                } 
        };
            
            document.write('<h3> Persons First Name: ' + person.firstname + '</h3>');
            document.write('<br>');
            document.write('<h3> Persons Last Name: ' + person.lastname + '</h3>');
            person.greet('jacob');
person.greet2('jacob');
        </script>           
    </body>
</html>

If - Else If - Else Statement in JavaScript

In this article I would like to share with you how to use If - Else If - Else Statement in JavaScript. This is one of the most common conditional statement in JavaScript  that will make your program intelligent.

If you have some questions about programming, about my work please send me an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.


Sample Program Output


Program Listing

<html>
    <head>
        <title> If-Else If Statement</title>
    <head>
        
    <body>      
           
        <script>
           var age = 34;
            
            if (age < 18) {
                if (age > 0) 
{
                alert (" You are still a minor.");
}
                else {
     alert ("Sorry Invalid Age. Try Again !!!");
                     }
            } else if (age >= 18) 
   {
                alert ("You are already an Adult." )
                }
        </script>
</body>
</html>

Saturday, August 15, 2015

Function in JavaScript

In this article I will show you how to declare and use a function in Javascript. A function or method in other programming language like in Java is a module design to return a value. In our example I wrote a function named addition with two passing parameters that will be compute by our function.

If you have some questions about programming, about my work please send me an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.



Sample Program Output


Program Listing


<html>
    <head>
        <title> Function in JavaScript</title>
    <head>
        
    <body>
        
        
        <script>
            function addition(a, b) {
                    return a + b;
                                            }
            var sum = addition(10+5,5);
                                            
            alert("The total sum is " + sum + ".");
        </script>
   </body>
</html>

For Loop in JavaScript

In this article I would like to share for loop statement in Javascript. For loop statement is one of the most common looping statement in C/C++,Java,C# as well as JavaScript there are three parts in this loop statement first is the initialization of value, the second part is the condition and the third part is the increment or decrement.

If you have some questions about programming, about my work please send me an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com. People here in the Philippines can contact me at  my mobile number 09173084360.

Thank you very much and Happy Programming.




Sample Program Output


Program Listing

<html>
    <head>
        <title> For Loop Statement in JavaScript</title>
    <head>
        
    <body      
      <font size='12' face='arial'> 
        <script>
           for(var a =1; a<=100; a++) {
               document.write(" "+a+ " ");
                        
                        
            }
        </script>
  </font>
   </body>
</html>