Gavin Smith (4179) Centre No: 61101                        CPT3: Computing Write Up

AQA Computing: Module 3

‘Peters Petrol Pumps’

By Gavin Smith
Candidate:         4179
Centre No:         61101

Contents

Front Cover                                                                                1

Contents Page                                                                        2

Introduction to Module                                                                3

The Programming Language                                                        4

Designing Phase: Data Dictionary                                                 5

                                                                                        6

Designing Phase: User Interfaces & Button Identifiers                                7

                                                                                        8

                                                                                        9

Designing Phase: Evidence & Explanations                                        10

                                                                                        11

                                                                                        12

Implementation / Testing: Test Plan                                                13

                                                                                        14

                                                                                        15

                                                                                        16

Pump In Operation                                                                        17

                                                                                        18

                                                                                        19

Introduction to Module

This module consists of a practical systems development project which will rely on the candidate (myself) to design and implement a petrol pump that will show a number of attributes through a customer’s and cashier’s interface. The model must be implemented according to the customer’s specification. This program (petrol pump) must have the following features:

  • Records the amount of petrol dispensed
  • Records the amount of petrol sold
  • Records the current price of petrol (per litre)
  • Records the daily total of petrol dispensed/sold
  • Has a feature that allows the petrol pump to be reset

I will design and implement an appropriate computing system and provide sufficient documentation to demonstrate the:

  • Design
  • Implement / Test

I must produce this program using a high level language, the language I will use will be discussed in a later part of the write up. I will produce brief documentation on the following:

  • Design
  • Definition of data storage requirements
  • User interface design for console and petrol pumps
  • Algorithms for:
  • Pump operation
  • Console operation
  • Simulating the seven segment LCD display
  • Production of daily totals        
  • Implementation / Testing
  • Details of test plan with explanation, and evidence of testing having been carried out
  • Clearly set out and comment, where appropriate, program listing

The Programming Language


As the specification indicates that I must use a high level language, I had to choose from a series of different languages, a high level programming language is defined as a programming language that, in comparison to low level programming languages, may be more abstract, easier to use, or more portable across platforms. Such languages often abstract away CPU operations such as memory access models and management of scope. Below shows a list of a number of different high level programming languages.

  • Visual Basic (VB)
  • Java
  • Action Script
  • ASP
  • VB.net
  • C++

As the school were limited on the applications that we could use to produce a program for Peter’s Petrol Pump and due to the applications available on the school network we only had Action Script 3.0 (via. Adobe Flash) to make the program.

ActionScript is a scripting language based on ECMAScript. ActionScript is used mostly for the development of websites and software using the Adobe Flash Player platform. Originally developed by Macromedia, the language is now owned by Adobe (which merged Macromedia with Adobe in 2005), which continues its development. ActionScript was initially designed for controlling simple 2D vector animations made in Adobe Flash (previously Macromedia Flash). Later versions added functionality allowing for the creation of Web-based games and rich Internet applications with streaming media, such as video and audio.

Resource: http://en.wikipedia.org/wiki/ActionScript (29/04/08)

Designing Phase

This section will consist of the designing phase, this will include making a definition of data storage requirements (a data dictionary), a user interface design for console and petrol pumps, algorithms for the operation of the pump, console, the simulation of the seven segment LCD display, and production of daily totals.

Data Dictionary

A data dictionary is a collection of descriptions of the data objects, or items in a system for a data model. Below I have identified the data types required for my petrol pump

 

User Interfaces

This part of section 1 will show a diagram of the petrol pump, with appropriate annotations and notes identifying the features of the petrol pump console, such as the buttons and displays.         

The Lift Nozzle & Start Dispensing button starts the petrol pump timer, this will make the dispensed petrol clock (variable – fuelClock) start, incrementing 0.01 each time. It will also allow the customer to pay display (variable – totalToPay) to function correctly by calculating the amount the customer has to pay according to the price per litre (variable – pricePerLitre) and the dispensed petrol clock (variable – fuelClock). This button will also change the pump status from the default status of “Pump Is Ready To Use” to “Pump Is In Use”.

Join now!

The Stop Dispensing button will stop the petrol pump timer, this will make the dispensed petrol clock (variable – fuelClock) stop, it will also stop the pay display (variable – totalToPay) to stop calculating, and provide the final amount of petrol that the customer has to pay for the current transaction, this is calculated according to the price per litre (variable – pricePerLitre) and the dispensed petrol clock (variable – fuelClock). The button will also change the current pump status of “Pump Is In Use” to “Pump Stopped, Replace Nozzle”.

The Replace Nozzle button will change the current status of the pump from ...

This is a preview of the whole essay