Preview Cambridge IGCSE® Computer Science: Programming Book

Page 36

Cambridge IGCSE Programming Book

‘Calculate Volume and store in local variable Volume = Height1 * Width1 * Depth1 ‘Convert the value in volume current in cubic centimetres to litres Volume = Volume / Litres ‘Display the value held in the variable Volume Console.WriteLine(“The volume is”) Console.WriteLine(Volume) Console.ReadKey() End Sub End Module

Using the Windows Form application the interface could look something like Figure 3.06.

28

Figure 3.06 Interface design for Windows Forms Aquarium algorithm

Remember to give the design elements of the form appropriate names. Figure 3.06 shows the names in green. The Windows Form application code to achieve this solution should be run under the button click event:


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.
Preview Cambridge IGCSE® Computer Science: Programming Book by Cambridge International Education - Issuu