Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
3Activity
0 of .
Results for:
No results containing your search query
P. 1
Software Engineering by Sachinraj

Software Engineering by Sachinraj

Ratings: (0)|Views: 558|Likes:
Published by sachinraj2
Enjoy!!!!!!!!!!!!
Enjoy!!!!!!!!!!!!

More info:

Published by: sachinraj2 on May 01, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

11/03/2013

pdf

text

original

 
Homework 4 
CAP 314
Principles of Software Engineering
SUBMITTED TO-
Deepak Sir
 SUBMITTED BY-SACHIN RAJB34D3901
 
PART AQ.1.
Apply a "stepwise refinement approach" to develop threedifferent levels of procedural abstraction for one or more ofthe following programs:
a
. Develop a check writer that, given a numeric dollar amount,will print the amountin words normally required on a check.
b
. Iteratively solve for the roots of a transcendental equation.
c
. Develop a simple round-robin scheduling algorithm for anoperating system.Ans-Refinement 1:write dollar amount in wordsRefinement 2:procedure write_amount;validate amount is within bounds;parse to determine each dollar unit;generate alpha representation;end write_amountRefinement 3:procedure write_amount;do while checks remain to be printedif dollar amount > upper amount boundthen print "amount too large errormessage;else set process flag true;endif;determine maximum significant digit;do while (process flag true andsignificant digits remain)set for corresponded alpha phrase;divide to determine whole numbervalue;
 
concatenate partial alpha string;reduce significant digit count byone;enddoprint alpha string;enddoend write_amount

Activity (3)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
alzazair liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->