Sei sulla pagina 1di 3

Step 1: Requirements

• Identify in details the requirements of the system by producing


an 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 the
programme
– This dialog box first asks the user to enter the name of the
customer. After that they can add their other details such as
number of DVD’s titles of DVD’s and the prices as well.
– After all this programme will count the total cost of their
purchase 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 the
output as a receipt where all the details will be shown.

• Design code using either pseudocode or flowchart.
Enter the Customer name

Enter the title of the DVD

QuantityYes
of the DVD purchased. q

Do you want to buy another Title?

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


Calculation
Test Make
plan for
sumthe application
of net price andinclude a set
VAT (17%) andofsave
input data
it in and expected
variable total price
output.

Title of Price Quantity Discount Net VAT Total


the DVD price (17%) Price
Print the output in the form of receipt
Eminem £7.89
Output should display 7names of title,6.63(12%) 48.6Discount,
quantity of DVD, 8.26 56.86
VAT, Total price.
Rihanna £10.00 13 22.10(17% 107.6 18.34 125.9
) 4

Madonn £12.00 2 0.00(0%) £24 4.08 28.08


a

Requirements:
Raul wants the programme to allow the user to input their information’s 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 DVD’s 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

Potrebbero piacerti anche