You are on page 1of 5

Activity 1

public class Act1 {


public class void main(String[] args)
{
System.out.println("Hello World");
System.out.println("Welcomg to 12 ICT");

System.out.println("My Name is Van Adolf Tirao");


}
}

Activity 2

public class Sample


{
public static void main(String[] args)
{
System.out.println("Employee Name: Van Adolf");
System.out.println("Employee Number: 001000");
System.out.println("Employee Status: Active");
System.out.println("Deparment: Personnel");

System.out.println("");

System.out.println("Days Work: 22 Days");


System.out.println("Daily Rate: 300.18");
System.out.println("Gross Pay: xxxx.xx");
System.out.println("Less Tax: 270.00");
System.out.println("CA: 450");

System.out.println("");

System.out.println("Net Pay: xxxx.");

double days = 22;


double rate = 300.18;
double gpay = days * rate;

double tax = 270;


double ca = 450;
double sss = 120;

double a = tax + ca + sss;


double netpay = gpay - a;

System.out.println("");
System.out.println("Gross Pay: " + gpay);
System.out.println("Net Pay: " + netpay);
}
}
Activity 3

public class Demo


{
public static void main(String[] args)
{
System.out.println("User Name: Van Adolf Tirao");
System.out.println("User ID: 12345");
System.out.println("Service Code: D");
System.out.println("Service Type: Water Domestic");

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

System.out.println("Present Reading: 2139 cu.m.");


System.out.println("Previous Reading: 2032 cu.m");
System.out.println("Consumption: xxxx.xx");
System.out.println("Rate per cu.m.: 27.35");

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

System.out.println("Monthly Water Bill: xxxx.xx");

int SentReading = 2139;


int ViousReading = 2032;
int consumption = SentReading - ViousReading;

double rate = 27.35;


double Wbill = consumption * rate;

System.out.println("");
System.out.println("Consumption = Present Reading - Previous Reading");
System.out.println("Consumption: " + consumption);

System.out.println("");
System.out.println("Monthly Water Bill: Consumption * rate per cu.m.");
System.out.println("Monthly Water: " + Wbill);
}
}
Activity 4
import java.util.Scanner;
public class ActivityA
{
public static void main(String[] args)
{
Scanner myObj = new Scanner(System.in);

float delivery = 30.50f;

System.out.println("-------------------INPUT-------------------");
System.out.print("Last Name of Sender: ");
String surname = myObj.nextLine();

System.out.print("First Name of Sender: ");


String name = myObj.nextLine();

System.out.print("Enter Delivery Code: ");


float code = myObj.nextInt();

System.out.print("Enter Letter Fee: ");


float fee = myObj.nextInt();

float totalfee;
totalfee = code + fee + delivery;

System.out.println("");
System.out.println("");
System.out.println("-------------------OUTPUT-------------------");
System.out.println("Sender Name: " + name + " " + surname);
System.out.println("Delivery Code: " + code);
System.out.println("Delivery Type: Special");
System.out.println("Letter Type: CityWide");
System.out.println("Letter fee: " + fee);
System.out.println("Delivery Fee: " + delivery);

System.out.println("");
System.out.println("Total Fee: " + totalfee);

}
}
Activity 5
import java.util.Scanner;
public class ActivityB
{
public static void main(String[] args)
{
Scanner myObj = new Scanner(System.in);

float Units = 24f;


float regsfee = 350.00f;
float miscfee = 1800f;

System.out.print("Last Name of Student: ");


String surname = myObj.nextLine();

System.out.print("First Name of Student: ");


String name = myObj.nextLine();

System.out.print("Deparment Code(2 - 20): ");


int Dcode = myObj.nextInt();

System.out.print("ID Number(111 - 555): ");


int idnum = myObj.nextInt();

System.out.print("Rate per Unit(150 - 690): ");


float unit = myObj.nextInt();

float tuitionfee;
tuitionfee = unit * Units;

float totalpay;
totalpay = regsfee + miscfee + tuitionfee + regsfee;

System.out.println(" ");
System.out.println(" ");
System.out.println("Student Name: " + name + " " + surname);
System.out.println("Department Code: " + Dcode);
System.out.println("Department: Engineering");
System.out.println("ID Number: " + idnum);
System.out.println("Number of Units: 24");
System.out.println("Rate per Unit: " + unit);

System.out.println("Total Payable: " + totalpay);

}
}

You might also like