Thursday, June 16, 2022

Addition of Three Numbers Using Functions in C++

 A simple program to ask the user to give three numbers and then the program will compute the sum of three numbers using a function 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 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.




Program Listing

#include <iostream>

using namespace std;

int add_three_numbers(int x, int y, int c)
{
    return(x+y+c);
}

int main(){
   int a=0,b=0,c=0;
   int sum=0;

   cout <<"\n\n";
   cout << "\tAddition of Three Numbers Using Functions in C++";
   cout <<"\n\n";
   cout << "\tEnter Three Numbers : ";
   cin >> a >> b >> c;
   sum = add_three_numbers(a,b,c);
   cout <<"\n\n";
   cout << "\tThe sum of " << a << ", " << b << " and "
        << c << " is " << sum << ".";
   cout <<"\n\n";
   cout <<"\tEnd of Program";
   cout <<"\n\n";
}



How To Write and Run a C++ Program in CodeBlocks

Tuesday, June 14, 2022

Addition of Two Numbers in TypeScript

 A simple program that I wrote while learning typescript to add the sum of the two given numbers using a typescript 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.






Program Listing

add.ts



var a=10;
var b = 20;

var sum = (a+b);

console.log("Addition of Two Numbers in TypeScript\n");
console.log("The sum of " + a + " and " + b + " is " + sum + ".\n");
console.log("End of Program");

Employee's Record System Using Text File in Java

Employee's Record System in Java Using Text File

 A simple database application that I wrote using a Text file in Java programming language that I called employee's record system demonstrates the concepts of CRUD (Create, Read, Update, and Delete) in the database management system.

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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.







Program Listing


Main.java


/* Main.java
Author : Jake Rodriguez Pomperada, MAED-IT, MIT
Date : June 12, 2022 Sunday 11:32 AM
Tool : Java SDK, Employee's Record System in Java
Website: www.jakerpomperada.com and www.jakerpomperada.blogspot.com
Email : jakerpomperada@gmail.com
Bacolod City, Negros Occidental Philippines
*/

package com.company;

import java.io.*;
import java.util.ArrayList;
import java.util.Scanner;


public class Main {

public static String filename="database.txt";


// main method
public static void main(String[] args) {


createNewFileWithHeaders();
displayServices();


}

// methods

public static void createNewFileWithHeaders(){
File database=new File(filename);

try {

if( database.createNewFile()==true){

try {
FileWriter writer=new FileWriter(filename,true);
writer.append("User ID"+","+"User Name"+","+","+"Job"+","+"Address");
writer.append("\n");
writer.close();
System.out.println("file created succefully!");
} catch (IOException e) {
System.out.println(e);
}

}
else {

}

} catch (IOException e) {
e.printStackTrace();
}
}

public static void createAddNewPerson( Scanner input){
System.out.println("Enter Employee's ID : ");
String id=input.next();
System.out.println("Enter your name :");
String name=input.next();
System.out.println("Enter your job : ");
String job=input.next();
System.out.println("Enter your address");
String address=input.next();
Person person=new Person(id,name,job,address);

try {
FileWriter writer=new FileWriter(filename,true);
writer.append(person.getUserData());
writer.append("\n");
writer.close();
System.out.println("person added succefully!");
} catch (IOException e) {
System.out.println(e);
}

}

public static void deleteRecordById(ArrayList<String> arrayList,Scanner input){
System.out.println("enter any id or word to delete a record");
String searchKey=input.next();
String line;
try {

BufferedReader reader=new BufferedReader(new FileReader(filename));
while ((line=reader.readLine())!=null){
if(line.contains(searchKey)){
System.out.println(line);
continue;
}else {
arrayList.add(line);
}



}

}catch (Exception e){

}
try {
FileWriter writer=new FileWriter(filename);
for (int i=0;i<arrayList.size();i++){
writer.append( arrayList.get(i));
writer.append("\n");


}
writer.close();

}catch (Exception e){
System.out.println(e);
}finally {
System.out.println("done!");
}}

public static void updateRecord(ArrayList<String>arrayList,Scanner input){
try {
BufferedReader reader=new BufferedReader(new FileReader(filename));
System.out.println("please enter any key to update the record");
String searchKey=input.next();
String line;
while ((line=reader.readLine())!=null){
if( line.contains(searchKey)){
System.out.println("enter the text you want to change");
String oldValue=input.next();
System.out.println("enter the new text you want to change");
String newValue=input.next();
arrayList.add(line.replace(oldValue,newValue));


}else {
arrayList.add(line);
}

}


}catch (Exception e){
System.out.println(e);
}

try {
FileWriter writer=new FileWriter(filename);
for(int i=0;i<arrayList.size();i++){
writer.append(arrayList.get(i));
writer.append("\n");
}
writer.close();
}catch (Exception e){
System.out.println(e);
}

}
public static void getUserById(Scanner input){
try {
BufferedReader reader=new BufferedReader(new FileReader(filename));
System.out.println("please enter any key to get the record");
String searchKey=input.next();
String line;
while ((line=reader.readLine())!=null){
if( line.contains(searchKey)){
System.out.println(line);

}

}


}catch (Exception e){
System.out.println(e);
}


}
public static void getAllPersons(){

try {
BufferedReader reader=new BufferedReader(new FileReader(filename));


String line;
while ((line=reader.readLine())!=null){

System.out.println(line);

}

}catch (Exception e){
System.out.println(e);
}





}



public static void displayServices(){
Scanner input = new Scanner(System.in).useDelimiter("\n");

while(true){
ArrayList<String> arrayList=new ArrayList<String>();

System.out.println("====================================================");
System.out.println("Employee's Record System in Java Using Text File" +
"");
System.out.println("====================================================");
System.out.println("[1] Add New Employees Record");
System.out.println("[2] Delete Employees Record");
System.out.println("[3] Update Employees Record");
System.out.println("[4] View Employees Record");
System.out.println("[5] Quit Program");
System.out.println("====================================================");
System.out.print("Select a Number : ");
int x= input.nextInt();
if(x==5) {
System.out.println();
System.out.print("Thank you for using this program.");
System.out.println();
break;
}
else if(x==1){
createAddNewPerson(input);
}
else if(x==2){

deleteRecordById(arrayList,input);
}
else if(x==3){
updateRecord(arrayList,input);
}
else if(x==4){
getUserById(input);

}
else {
System.out.println("please enter a vaild number");
}




}
}





}

