CSCC_102_Lab_Exercise_3-1
CSCC_102_Lab_Exercise_3-1
WORK SHEET
Laboratory Exercise No. 3.1
Name: __________________________________________________
Meshach Dane Asis Score:
Date: ___________________________________________________
09/20/2024
OBJECTIVES
At the end of the activity, the students must have been able to do the following:
• complete an IPO chart for the Tom and Jerry Lawn Service problem;
• write the corresponding C++ instructions for each item declaration in the IPO chart;
• outline the algorithm using a flowchart; and
• desk-check the algorithm using their own set of data.
PROBLEM 1
Tom and Jerry opened a new lawn service. They provide three services: mowing, fertilizing, and
planting trees. Mowing costs Php 750 per 100 square meters, fertilizing is Php 550 per application,
and planting a tree is Php 400. Write a program that prompts the user to enter the area of the lawn
to be mowed, the number of fertilizing applications, and the number of trees to be planted. The
program then displays the billing amount for each lawn service and the total billing amount.
(Assume that the user orders all three services.) Complete an IPO chart for this problem and write
the corresponding C++ instructions for each IPO item declaration. Outline the algorithm using a
flowchart.
PROCESSING
_____________________________________________________________________________
Processing items:
_____________________________________________________________________________
_____________________________________________________________________________
none
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
OUTPUT
_____________________________________________________________________________
total amount of mowing service
_____________________________________________________________________________
double amountMowingService = 0.0;
total amount of fertilizing service
_____________________________________________________________________________
double amountFertilizingService = 0.0;
_____________________________________________________________________________
total amount of trees planting service double amountPlantingService = 0.0;
_____________________________________________________________________________
total billing amount double totalBilling = 0.0;
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
FLOWCHART
start
stop
DESK-CHECK
Desk-check your algorithm once using your own set of data.
Area of lawn no, of fertilizing application no. of trees planted price of mowing price of fertilizing application price of tree planting
amount of mowing amount of fertilizing application amount of tree planting total billing
750 php 5,500 php 2,000 php 8,250 php
1,500 php 11,000 php 4,000 php 16,500 php