Professional Documents
Culture Documents
Activity 2
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("Gross Pay: " + gpay);
System.out.println("Net Pay: " + netpay);
}
}
Activity 3
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("");
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);
System.out.println("-------------------INPUT-------------------");
System.out.print("Last Name of Sender: ");
String surname = myObj.nextLine();
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 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);
}
}