• 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

Programming Concepts. Andora Video is a small shop selling videos. The owner, Raul, wishes to develop a sales transaction processing system. The main objective of this system should be to display the total price of the sale after discounts, tax e.t.c.

Extracts from this document...

Introduction

Unit 3 – Programming Concepts                 

PROGRAMMING CONCEPTS

Table of Contents

INTRODUCTION        

SCENARIO        

USER REQUIREMENTS        

INFORMATION        

GUI (GRAPHIC USER INTERFACE)        

VERSION 1        

REQUIREMENTS        

DATA TABLE        

DESIGN PSEUDOCODE        

IMPLEMENTATION (v. 1)        

TESTING        

Syntax Errors        

Logical Errors        

VERSION 2        

REQUIREMENTS        

DATA TABLE        

DESIGN PSEUDOCODE        

IMPLEMENTATION (v. 2)        

TESTING        

Syntax Errors        

Logical Errors – Order 1        

Logical Errors – Order 2 (first attempt)        

Logical Errors – Order 2 (second attempt)        

VERSION 3        

REQUIREMENTS        

DATA TABLE        

DESIGN PSEUDOCODE        

FINAL IMPLEMENTATION (v. 3)        

TESTING        

Database connectivity        

EVALUATION        

CONCLUSION        

BIBLIOGRAPHY        

BOOKS        

WEBSITES        

SOFTWARE        

  1. INTRODUCTION

  1. SCENARIO

Andora Video is a small shop selling videos. The owner, Raul, wishes to develop a sales transaction processing system. The main objective of this system should be to display the total price of the sale after discounts, tax e.t.c.  This should occur as a result of the input of data surrounding the video and its purchase.

  1. USER REQUIREMENTS

  • An application that is able to process multiple video titles
  • Calculates discounts, VAT and totals
  • Determine different discounts based upon the quantity
  • Display calculations in relevant format
  • Store inputted and calculated data into a electronic record
  • Capable of supporting further development

Although Raul needs the application to process multiple video titles in one transaction, I shall however start off with designing a simple program to process just one title at a time. After that, I intend expanding from this stage, adding more functionality as time goes on with each version.

  1. INFORMATION

Some of the work was carried out directly from the command prompt in Windows. However, at other times an integrated development environment (IDE) was used so one may see a difference in the error message output. The IDE used was the Open Source NetBeans software version 6.1 for Windows Vista.

Testing is carried out on all versions and any errors corrected and explained.

...read more.

Middle

Output:         String vdID, vdTitle,

int vdQty, itemCount, vdQtyAll,

double vdPrice, vdSubtotal, vdSubtotalAll, dSubtotal, vdTotal,                 discount, VAT

Process:        vdSubtotal = vdQty*vdPrice

                vdQtyAll +=vdQty

                vdSubtotalAll+=vdSubtotal

discount=vdsubtotalAll*disFor…

                dSubtotal=vdSubtotalAll-discount

VAT=dSubtotal*vatRate

Total=dSubtotal+VAT

  1. DATA TABLE

Name

Description

Type

vdID

Video ID entered

string

vdTitle

Video Title entered

string

vdQty

The quantity of a particular video entered

int

vdQtyAll

Calculated total of all quantity of videos

int

vdPrice

The price of a particular video entered

double

ask

The choice to continue or not entered

string

vatRate

The decimal value of the VAT rate

double constant

disFor5To9

The decimal value of discount percentage given to those who buy 5-9 videos

double constant

disFor10To14

The decimal value of discount percentage given to those who buy 10-14 videos

double constant

disFor15Plus

The decimal value of discount percentage given to those who buy 15 or more videos

double constant

VAT

VAT rate multiplied by the already discounted subtotal

double

vdSubtotal

Holds calculated subtotal for a video title

double

vdSubtotalAll

Holds calculated subtotal for all video titles

double

dSubtotal

Holds calculated subtotal of all the videos after relevant discount has been taken off

double

discount

Holds the relevant discount depending upon the whole video quantity order

double

total

Holds calculated total of whole customer order

double

indata

Used in the process of converting various strings to integer variables

String

  1. DESIGN PSEUDOCODE

        Declare vat and discount rates constants

Prompt for video ID, Title, Price and Quantity

Read inputted values

vdSubtotal = vdPrice*vdQty

Add vdQty to vdQtyAll

Add vdSubtotal to vdSubtotalAll

Display string asking if to continue

while ask = 'y' or 'Y'

repeat all above

while ask = 'n' or 'N'

display vdQtyAll

display vdSubtotalAll

if vdQtyAll >= 15

discount = disFor15Plus * vdSubtotalAll

if vdQtyAll >= 10

discount = disFor10To14 * vdSubtotalAll

if vdQtyAll >= 5

discount = disFor5To9 * vdSubtotalAll

else

discount = 0

display dSubtotal

display vdtotal

  1. IMPLEMENTATION (v. 2)

import java.util.Scanner;

import javax.swing.JOptionPane;

public class VideoSales2

