• 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
  7. 7
    7
  8. 8
    8
  9. 9
    9
  10. 10
    10
  11. 11
    11
  12. 12
    12
  13. 13
    13
  14. 14
    14
  15. 15
    15
  16. 16
    16
  17. 17
    17
  18. 18
    18
  19. 19
    19
  20. 20
    20
  21. 21
    21
  22. 22
    22
  23. 23
    23
  24. 24
    24
  25. 25
    25
  26. 26
    26
  27. 27
    27
  28. 28
    28
  29. 29
    29
  30. 30
    30
  31. 31
    31

AQA Computing CPT3 June 08 Peter's Petrol Pumps

Extracts from this document...

Introduction

PETER'S PETROL PUMPS- MODULE 3 Alex Sheppard DESIGN INTRODUCTION Petrol stations usually show prices and amount of petrol dispensed on each petrol pump and also have a console in the office showing information about each sale from each petrol pump on the garage forecourt. The pump shows how much petrol has been sold, the price per litre in pence to one decimal place and the total amount to pay. The console also displays this information for each pump. Peter owns a petrol station with one petrol pump. Every day he needs to know the number of litres of petrol that are sold and the total amount of money taken for the pump. A program is required to simulate the display on the pump and on the console for the 1 pump. DATA REQUIREMENTS Variable Name Data Type Description Example Validation LitresDispensed Single Stores the number of litres the customer has put in their vehicle 45.6 Range Format PerLitre Single Stores the price per litre 109.9 Format Presence AmountToPay Single Stores the amount the customer has to pay 76.54 - TotalPetrol Single Stores the amount of petrol sold in the day 567.8 - TotalTakings Single Stores the amount of money taken in the day �501.23 - NoOfCustomers Single Stores the number of ...read more.

Middle

They appear on the same form that has been split in 2. The pump is automatically shown and the console is hidden. MAIN FORM- CONSOLE UNLOCKED The console cannot be used without clicking the Activate Console button and entering the password to make the console visible. Then Peter can use the controls on the console that perform administrative tasks, such as changing the price per litre and viewing the daily totals. LOGIN DIALOG The login dialog is a simple form where the password to show the console can be entered. The characters entered are hidden with the '*' symbol for security. When OK is pressed, the entered password is compared with the correct password and if they are the same the console is unlocked. Otherwise the console remains hidden. PRICE PER LITRE DIALOG This form has a similar layout to the login dialog. It allows Peter to enter a new price per litre in the format shown and when OK is pressed LITRES SOLD From the console, Peter can see the number of litres sold during the last day, in the form of a message box. TOTAL TAKINGS From the console, Peter can see the amount of money taken during the last day, in the form of a message box. ...read more.

Conclusion

As expected (SS16) The pump dispenses between 0.5 - 99.9 litres (boundary) Number of litres: 99.9 When the customer stops squeezing, the nozzle can be replaced. As expected (SS17) The pump dispenses between 0.5 - 99.9 litres (erroneous) Number of litres: 0.3 When the customer stops squeezing and replaces the pump, an error message will be displayed saying too little petrol has been dispensed. As expected (SS18) The pump dispenses between 0.5 - 99.9 litres (erroneous) Number of litres: another timer tick after 99.9 When the number of litres dispensed reaches 99.9 a message will be displayed saying the tank is full. The customer won't be able to continue squeezing. As expected (SS19) Calculations of daily totals Number of litres: 14.1 Price per litre: 89.9 After the customer replaces the nozzle, the number of litres dispensed and amount to pay should be added to the totals. The number of customers should increase by 1. Litres Dispensed � Price per litre = Cost 14.1 � 089.9 = �12.68 As expected (SS20) TESTING SCREENSHOTS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 CODE ?? ?? ?? ?? Alex Sheppard - 1 - Computing AS Alex Sheppard - 31 - Computing AS ...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

See related essaysSee related essays

Related AS and A Level Computer Science essays

  1. Computing CPT3

    LOGIN FORM When the user wishes to access the console, this dialog will be shown and allow the user to enter a password, that will unlock the console if the password entered is correct. When main form is loaded, the console will be hidden.

  2. 140 Computing A-Level Revision Questions

    Explain the difference between a serial and a sequential file. For what use is a serial file organisation commonly used? 80. Describe the data structure known as a linked list and say how it may be implemented in programming. Suggest uses for this structure.

  1. AQA Computing CPT3

    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.

  2. Computing Module 3 Writeup

    by using the following Row Source code in Lookup: Select Subject.SubjectReferenceCode From Subject; Subject Table: Validation Rules: Field Validation Check Validation Rule SubjectReferenceCode (Primary Key) Uniqueness Check It is the Primary Key Presence Check Required = Yes SubjectName Presence Check Required = Yes Payment (to 2.d.p)

  1. Smart Card System

    Using the JavaDoc utility provided with the Java Developers Kit, programmers can easily generate documentation in the form of HTML files. To do this, programmers embed special comments and tags in the source code and then process their code through JavaDoc.

  2. Flexible Architectures in Communication Security Application

    The key size is the length of the key used to encrypt or decrypt data. The block size is the amount of data processed each time the cipher kernel is invoked. The number of rounds specifies the total number of iterations executed by the cipher kernel loop.

  1. Definition-nature of the problem solved - Car Mechanic business

    Q: What happens to the data the customer gives you? The data is stored along with the customer's previous records. It's a basic folder which we order by the keeping the most recent jobs at the front. Any new customers have a new folder created and are placed in alphabetical order with the other folders.

  2. History of computing

    Despite its enormous size it stored only the equivalent of 80 characters of information. However, it was substantially faster than any previous computer. The idea of storing programs and their data in the same high-speed memory - the stored-program concept - was first put forth by von Neumann in a

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