Assignment Draft T1 and 2

Embed Size (px)

Citation preview

  • 8/6/2019 Assignment Draft T1 and 2

    1/3

    Step 1: Requirements

    Identify in details the requirements of the system by producingan input, output and process for the system

    Step 2: Design Design a suitable GUI to include input and output of data.

    There should be a dialog box on the start-up of theprogramme

    This dialog box first asks the user to enter the name of thecustomer. After that they can add their other details such asnumber of DVDs titles of DVDs and the prices as well.

    After all this programme will count the total cost of theirpurchase and it will also count the discount applicable.

    After all this process the programme is going to give the

    output in the form of JTextArea so that we can show theoutput as a receipt where all the details will be shown.

    Design code using either pseudocode or flowchart.

  • 8/6/2019 Assignment Draft T1 and 2

    2/3

    Enter the Customer name

    Enter the title of the DVD

    Quantity of the DVD purchased. q

    Do you want to buy another Title?

    Yes

    No

    Calculation

    If quantity 4-9 than discount 7%

    If quantity 10-14 than discount 12%

    If quantity >= 15 than discount 25%

    If Quantity < 4 than discount 0%

    Save the net price in a variable after deducting the discount

  • 8/6/2019 Assignment Draft T1 and 2

    3/3

    Test plan for the application include a set of input data and expected

    output.

    Title ofthe DVD

    Price Quantity Discount Netprice

    VAT(17%)

    TotalPrice

    Eminem 7.89 7 6.63(12%) 48.6 8.26 56.86

    Rihanna 10.00 13 22.10(17%

    )

    107.6 18.34 125.9

    4

    Madonn

    a

    12.00 2 0.00(0%) 24 4.08 28.08

    Requirements:

    Raul wants the programme to allow the user to input their informations such as

    identification code, title, price of the DVD and the quantity.

    The programme should also allow them to enter their name so that it can be

    displayed on the invoice.

    The output of the programme should be displayed in the form of invoice. Where

    they can display the name of the customer, the DVDs they bought and which

    titles. They also want to display the price, discount they got VAT and the total

    money to be paid on the invoice.

    We need a dialog box to enter the all input.

    The output should be in formatted way e.g. = 25.20

    They also want the programme to calculate the discount as given

    We can use JTextArea to get the desired output as invoice.

    We need the following variables for this programme:

    Name: to save the names of the customers.

    Numbers of DVD bought.

    Title of the DVD

    Net price

    Discount Vat

    Total price

    Calculation

    Make sum of net price and VAT (17%) and save it in variable total price

    Print the output in the form of receipt

    Output should display names of title, quantity of DVD, Discount, VAT, Total price.