Person.java
/* Main.java
Author : Jake Rodriguez Pomperada, MAED-IT, MIT
Date : June 12, 2022 Sunday 11:32 AM
Tool : Java SDK, Employee's Record System in Java
Website: www.jakerpomperada.com and www.jakerpomperada.blogspot.com
Email : jakerpomperada@gmail.com
Bacolod City, Negros Occidental Philippines
*/

package com.company;

public class Person {
// attributes
public String id;
public String name;
public String job;
public String address;

Person(String id , String name,String job, String address){
this.id=id;
this.name=name;
this.job=job;
this.address=address;

}

public String getUserData(){

return id+"," + name +"," + ","+job+"," +address;
}


// methods



}

database.txt
567,Jacob Samuel F. Pomperada,,Data Scientist,Eroreco, Bacolod City, Negros Occidental
8912,Lydia R. Pomperada,,Social Science Teacher,Alijis, Bacolod City, Negros Occidental
345,Virgilio V. Pomperada,,Agriculture Teacher,Alijis, Bacolod City, Negros Occidental
983,Leslie Vinky P. Pepito,,Electronics Engineer,Alijis, Bacolod City, Negros Occidental




Monday, June 13, 2022

Tuition Fee Discount Calculator in Visual Basic 6

Tuition Free Discount Calculator in Visual Basic 6

 A simple program that I wrote to compute the tuition fee discount calculator that I wrote using Microsoft Visual Basic 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.







Program Listing


Private Sub Command1_Click()
Dim solve_tuition As Double
Dim discount As Double

Select Case True
        Case optcash.Value
        
        ' Cash 10% Discount
            discount = Val(Text1.Text) * 0.1
    
    solve_tuition = Val(Text1.Text) - discount
    
    Text2.Text = Round(Str(solve_tuition), 2)
        Case opttwo.Value
           ' Two Payments 5% interest

    interest = Val(Text1.Text) * 0.05
    
    solve_tuition = Val(Text1.Text) + interest
    
    Text2.Text = Round(Str(solve_tuition), 2)
           
           
        Case optthree.Value
            
            ' Three Payments 10% interest
    
    interest = Val(Text1.Text) * 0.1
    
    solve_tuition = Val(Text1.Text) + interest
    
    Text2.Text = Round(Str(solve_tuition), 2)
    End Select
    



End Sub



Employee's Record System in C

Employee's Record System in C

 A simple employee's record system that I wrote using C programming language to demonstrate how to use different data types.

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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing

/* variables.c

   Written By      : Mr. Jake R. Pomperada,BSCS, MAED-IT

   Date           : November 18, 2018    Sunday  7:53 PM

   Tool           : Dev C++ 5.11

   Location      :  Bacolod City, Negros Occidental

   Email         : jakerpomperada@yahoo.com and jakerpomperada@gmail.com

*/


#include <stdio.h>


int main() {

char full_name[200];

char position[200];

int age=0;

float wage=0.00;

    double yearly_salary=0.00;

char gender,ch;

printf("\n\n");

printf("\tEmployee's Record System in C"); 

printf("\n\n");

printf("\tGive Employee's Name             : ");

fgets(full_name,200, stdin);

printf("\tGive Employee's Age              : ");

scanf("%d",&age);

ch = getchar (); 

printf("\tGive Employee's Position         : ");

    fgets(position,200, stdin);

printf("\tWhat is Employee's Wage          : ");

scanf("%f",&wage);

printf("\tWhat is Employee's Yearly Salary : ");

scanf("%lf",&yearly_salary);

ch = getchar (); 

printf("\tWhat is Employee's Gender        : ");

    scanf("%c",&gender);

printf("\n\n");

printf("\t ===== DISPLAY RESULT =====");

printf("\n\n");

printf("\t Employee's Name           : %s",strupr(full_name));

printf("\t Employee's Age            : %d\n " ,age);

printf("\t Employee's Position       : %s" ,strupr(position));

printf("\t Employee's Wage           : PHP %.2f\n" ,wage);

printf("\t Employee's Yearly Salary  : PHP %.2lf\n" ,yearly_salary);

printf("\t Employee's Gender         : %c\n" ,toupper(gender));

    printf("\n\n");

printf("\t ===== END OF PROGRAM =====");

    printf("\n\n");

return 0;

}



