Week 2 As Ibarra
Week 2 As Ibarra
Computer Programming 2
Activity Sheet 1
COLLEGE OF ST. CATHERINE OF QUEZON CITY
1. Using JOptionDiaglogBox, create a program that will ask the user to enter two
numbers and display their sum.
2. Write a program that prompts the user to enter the weight of a person in
kilograms and output the equivalent weight in pounds. Output both weights
rounded to two decimal places. (Note that 1 kilogram = 2.2 pounds.) Format
your output with two decimal places.
3. Write a program that calculates and prints the monthly paycheck for an
employee. The net pay is calculated after taking the following deductions:
Income Tax: 10%
SSS: 8%
Medicare: 5%
Pag-Ibig Fund: 7%
Your program should prompt the user to input gross amount and the employee
name. The output should be stored in a file. Format your output to have two
decimal places. A sample output as follows:
Juan Dela Cruz
Gross Amount: 10,000.00
Income Tax: 1,000.00
SSS: 800.00
Medicare: 500.00
Pag-Ibig Fund: 700.00
Total Deductions: 3,000.00
Net Pay: 7,000.00
Rubric for grading programming exercise.
Grading Rubric
Criteria Performance Indicators Points
Correctness The code produces the expected results 5
Logic The code meets the specifications of the problem 5
Efficiency The code is concise without sacrificing correctness and logic. 5
Syntax The code adheres to the rules of the programming language. 5
Total 20
Computer Programming 2
Activity Sheet 2