02-23-2012
4,
0
Join Date: Feb 2012
Last Activity: 26 February 2012, 2:25 AM EST
Posts: 4
Thanks Given: 1
Thanked 0 Times in 0 Posts
I have here my assignment can any one teach me please
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Is to compute for the discount of the two variables of TODDLER and KID
2. Relevant commands, code, scripts, algorithms:
Im newbie i dont know T_T
The group F4 and their girlfriend San Chai plans to open a
children’s play area in SM City Pines and has asked your help to create a
very simple script to compute for the bill of a customer.
The playground has 2 areas, the KIDS CORNER and the TODDLERS
PLACE. Charging for the first hour on the KIDS CORNER is pegged at PhP
60.00 and PhP 20 for the next 30 minutes. On the other hand, charging for
the first hour on the TODDLERS PLACE is pegged at PhP 40.00 and PhP 15 for
the next 30 minutes. Discounts are available for patrons who have
exceeded 5 hours. Discounts are computed this way :
5 hours to 7 hours = 10 % of total amount due
more than 7 hours to 8 hours = 12 % of total amount due
more than 8 hours = 15 % of total amount due
The script accepts the following arguments :
NAME OF CUSTOMER
TIME IN (actual time of the day the customer entered the
playground followed by either AM or PM)
TIME OUT (actual time of the day the customer moved out of
the playground followed by either AM or PM)
CUSTOMER TYPE (either TODDLER or KID)
The script would output on screen the total number of hours and
minutes the customer used the playground together with the corresponding
charge and discounts( if any). It will also APPEND on a file called
PLAY.REC all of these information.
HINT : you can use the utility expr and control structures like if, for,
case
Sample Run:
$ <your familyname>playground gepaul 10:30 AM 8:30 PM KID
OUTPUT:
===================================================
F4 and SAN CHAI PLAYGROUND
SM CITY PINES
Jan 15 2012 or system date and time
Name of Customer= gepaul
Customer Type= KID
TIME IN = 10:30 AM
TIME OUT= 8:30 PM
TIME SPENT: 10 hours 0 minutes
CHARGES: 420.00
DISCOUNT: 63.00
AMT. TO PAY: 357.00
thank you for patronage! pls. come again!
3. The attempts at a solution (include all code and scripts):
Im newbie i dont know T_T
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
University of California, New york, United States, Mr. Alcalde, IT222
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
Last edited by stephanielana1; 02-23-2012 at 06:03 AM..
Reason: thank u thank u