Saturday, May 29, 2021

Hello World in Scala

 Here is a simple hello world program in Scala 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing

HelloWorld.scala

// HelloWorld.scala
// Jake Rodriguez Pomperada,MAED-IT, MIT
// www.jakerpomperada.com  www.jakerpomperada.blogspot.com
// jakerpomperada@gmail.com
// Bacolod City, Negros Occidental Philippines

object HelloWorld {
    def main(args: Array[String]): Unit = {
        println("Hello, World in Scala !!!");
         
    }
}


Leap Year Checker in Scala

Leap Year Checker in Scala

 A simple Scala program to ask the user to give a year and then the program will check if the given year is a leap year or not using Scala 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.







Program Listing

leap_year.scala

// leap_year.scala
// Jake Rodriguez Pomperada,MAED-IT, MIT
// www.jakerpomperada.com  www.jakerpomperada.blogspot.com
// jakerpomperada@gmail.com
// Bacolod City, Negros Occidental Philippines

import java.util.Scanner;

object leap_year {
 
 def main(args: Array[String]):Unit={
 
  var scanner = new Scanner(System.in);

val isLeapYear = (year: Int) => (((year % 4) == 0) && !(
  ((year % 100) == 0) &&
  !((year % 400) == 0))
)
  println();
  print("\tLeap Year Checker in Scala");
  println("\n");
  
  print("Give a Year : ");
  var year = scanner.nextInt();
 
println("\n");

 if (isLeapYear(year)) {
     println(s"The given year $year is a Leap Year.");
 } else {
     println(s"The given year $year is Not a Leap Year.");
 }

  println();
  println("END OF PROGRAM");
  println();
 }
}

Odd and Even Numbers in Scala

Odd and Even Numbers in Scala

 A simple program to ask the user to give a number and then the program will check if the given number is odd or even using Scala 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing


odd_even.scala


// odd_even.scala
// Jake Rodriguez Pomperada,MAED-IT, MIT
// www.jakerpomperada.com  www.jakerpomperada.blogspot.com
// jakerpomperada@gmail.com
// Bacolod City, Negros Occidental Philippines

import java.util.Scanner;

object odd_even {
 
 def main(args: Array[String]):Unit={
 
  var scanner = new Scanner(System.in);

  // These functions test for even and odd numbers.
def isEven(number: Int) = number % 2 == 0
def isOdd(number: Int) = !isEven(number)


  println();
  print("\tOdd and Even Numbers in Scala");
  println("\n");
  
  print("Give a number : ");
  var a = scanner.nextInt();
 
println("\n");

 if (isEven(a)) {
     println(s"The given number $a is even number.");
 } else {
     println(s"The given number $a is odd number.");
 }

  println();
  println("END OF PROGRAM");
  println();
 }
}

Friday, May 28, 2021

Addition of Two Numbers in Scala

Addition of Two Numbers in Scala

 A simple program to ask the user to give two numbers and then the program will compute the sum of two numbers using Scala 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.








Program Listing


Addition.scala

import java.util.Scanner;

object Addition {
 
 def main(args: Array[String]):Unit={
 
  var scanner = new Scanner(System.in);
  
  println();
  print("Addition of Two Numbers in Scala");
  println("\n");
  
  print("Enter the first number : ");
  var a = scanner.nextInt();
 
  print("Enter the second number : ");
  var b = scanner.nextInt();
  println();

  var sum = a+b;

  println(s"$a + $b = $sum");
  println();
  println("END OF PROGRAM");
  println();
 }
}

Thursday, May 27, 2021

Square and Cube Root a Number in C++

Square and Cube Root in C++

 A simple program to display a square and cube root numerical values in C++ programming languages.

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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing


// square_cube_root.cpp

// Jake Rodriguez Pomperada,MAED-IT, MIT

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

// jakerpomperada@gmail.com


#include <iostream>

#include <iomanip>


using namespace std;


int main(int argc, char *argv[])

{

   int val[4][2] = {1,2,3,4,5,6,7,8};

    cout <<"\n\n";

    cout << "\tSquare and Cube Root in C++";

    cout <<"\n\n";

    cout << "NUMBER" <<

         setw(10) << "SQUARE"  <<

         setw(13) << "CUBE ROOT";

   for (int row=0; row < 4; row++) 

      for (int col=0; col < 2; col++)

   {

     cout <<"\n" << setw(2) << val[row][col] 

          << setw(12) << val[row][col]  *

          val[row][col] << setw(10) <<

           val[row][col]  *  val[row][col] *

        val[row][col]; 

           }

   cout << "\n\n";

   cout <<"\tEnd of Program";

   cout << "\n\n";

    system("PAUSE");

    

}


Wednesday, May 26, 2021

Year Level Checker in Python

Year Level Checker in Python

 I wrote this simple program to demonstrate how to declare and use if statement in Python programming language. What the program does it will ask the user to give a number 1 for Freshmen, 2 for Sophomore, 3 for Juniors, and 4 for Seniors. I hope you like this tutorial and thank you very much,

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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing

# Jake Rodriguez Pomperada, MAED-IT, MIT
# Year_Level.py
# May 26, 2021 Wednesday
# Bacolod City, Negros Occidental

print();
print("\tYear Level Checker in Python");
print();
year_level = int(input("\tWhat is your year level? "));
print();
if (year_level == 1) :
print("\tThe given year level is ",year_level,'.');
print();
print("\tYou are belong to Freshmen.");

if (year_level == 2) :
print("\tThe given year level is ",year_level,'.');
print();
print("\tYou are belong to Sophomore.");

