• 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
  32. 32
    32

AQA Computing CPT3

Extracts from this document...

Introduction

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 o Definition of data storage requirements o User interface design for console and petrol pumps o Algorithms for: * Pump operation * Console operation * Simulating the seven segment LCD display * Production of daily totals * Implementation / Testing o Details of test plan with explanation, and evidence of testing having been carried out o 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. ...read more.

Middle

Test 5: Ensuring that the console display is working correctly ==> Test 6: Testing the seven segment LCD digits ==> Test 7: Complete test scenarios with eight customers I will set the mentioned test and a set of other tests in a table below. In the table I will present a test ID, the test, the expected outcome, actual output, and the resolved / pass Test ID Test Expected Output Actual Output Resolved / Pass 001 Set price to 'ABC' Initiates the pricePerLitre to default (000.0) Initiates to default (000.0) V 002 (Test 2, 5 & 6) Dispense petrol above 100 Litres Seven segment LCD display will present incorrect figures, although normal display on cashier console will function correctly Seven segment LCD presented problems, with incorrect figures V Resolved - added code to stop petrol exceeding over 100 litres 003 (Test 1) Dispense petrol after previous transaction before the pump has been reset pumpStatus = will be "Awaiting Payment", therefore petrol will not be dispensed until the pump is reset Petrol pump will not allow further dispensing of petrol until pump is reset by cashier V 004 (Test 5) Set price of petrol to �1 per litre, and dispense 6 litres Petrol Dispensed = 6L Price of Petrol = 1.00 Total Price = 6.00 Petrol Dispensed = 6L Price of Petrol = 1.00 Total Price = 6.00 V 005 (Test 4) Set price of petrol to �0 per litre, and dispense petrol pumpStatus = "Price Is Too Low, Must Be In Between �0.01 and �1.99" pumpStatus = "Price Is Too Low, Must Be In Between �0.01 and �1.99" V 006 (Test 3) Set price of petrol to �11 per litre, and dispense petrol pumpStatus = "Price Is Too High, Must Be In Between �0.01 and �1.99" pumpStatus = "Price Is Too High, Must Be In Between �0.01 and �1.99" V 007 (Test 5) Start dispensing petrol, stop dispensing, and try and re-dispense immediately after stopping pumpStatus = "Pump Stopped, Replace Nozzle" pumpStatus = "Pump ...read more.

Conclusion

