• Join over 1.2 million students every month
• Accelerate your learning by 29%
• Unlimited access from just £6.99 per month
Page
1. 1
1
2. 2
2
3. 3
3
4. 4
4
5. 5
5
6. 6
6

# Designing and Writing a Program

Extracts from this document...

Introduction

Task - Designing and Writing a Program Problem Input Process Output Breadth Height Length Breadth*Height*Length=Volume Volume Write a program to calculate the volume of a cuboid. The program should assign values for the length, height and breadth and the result should be displayed on the screen ten times. 1) INPUT, PROCESS, OUTPUT TABLE 2) PROGRAM IN PSEUDO CODE Level 1 1. assign the values 2. calculate the volume 3. display the result Level 2 1.1 assign a value to the variable breadth 1.2 assign a value to the variable height 1.3 assign a value to the variable length 1.4 assign a value to the variable volume 2.1 volume = breadth*height*length 3.1 display the result 3) ...read more.

Middle

Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube Print volume_of_cube End Sub Sub Command2_Click() End End Sub 4) TEST DATA Variable Name Value Reasons breadth 2 Easy to use height 3 Easy to use length 4 Easy to use 5) DRY RUN TABLE Variable Names & Values Calculation Expected Result Actual Result Breadth_of_cube=2 Height_of_cube = 3 Length_of_cube= 4 Breadth_of_cube*Height_of_cube*Length_of_cube 2*3*4 24 24 6) EVALUATION Firstly, I created an Input/Process/Output table to decide what data would go where in order to help create the program quicker than if I had used no preparation and to avoid potential mistakes. ...read more.

Conclusion

I then created a Test Data table. This is a table of the variables which should be tested, a reason for the test and a value with which it should be tested. After that, I created a Dry Run table which shows the expected results of the testing process. When all this had been done, I actually keyed in the program, tested it and completed the Dry Run table. Overall, I didn't really encounter any problems because of all the preparation in 1 - 5 that had been made. If I had just keyed in the program from the top of my head with no tables or predictions, I almost certainly would have encountered a few problems. ...read more.

The above preview is unformatted text

This student written piece of work is one of many that can be found in our AS and A Level Computer Science section.

## Found what you're looking for?

• Start learning 29% faster today
• 150,000+ documents available
• Just £6.99 a month

Not the one? Search for your essay title...
• Join over 1.2 million students every month
• Accelerate your learning by 29%
• Unlimited access from just £6.99 per month

# Related AS and A Level Computer Science essays

1. ## CP3 - Proposed Solution to a Realistic Problem - Apartment Administration software

END end; end; procedure SaveRecord; begin IF FormBooking.EDprice.text <> '' THEN with FormBooking do with bookinglist[pos] do // Select the record from the bookings array using the position variable begin weekbegin:=EDweekbegin.Text; lastname:=CBbookedfor.Text; occupants:=strtoint(CBocc.text); deposit:=CBdeposit.Checked; paid:=CBpaid.Checked; comments:=Mcomments.Text; price:=strtoint(EDprice.text); // Data in the record becomes equal to the fields in the form IF (noofrec=0)

2. ## Definition-nature of the problem solved - Car Mechanic business

combo boxes and the date of order will be immediately validated to display the current date automatically. The add to outstanding list will be covered under reports design as is the create receipt button. As the business grows they are likely to have numerous suppliers therefore I felt different search criteria would help speed up the process.

1. ## Blake Evans - My writing style.

The first is power for the keyboard. Keyboards require a small amount of power, usually about 5 volts in order to function. The cable also carries the data from the keyboard to the computer. The other end of the cable connects to a port that is monitored by the computer's keyboard controller.

2. ## Program Code Program DVD_Program; Uses Menuunit, CRT, dos; ...

actor: string): integer; VAR j, l: integer; c: char; valid: integer; Begin l:= length (actor); valid:= 0; FOR j:= 1 to 1 DO Begin If not (actor[j] in ['A'..'Z','a'..'z','-',' ']) then valid:= j; End; validateactor:= valid; If (valid<> 0) then Begin textcolor (red); gotoxy (12,19); Write( 'SORRY INVALID NAME ');

• Over 160,000 pieces
of student written work
• Annotated by
experienced teachers
• Ideas and feedback to