if (year_level == 3) :
print("\tThe given year level is " ,year_level,'.');
print();
print("\tYou are belong to Juniors.");

if (year_level == 4) :
print("\tThe given year level is " ,year_level,'.');
print();
print("\tYou are belong to Seniors.");
print();
print("\tEND OF PROGRAM");


Monday, May 24, 2021

Average Grade Solver in Python

Average Grade Solver in Python

 Machine Problem

Write a program that will ask the student to input the Prelim, Midterm, and Final grades and then, the program will compute the grade and display the result on the screen. The percentage on every grading period are the following: For Prelim, it will be 20%, Midterm will be 30%, and Finals will be 50%.

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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.








Program Listing

# Jake Rodriguez Pomperada, MAED-IT, MIT
# May 24, 2021 Monday
# www.jakerpomperada.com www.jakerpomperada.blogspot.com
# jakerpomperada@gmail.com
# Bacolod City, Negros Occidental

print()
print("\tAverage Grade Solver in Python");
print()
subject = input('\tWhat is the subject? ');
prelim = float(input('\tGive Prelim Grade : '));
midterm = float(input('\tGive Midterm Grade : '));
final = float(input('\tGive Final Grade : '));
solve_grade= (prelim * 0.20) + (midterm * 0.30) + (final * 0.50);
print();
print("\t===== DISPLAY RESULTS =====");
print();
print("\tThe subject is" ,subject,'.');
print();
print("\tThe subject grade is {:2.2f}".format(solve_grade));
print();
print("\tEND OF PROGRAM");


Fried Chicken Ordering System in PHP and MySQL

Fried Chicken Ordering System in PHP and MySQL

 A simple friend chicken ordering system that I wrote in PHP and MySQL. I hope you will find my work useful. Thank you very much.

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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






DOWNLOAD THE FREE AND COMPLETE SOURCE CODE HERE

Sunday, May 23, 2021

Do While Statement in Java

 In this tutorial I will show you how to declare and use do while statement 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 at the following email address for further details.  If you want to advertise on my website, kindly contact me also at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

/* Do_While_Statement.java

 * Mr. Jake Rodriguez Pomperada,MAED-IT, MIT

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

 * jakerpomperada@gmail.com

 * Bacolod City, Negros Occidental Philippiens

 */

public class Do_While_Statement {


/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

    System.out.println();

        System.out.print("\tDo While Statement in Java ");

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

        int a=1;  

        do{  

            System.out.print(" " + a + " ");  

        a++;  

        }while(a<=20);  

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

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

        System.out.println();


}


}



How to Compile and Run Java Programs in Windows Command Line

Saturday, May 22, 2021

If Statement in Java

 In this article, I will discuss how to declare and use if statements in the 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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.





Program Listing

/* If_Statement.java

 * Mr. Jake Rodriguez Pomperada,MAED-IT, MIT

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

 * jakerpomperada@gmail.com

 * Bacolod City, Negros Occidental Philippiens

 */


public class If_Statement {


/**

* @param args

*/

public static void main(String[] args) {

// TODO Auto-generated method stub

    System.out.println();

        System.out.print("\tIf Statement in Java ");

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

        int a=500;

        int b=200;

        if (a>b) { // if true, run the next command

        System.out.print ("\tA is greater than B in terms of numerical value.");

        }

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

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

        System.out.println();

}


}



Friday, May 21, 2021

Fahrenheit To Celsius in VB NET

Fahrenheit To Celsius in VB.NET

 


Problem


Write a program to ask the user to give temperature in Fahrenheit and then the program will convert the given temperature into Celsius equivalent. 

Formula to convert Fahrenheit to Celsius below

 °C = (°F  -  32)  x  5/9

Example 

50°F = 10°C ( (50°F - 32) multiplied by 5/9 = 10°C )

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 at my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.






Program Listing

' Fahrenheit To Celsius in VB.NET

' Prof. Jake Rodriguez Pomperada, MAED-IT, MIT

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

' jakerpomperada@gmail.com

' Bacolod City, Negros Occidental Philippines

' May 17, 2021   Monday  3:56 PM


Public Class Form1


    Shared Function ConvertF2C(f As Double) As Double

        Return (f - 32) * 5 / 9

    End Function


    Private Sub btnConvert_Click(sender As Object, e As EventArgs) Handles btnConvert.Click


        Dim temperature As Double

        Dim result As Double


        temperature = Val(txtFahrenheit.Text)

        If txtFahrenheit.Text = "" Or IsNumeric(txtFahrenheit.Text) = False Then

            MessageBox.Show("Please enter temperature in Fahrenheit.", "Reminder", MessageBoxButtons.OK, MessageBoxIcon.Question)

            txtFahrenheit.Text = ""

            txtFahrenheit.Focus()

        Else

            result = ConvertF2C(temperature)

            txtCelsius.Text = result.ToString("#####.##") & "°C"

            txtCelsius.ReadOnly = True

        End If

    End Sub


    Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click

        txtFahrenheit.Text = ""

        txtCelsius.Text = ""

        txtFahrenheit.Focus()

    End Sub


    Private Sub btnQuit_Click(sender As Object, e As EventArgs) Handles btnQuit.Click

        Dim result = MessageBox.Show(" Are you sure you want to quit the program?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question)

        If result = DialogResult.Yes Then

            Me.Close()

        Else

            Me.Show()

            txtFahrenheit.Text = ""

            txtCelsius.Text = ""

            txtFahrenheit.Focus()

        End If

    End Sub

End Class