Professional Documents
Culture Documents
ET 2.1 Salary Scheme
ET 2.1 Salary Scheme
ET 2.1 Salary Scheme
Submitted by:
Zechariah Iziel Culanag
Brand Noah Aquino
Stanislaus Plunket
Josh Daryll Estomago
Submitted to:
Ms. Carmela Fe Acuyan
Table Of Contents
- Program Design
Part 1
allenge
Introduction to the Ch
, Flow cha rt, Pseud ocode
Algorithm
Part 2 - Challenge
Raw codes
Running codes
Reflection
PART 1
ALgorithm
Salary Scheme A
Step 1: Start.
Step 2: Declare variables a1, an, r, n, sn
Let a1 be starting amount
let an be amout to have
let r be percentage of increase
let n be how many years
let sn be total amount of salary
Step 1: Start.
Step 2: Declare variables a1, an, r, n, sn
Let a1 be starting amount
let an be amout to have
let r be percentage of increase
let n be how many years
let sn be total amount of salary
Step 8: End
Flowchart - A
START
Declare variables
an, a1, r, n, Sn
an=a1(1-r^n)
a5=150,000(2^5-1)
a5=2,400,000
sn=a1(1-r^n)/1-r
s5=150,000(1-
2^5)/1-2
s5=4,650,000
END
Flowchart - B
START
Declare variables
an, a1, r, n, Sn
an=a1(1-r^n)
a5=250,000(2^5-1)
a5=4,000,000
sn=a1(1-r^n)/1-r
s5=250,000(1-
2^5)/1-2
s5=7,750,000
END
Pseudocode!
Program START
Input category
Input amount
Initialize category and amount
Display Year salary + value
Display Partial salary + value
Display Monthly salary + value
Display Yearly rate of increase + value
Display Common Ratio+ value
Print
Input 5th year salary + value
Input Sum of salary in 5 years + value
Print
END Program
PART 2
Raw COdes
import java.util.Scanner;
import java.util.ArrayList;
//Inputs
System.out.println("Please enter the yearly salary of
Scheme1: ");
scheme1.add(scan_obj.nextDouble());
1);
Scheme2: ");
scheme2.add(scan_obj.nextDouble());
1);
Raw COdes
//Computations
double s1_total = 0;
double s2_total = 0;
//Conclusion
System.out.println("\nConclusion:");
if (s1_total > s2_total) {
System.out.println("Salary Scheme 1 is superior.");
} else if (s2_total > s1_total){
System.out.println("Salary Scheme 2 is superior.");
} else {
System.out.println("The two schemes are equal.");
}
}
}
Running
Codes
Reflection!
How did this activity give an
effect to you?