penceD3.gotoAndStop(tempNo + 1) // This is changing the third digit // Loads Digit 4 tempNo = Number (tempSt.charAt(3)) penceD4.gotoAndStop(tempNo + 1) // This is changing the forth digit } } function changePriceDisplay(xy:Number) { // Below are the variables that holds the digits in temp form, the tempSt holds the number in temp var tempSt:String var tempNo:Number = 0 tempSt = String(xy.toFixed(2)) if (xy >= 100) { // Loads Digit 1 tempNo = Number (tempSt.charAt(0)) priceD1.gotoAndStop(tempNo + 1) // This is changing the first digit // Loads Digit 2 tempNo = Number (tempSt.charAt(1)) priceD2.gotoAndStop(tempNo + 1) // This is changing the second digit // Loads Digit 3 tempNo = Number (tempSt.charAt(2)) priceD3.gotoAndStop(tempNo + 1) // This is changing the third digit // Loads Digit 4 tempNo = Number (tempSt.charAt(4)) priceD4.gotoAndStop(tempNo + 1) // This is changing the forth digit // Loads Digit 5 tempNo = Number (tempSt.charAt(5)) priceD5.gotoAndStop(tempNo + 1) // This is changing the fifth digit } else if (xy <100 && xy >=10) { // Loads Digit 1 priceD1.gotoAndStop(1) // This is changing the first digit // Loads Digit 2 tempNo = Number (tempSt.charAt(0)) priceD2.gotoAndStop(tempNo + 1) // This is changing the second digit // Loads Digit 3 tempNo = Number (tempSt.charAt(1)) priceD3.gotoAndStop(tempNo + 1) // This is changing the third digit // Loads Digit 4 tempNo = Number (tempSt.charAt(3)) priceD4.gotoAndStop(tempNo + 1) // This is changing the forth digit // Loads Digit 5 tempNo = Number (tempSt.charAt(4)) priceD5.gotoAndStop(tempNo + 1) // This is changing the fifth digit } else { // Loads Digit 1 priceD1.gotoAndStop(1) // This is changing the first digit // Loads Digit 2 priceD2.gotoAndStop(1) // This is changing the second digit // Loads Digit 3 tempNo = Number (tempSt.charAt(0)) priceD3.gotoAndStop(tempNo + 1) // This is changing the third digit // Loads Digit 4 tempNo = Number (tempSt.charAt(2)) priceD4.gotoAndStop(tempNo + 1) // This is changing the forth digit // Loads Digit 5 tempNo = Number (tempSt.charAt(3)) priceD5.gotoAndStop(tempNo + 1) // This is changing the fifth digit } } /*++++++++++++++++++++++++++++++++++++++++++++++ EVENT HANDLERS STOP ++++++++++++++++++++++++++++++++++++++++++*/ ?? ?? ?? ?? Gavin Smith (4179) Centre No: 61101 CPT3: Computing Write Up 1 ...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 Project

    procedure is to exit the form and return back to the main menu. Return DVD Form procedure TFmReturnedDvds.BtnRentClick(Sender: TObject); This procedure retrns the DVD and deletes the record in the Loans Table procedure TFmReturnedDvds.Button1Click(Sender: TObject); This procedure closes the form and returns back to the main menu form procedure TFmReturnedDvds.dblkcbxmembersClick(Sender:

  2. 140 Computing A-Level Revision Questions

    Define applications software, with examples. 60. What are the advantages and disadvantages of purchasing a ready-written application package over custom-made software. 61. What is a volatile file? How well do the various file organisations cope with volatile files? 62. Describe the Binary Coded Decimal (BCD) system of storing data.

  1. Data Representation

    There are 128 standard ASCII codes each of which can be represented by a 7 digit binary number. The reason ASCII uses numbers to represent characters is because computers can only understand binary numbers. Below is an ASCII conversion table.

  2. I have been given the task of creating a system for a hospital to ...

    Operation Buttons: I then went on to test the operational buttons. The results are shown below: * Loan Equipment Submit - This button was designed to transfer the data input from the loan equipment sheet to the table in the patient details sheet.

  1. I have been given the task to design a database for a company called ...

    REPORTS Price Lists It is specified that a report showing the price listings for the various weights is included in the system. I have made a simple report, which will show the managers the prices. This report is shown below.

  2. Computing Project

    14/03/2008 13:00:00 31321694 189 Alwark way, Nottingham, NT895TT Stephanie Jacob 20/03/2008 14:15:00 32668736 3A Leicester road, Nottingham,NT65JS Alex Wright 20/03/2008 16:45:00 35694784 78 Ratcliffe Road, Newcastle, NW156AS Neil Lawrence 21/03/2008 10:30:00 52854725 25 Ashby Square,Dundee, DN124AA Khris Johnson 20/03/2008 10:30:00 54587952 22 Aspire Street, Newcastle, NW1236GH Robert Taylor 14/03/2008 08:00:00

  1. What is Java?

    those new to computer programming than previous approaches, and that the OOP approach is often simpler to develop and to maintain, lending itself to more direct analysis, coding, and understanding of complex situations and procedures than other programming methods. Critics dispute this, at least for some domains (industries).

  2. Computer Aided Design Package

    lot of blueprints to show customers the ink will go down fast in the plotters and will need to be replaced. This will cost of �6.99 for every cartridge they buy, I estimate that the company will go through about five per month making a total cost of �34.95.

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