






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Prof. Balamohan Pawar delivered this lecture at Allahabad University for Aeronautical Engineering and Computer Programming course. Its main points are: Analysis, Design, Plan, Test, Specification, Implementation, Testing, Problem, Interact, Interface
Typology: Slides
1 / 11
This page cannot be seen from the preview
Don't miss anything!







A program is required which will ask the user for the It will then ask for the amount of money (integers greater
If the amount to be withdrawn is greater than the amount
unchanged balance is displayed.
If the amount of money to be withdrawn is less than or
accepted and the new balance in the account is displayed.
If the amount to be withdrawn is greater than the amount
Enter the withdrawal 50 Accepted. Balance is 50
76 Enter the withdrawal 150 Refused! Balance is 76
50 Enter the withdrawal 75 Overdraft! Balance is -
Enter balance of the account
Enter balance of the account
Enter balance of the account
Balance after Action withdrawal
= 0 Accept withdrawal
= -50 and < 0 Overdraft
< -50 Refuse withdrawal
then
new balance between zero and overdraft limit
else
The Algorithm -- Refinement:
NULL; statement
comments
Balance Withdrawal Result -40 5 OK -40 10 OK -40 11 OK 0 5 0 50 0 51 20 20 20 70 20 71
1.Go back once and turn left 2.Turn right twice 3.Go back twice the distance and turn right
Control 1
Driving_Right 0
Driving_Left 1
Hit_Left_Bumper 1
Variable Name Value
Hit_Right_Bumper 1
if (Hit_Left_Bumper = 1) and (Hit_Right_Bumper = 1) then if (Control = 1) then go back twice the distance S_1 (^) set Control to 0; else S_2^ go back normal distance set Control to 1; end if ; end if ;
if (Control = 1) then if (Driving_Left = 1) then turn left again; Driving_Left = 0; else turn right twice; set Driving_Right to 1; end if ; else if (Driving_Left = 0) then turn left; set Driving_Left to 1; else turn right; set Driving_Right to 1; end if ; end if ;
test_1 test_2 test_3 test_ and test_
s_1 s_
F F F F F T F T F F T T T F F T F T T T F T T T
if (Hit_Left_Bumper = 1) and (Hit_Right_Bumper = 1) then if (Control = 1) then go back twice the distance S_1 (^) set Control to 0; else S_2^ go back normal distance set Control to 1; end if ; end if ;
if (Control = 1) then if (Driving_Left = 1) then turn left again; Driving_Left = 0; else turn right twice; set Driving_Right to 1; end if ; else if (Driving_Left = 0) then turn left; set Driving_Left to 1; else turn right; set Driving_Right to 1; end if ; end if ;
test_1 test_2 test_3 test_ and test_
s_1 s_
Address Big-Endian repr. of 1025
Little-Endian repr. of 1025 00 0000 0000 0000 0001 01 0000 0000 0000 0100
02 0000 0100 0000 0000 03 0000 0001 0000 0000
Alphabet := “abcdefghijklmnopqrstuvwxyz” Response := Alphabet;
Alphabet(1..3) & Alphabet(26..26)
Alphabet & “.”);
Put(Item => “The alphabet is “ &
BACK