{

public static void main (String[] args)        

{

//Declaring Variables needed in the program and added values to the constants

               String ask="";

        double vdSubtotalAll=0;

        double vdQtyAll =0;

        final double vatRate = 0.175;

        String vdID, vdTitle, indata;

        int vdQty;

        double vdPrice, discount;

        final double disFor15Plus = 0.25;

        final double disFor10To14 = 0.17;

        final double disFor5To9 = 0.12;

...read more.

Conclusion

This worked and the following data successfully entered the relevant table in the database.

image08.png

  1. EVALUATION

I am satisfied that my application fulfils the basic user requirements; however it does leave room for improvement and further development. For example, it is able to process multiple video titles but I would like to, in the future, make the process of entering the video information easier by creating a better designed GUI.

The calculations all eventually passed the rigorous testing stage but the storing of these calculations rather than just the user input is another improvement that could be made. All the data together could then be displayed and even printed onto an itemised receipt.

I have left the program in a position in which the database functionality can be expanded on, to connect to a network. The program could even respond to scanned barcodes in relation to records held in the database.

  1. CONCLUSION

The program is structured well with comments on all the major aspects, and I do believe that the above User Documentation is easy to understand and laid out in a good manner. The User Guide has screenshots to make the learning process easier.

This project was done under minimal supervision, and actually, I surprised myself in learning some of the key programming concepts by having to learn from and fix my own mistakes.

  1. BIBLIOGRAPHY

  1. BOOKS

  • Deitel H. & P. (2001) Java How To Program 4th Edition, Prentice Hall
  • McGrath, M. (2003) Java in easy steps, Computer Step
  • Knott, G. & Waites, N. (2002) BTEC Nationals for IT Practitioners, Durham: BC Publications
  • Parsons, J. J. & Oja, D. (2006) Computer Concepts, Sixth Edition, US: Course Technology Inc.
  • Long, L. & N. (2005) Computers: Information Technology in Perspective 12th Edition, NJ: Pearson Education
  1. WEBSITES

  • http://java.sun.com [Accessed 01 May 2008]
  • http://books.google.co.uk [Accessed 03 May 2008]
  • http://www.freejavaguide.com/corejava.htm[Accessed 15 June 2008]
  • http://www.java-forums.org[Accessed 16June 2008]
  1. SOFTWARE

  • Microsoft® Student 2008 [DVD]. Redmond, WA: Microsoft Corporation, 2007

Page  of

...read more.

This student written piece of work is one of many that can be found in our University Degree Software Engineering 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 University Degree Software Engineering essays

  1. MS Office solutions. Fantasy mobiles require: ...

    Microsoft Access allows records to be stored within the computer memory securely and can establish relationships between this data. The data can even be made more secure with the use of VBA. Through the use of Validation Rules, Input Masks, lookup wizards and combo boxes the chances of human error are reduced.

  2. 3ISE517 Internet Application Programming - CGI

    Using the IP address, the web browser would connect to the server. After the connection is formed, following the HTTP protocol, the browser sends a GET request, asking to retrieve the webpage. The server would then process the request, locate the required page and return the result.

  1. 3SFE504 - Object Oriented Programming - Linear and Independent Hash Table code

    { Definition* p = new Definition; p->setDefinition(value); p->setNext(head); head=p; } void List::printList() const { if(isEmpty()) { cout<<"list empty"<<endl; } else { Definition* p =NULL; for(p=head ; p != NULL ; p=p->getNext()) { cout<<p->getDefinition()<<endl; } } } //LinHTable.h #include <string> #include "List.h" using namespace std; const int TABLE_SIZE=29; class LinHTable {

  2. software program specification and code for a DVD store

    Cost of item VAT Const double Rate of VAT= 11.75 Option Char User choice of menu option Pseudo code welcome_screen Display text messages "Welcome to DVDSTOVIEW" "= = = = = = = = = = = = = = =" a blank line display_options Display text messages "We offer the following services" "D.

  1. Creating a database system for Mr Azizur Rahman, Mr Bilal Sheikh and Mr Iman ...

    In addition they have to work out how much money will take to buy the appropriate components for the upgrade, plus make additional calculations on their fees. All of the cost must be added to see if it falls in the customer's budget.

  2. Critical Evaluation of a Multimedia Application

    Although application gives good idea about how each letter pronounced, beginning sound letters and middle vowel letters. There are 8 knowledge building tasks in this application. Upper case and Lower case letters where user has to match upper case and lower case letters, user have to click on the upper

  1. Evaluating Websites Usability - comparing 5 websites.

    Knowledge of Users: 1. Lit is not an adaptive website when a course is looked up it does not send you to similar courses. 2. Lit keeps no memory of your last visit or any previous visit to highlight content to users. User Satisfaction: 1.

  2. Abstract This report is dedicated to demonstrating and critically reviewing new features and developments ...

    This offers users with a ?simpler and easier-to-use API for accessing WPD devices. [24]? 1. Other Devices Improvement Apart from above-mentioned new features of devices management, Windows 7 also includes many other device-related improvements, like supporting writing to Blu-Ray optical discs, network aware, and a new Sensors Platform which allow

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