You are on page 1of 2

Course: Core Skills

Module: Problem Solving


Topic: Conditional Operations
Faculty Supporting Materials
Observation Points
1. Ensure that associates are analyzing the problem before starting
with implementation.
2. Ensure that associates are defining the contract and purpose
3. Ensure that associates are not defining the business logic inside
main module
4. Ensure that proper naming conventions are followed
5. Ensure that associates are not using read and display in business
methods.
6. Ensure that associates are including test cases for boundary
values
Problem Scenario
Problem Characteristics
1. Should involve conditional operations
2. Should involve logical operations
3. Should be extensible and have scope for changes to logic
Sample Problem Scenario 1:
Write a program that compares 3 numbers, and returns the middle
number.
Sample Problem Scenario 2:
Ezee Shop's billing system calculates the cost of a product as per
government tax rules. A tax of 8% for purchase above Rs. 1000/-, a tax
of 10% is applicable for purchase above Rs. 5000/-, A tax of 12% is
applicable for purchase above Rs. 10000/-. A cess of 2% is applicable
on tax amount. If the tax amount is more than Rs. 10000/-, cess will be
5%. Write a program to calculate the total cost of a product based on
the given tax and cess rates.
Sample Problem Scenario 3:
Tech First Solutions has the following pay structure. Gross Pay = Basic
Pay + DA + HRA + Performance Pay.
Designatio
n
Junior
Engineer
Senior
Engineer

DA
15% of basic
pay
17% of basic
pay

HRA
20% of basic pay
23% of basic pay

Performance pay is based on the following criteria


Designatio
n
Junior
Engineer
Junior
Engineer
Junior
Engineer
Junior
Engineer
Junior
Engineer
Junior
Engineer
Senior
Engineer
Senior
Engineer
Senior
Engineer
Senior
Engineer
Senior
Engineer
Senior
Engineer

Gra
de

Ratin
g

Performance Pay

C1

30% of basic pay

C1

25% of basic pay

C1

20% of basic pay

C2

50% of basic pay

C2

45% of basic pay

C2

40% of basic pay

C2A

65% of basic pay

C2A

60% of basic pay

C2A

55% of basic pay

C3

75% of basic pay

C3

72% of basic pay

C3

67% of basic pay

Write a program that calculates gross pay of an employee.


References:
Books:
1. Beginning Programming for Dummies, 4th Edition, by Wallace
Wang (available at Books 24x7)
2. Java All-In-One Desk Reference For Dummies, 2nd Edition, by
Doug Lowe and Barry Burd (available at Books 24x7)
Links
1. http://download.oracle.com/javase/tutorial/java/nutsandbolts/op2
.html
2. http://download.oracle.com/javase/tutorial/java/nutsandbolts/flow
.html
3. http://download.oracle.com/javase/tutorial/java/nutsandbolts/ops
ummary.html
4. http://download.oracle.com/javase/tutorial/java/nutsandbolts/flow
summary.html

You might also like