Geeks With Blogs
Melanie Draves programming and what not

Pseudo-code for Joe's Automotive program


Program: Joe's Automotive
Name:  Melanie Draves
Date:  Feb 26 2012

 Narrative Description:
Program calculate and display a customer's total charges incurred for a visit to an automotive establishment.
Calculations for regular services are based on the following schedule:
 Inspection 15.00
 Lube job 18.00
 Tire rotation 20.00
 Oil change 26.00
 Radiator flush 30.00
 Trnsmissn flush 80.00
 Muffler replace 100.00
 nonroutine svc 20.00 * Hours worked
Calculations to be made by the following methods:
 totoillube = OilLubeChrgs Method for oil change and/or lube job
 totflush = FlushChrgs  Method for radiator flush and/or transmission flush
 totmisc = MiscChrgs  Method for inspection, muffler replacement, and/or tire rotation
 totother = OtherChrgs  Method for services/labor (if applicable)
 tottax = 0.06 * amt of parts Method for sales tax charged on parts
 totfees = TotalChrgs  Method for total charges
 (void methods) called when the user click 'Clear' button
 ClrOilLube Method for clearing oil change and lube job check boxes  
 ClrFlushes Method for clearing radiator and transmission flushes check boxes
 ClrMisc  Method for clearing inspection, muffler replacement, tire rotation check boxes
 ClrOther Method for clearing parts and labor text boxes
 ClrFees  Method for clearing 'summary' labels
 oil, lube - bool
 radflsh, tranflsh
 inspect, muffreplace, tirerotate
 amtparts -  decimal = 0
 hrslabor - int = 0
 totother - decimal
 amtparts - decimal
 tottax - decimal
 totfees - decimal
 totoilube - decimal
 totflush - decimal
 totmisc - decimal

 init vars
 calc tot charges
  totoillube = OilLubeChrgs(oil, lube)
  totflush = FlushChrgs(radflsh, tranflsh)
  totmisc = MiscChrgs(inspect, muffreplace, tirerotate)
  totother = OtherChrgs(amtparts, hrslabor)
  tottax = 0.06 * amtparts
  totfees = TotalChrgs(totoillube, totflush, totmisc, totother, tottax)
 display totals
  disp totother
  disp amtparts
  disp tottax
  disp totfees
 clear form

method OilLubeChrgs(loil, llube)
ret: ltotoillube

Posted on Sunday, March 4, 2012 6:35 PM | Back to top

Comments on this post: Joe's Automotive program - Pseudo-code

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © MoDraves | Powered by: | Join free