Sunday, June 12, 2022

Celsius To Fahrenheit Using Scala

Celsius To Fahrenheit Using Scala

 A simple program asks the user to give a temperature in celsius and then the program will convert the given Celsius temperature in Fahrenheit 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 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.




Program Listing


/* Celsius_Fahrenheit.scala
   Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
   www.jakerpomperada.blogspot.com and www.jakerpomperada.com
   jakerpomperada@gmail.com
   November 13, 2021  3:21 PM  Saturday
   Bacolod City, Negros Occidental
 */


import java.util.Scanner;

object Celsius_Fahrenheit {

  def main(args: Array[String]) : Unit = {

    var input = new Scanner(System.in);

    print("\n\n");
    print("\tCelsius To Fahrenheit Using Scala");
    print("\n\n");
    print("\tEnter Celsius Temperature  : ");
    var celsius = input.nextDouble();

    var  fahrenheit = (celsius * 9 / 5 + 32);

    print("\n");
    print("\t===== DISPLAY RESULTS =====");
    print("\n\n");
    print("\tCelsius Temperature    : " + f"$celsius%5.2f \u00B0C");
    print("\n\n");
    print("\tFahreneit Temperature  : " + f"$fahrenheit%5.2f \u00B0C");
    print("\n\n");
    print("\tEND OF PROGRAM");
    print("\n\n");
  }
}

Saturday, June 11, 2022

Visiting Vito Church in Sagay City

Yearly Compounded Interest in C#

 A simple program to compute the yearly compounded interest on a  loan 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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.






Program Listing

using System;
using System.Windows.Forms;

namespace CompoundInterestGUI
{
  public partial class MainForm : Form
  {
    public MainForm()
    {
      InitializeComponent();
    }

    private void btnReset_Click(object sender, EventArgs e)
    {
      txtAmount.Text = txtInterestRate.Text = String.Empty;
      spnYears.Value = spnYears.Minimum;
      dataGridView1.Rows.Clear();
    }

    private void btnCalc_Click(object sender, EventArgs e)
    {
      try
      {
        double interestRate = double.Parse(txtInterestRate.Text);
        double amount = double.Parse(txtAmount.Text);
        int years = (int)spnYears.Value;
        double interest;

        for (int year = 1; year <= years;year++)
        {
          interest = amount * interestRate / 100;
          amount += interest; 
          dataGridView1.Rows.Add(year, amount, interest);
          
        }
      }
      catch (Exception ex)
      {
        MessageBox.Show(ex.ToString());
      }
    }

    private void MainForm_Load(object sender, EventArgs e)
    {
      txtAmount.Focus();
    }
  }
}

Friday, June 10, 2022

US Dollar To Philippines Peso Using Currency Filter in AngularJS

US Dollar To Philippines Peso Using Currency Filter in AngularJS

 Machine Problem

Write a program that uses a currency filter that will accept US Dollar value and then the program will convert the US Dollar value into Philippine Peso equivalent, and display the results on the screen.

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.

Please subscribe to my channel  https://www.youtube.com/channel/UCOs-lpOoIeJoh6gpJthPoGg

=================================================


Want to support my channel?

GCash Account

Jake Pomperada

09173084360


Paypal

https://paypal.me/jakerpomperada


Patreon

https://www.patreon.com/jakerpomperada


Thank you very much for your support.





Program Listing

index.htm

<!-- index.htm
  Author   : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
  Date     : August 1, 2021  10:06 AM
  Place    : Bacolod City, Negros Occidental
  Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
  Email    : jakerpomperada@gmail.com
 -->
<html>
<head>
  <title>US Dollar To Philippines Peso Using Currency Filter in AngularJS</title>
</head>
<style>
body {
  font-family: arial;
  font-size: 20px;
  font-weight: bold;
}
</style>
<script type="text/javascript" src="angular.min.js">
</script><br>
<h3>
US Dollar To Philippines Peso Using Currency Filter in AngularJS
</h3>
<div ng-app="">
  <form>
  <table border="0" cellspacing=10>
 <tr>
  <td>Enter US Dollar Value </td>
  <td><input type="number"  ng-model="us_dollar"
    ng-init="us_dollar=0"></td>
  </tr>
</table>
  </form>
  <span>
The US Dollar(s) value is $ {{us_dollar}} the Philippine
Peso(s) equivalent is {{ us_dollar * 52.50 | currency : "PHP "}} </span>
</div>
</body>
</html>