Professional Documents
Culture Documents
Objectives:
• Understand the program development life cycle and apply it in problem solving
• Apply any programming languages learned previously
Instructions:
Given the problem below, perform the Basic Steps of Program Development Life
Cycle.
Problem:
Create a program that will Enter or accept the Sales Amount of the sales agent, then compute
and display the Commission earned based on the Sales amount range and percentage rate on
the table below:
Tasks:
There is a need for a program that would calculate and display the commission of the
sales agent through the input of sales amount by the user. Commission depends on
the sales amount and its equivalent percentage rate.
Answers:
Problem Definition: User will input the sales amount of the sales agent. The
program shall then compute and display the commission.
B. ALGORITHM: (5 points)
1. Start
2. Input the sales amount (sa).
3. If (sa <= 1000)
Compute commission as sales amount * .01
Else if (sa >= 1001 && sa <= 5000)
Compute commission as sales amount * .05
Else if (sa >= 5001 && sa <= 10000)
Compute commission as sales amount * .10
Else if (sa >= 10001)
Compute commission as sales amount * .15
4. Display commission
5. Stop
…
Step 4. Coding and Debugging. Write the Program Codes below. (10 points)
Note: You can use any programming language that you know already.
SOURCE CODES:
C#
using System;
namespace Activity
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("");
Console.WriteLine("Commission: " + Math.Round(comm, 2) + " Pesos");
Console.ReadKey();