• Join over 1.2 million students every month
  • Accelerate your learning by 29%
  • Unlimited access from just £6.99 per month

software program specification and code for a DVD store

Extracts from this document...

Introduction

Software program for a DVD store

Specification

Outputs

welcome_screen                        Welcome to DVDSTOVIEW

                                        = = = = = = = = = = = = = = =

                                             a blank line

display_options                        We offer the following services:

                                        D.    DVD List.

                                        O.    Order calculation.

                                        E.    \t Exit.  \n

                                        a blank line

genre_types                                Genre types available:

  1. Sci-fi.
  2. Crime.
  3. Horror.
  4. Romance.

2 blank lines

Order_calc                                Order calculation.

                                        2 blank lines

                                        Please enter cost of DVD

DVDcost

Please enter number of copies

 number

                                        Small orders may be dispatched to by special

                                        delivery to arrive within 2 hours.

                                        Total cost including VAT is: totalcost+VAT

DVD_list                                Please enter your type:

  1. Terminator1

                                        = = = = = = = =

                                        a blank line

Starring: Arnold Schwarzenegger, Michael Biehn.

                                        Director: James CameronGenre: Sci-Fi & Fantasy.

                                        Format: Widescreen

                                        Language: English.

                                        Subtitles: None.

                                        2 blank lines

  1. Star wars: Episode 3(Revenge of the sith.

= = = = = = = = = = = = = = = = = = = = =

a blank line

Starring: Ewan McGregor, Hayden Christensen.

Director: George Lucas.

Genre: Sci-Fi & Fantasy.

Format: Widescreen

Language: English.

2 blank lines

(INCLUDING THE REST OF THE FILMS)

choose_option                                Please enter your choice:

                                        You have entered an invalid option.

                                        Thank you for using DVDSTOVIEW.

INPUTS

order_calc                                number

                                        DVDcost

DVD_list                                choice

Choose_option                         option

PROCESSING

Oder_calc                                if number<4

                                           Display “Small orders may be dispatched by  

                                           special delivery to arrive within 2 hours”

                                           “Total cost including VAT is:

totalcost+VAT”  

                                        else

                                             display “total cost including VAT is:

                                             totalcost+VAT.

DVD_list                                genre_types

                                        Display “Please enter your type:”

                                        Accept input of choice

                                        Switch choice

                                           1:   Display requested output

2:   Display requested output

3:   Display requested output

4:   Display requested output

Default: Display “Wrong DVD genre, please re-enter choice:”

choose_option        

do

  display_options

   Display “Please enter your choice:”

Accept input of option

switch option

   D or d:   call DVD_list

O or o:   call order_calc

...read more.

Middle

case D or d

call function DVD_list

Display 2 blank lines

case O or o

call function order_calc

Display 2 blank lines

Case ‘E’ or case ‘e’:

Display “Thank you for using DVDSTOVIEW.”

Default       Display “You have entered an invalid option.”

while ((option !=’E’) && (option !=’e’))

                  Display “Message text:”

main

  Call function welcome_screen

  Call function choose_option

  Call function display_options

  Call function genre_types

TEST DATA TABLE (choose_option)

Variable

Value

Justification

Expected result

Option

‘D’  ‘d’

Valid data testing path d or D

Calls function DVD_list

Option

‘O’  ‘o’

Valid data testing path o or O

Calls function order_calc

Option

‘K’

Invalid data

“you have entered an invalid option”

Option

‘Y’

Invalid data

“You have entered an invalid option”

Option

‘E’

Valid data testing path e or E

“Thank you for using DVDSTOVIEW”

TEST DATA TABLE (welcome_screen)

Variable

Value

Justification

Expected result

Welcome to DVDSTOVIEW

We offer the following services:

D. DVD List

O. Order calculation

E. Exit

- Cursor here

Please enter your choice:

TEST DATA TABLE (order_calc)

Variable

Value

Justification

Expected result

DVDcost

3.50

Valid float data

Please enter cost DVD:

Number

4

Valid int value

Please enter number of copies required:

TEST DATA TABLE (DVD_list)

Variable

Value

Justification

Expected result

Choice

1

Valid data testing path 1 (int)

Sci-fi LIST OF FILMS

Choice

2

Valid data testing path 2 (int)

Crime LIST OF FILMS

Choice

3

Valid data testing path 3 (int)

Horror LIST OF FILMS

Choice

9

Invalid data

Wrong DVD genre, Please re-enter choice

Choice

4

Valid data testing path 4

Romance LIST OF FILMS

TEST DATA TABLE order_calc (number<4)/ (number>=4)

Variable

Value

Justification

Expected result

DVDcost

3.50

Valid float data

Please enter cost of DVD

Number

3

Valid int data

Small orders may be dispatched by special delivery to arrive within 2 hours.

Total cost including VAT is 22.25

Number

5

Valid int data

Total cost including VAT is 29.25

...read more.

Conclusion

"Genre: Romance.\n";

                                cout <<endl<<endl;                                // displays 2 blank line

                                cout <<"2. Shadow lands.\n";

                                cout <<"===============" <<endl;

                                cout <<"Starring: Anthony Hopkins, Debra Winger.\n";

                                cout <<"Director: Richard Attenborough.\n";

                                cout <<"Run time: 126 mins.\n";

                                cout <<"Genres: Romance.\n";

                                cout <<"Released: November 28, 2005.\n";

                                cout <<endl<<endl;                                // displays 2 blank lines

break;

default:

                        cout <<"Wrong DVD genre, Please re-enter choice";

        }

// end switch (DVD_list)

// end function DVD_list

                                        system("pause");                        // pauses until user presses a key

                                        system("cls");                                // clears screen

}                                                                                                // end function DVD_list

/********************************************************************/

void choose_option()                // choose option from menu

{                                                        // declare and initialise local variables

char option = ' ';                // menu option

do

  {                                                        // do while (( option != 'E' ) && ( option != 'e'))

        display_options();                // call function to display options

        cout << "\nPlease enter your choice : ";

        cin >> option;

switch(option)                        // selection of pathway dependant on option

          {

case'D':

case'd':                        // if 'D' or 'd' input DVD List

                        {                                                        

                                  DVD_list();

                                  cout << endl << endl;                // displays 2 blank lines

break;

                        }

case'O':

case'o':                        // if 'O' or'o' input order calculator

                        {

                                        order_calc();

                                        cout << endl << endl; // display 2 blank lines

break;

                        }

case'E':

case'e':                        // if 'e' or 'E' exit

                        {                        

                                cout <<"Thank you for using DVDSTOVIEW.";

                                cout << endl << endl; // display 2 blank lines

break;

                        }

default:                        

                                cout <<"You have entered an invalid option. ";

          }                                // end switch (option)

  }while (( option != 'E' ) && ( option != 'e'));

// end do while (option ! exit)

// end function choose_option

}

/***********************************************************************/

/***************************************************************/

int main()                // main function

{

    welcome_screen();                // calls function welcome_screen

        choose_option();        // calls function choose_option

        display_options();                // calls function display_options

        genre_types();          // calls function genre_types

return(0);

}                                                        // end main function

...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. Programming a calculator in Delphi.

    I need to decide what I'd like on the calculator, and specify what each button is to do. Designing the calculator like this beforehand will pay off later when it comes round to the coding. Included overleaf is an initial sketch of how I'd like the calculator to appear and work in its simplest form.

  2. Programming Concepts. Andora Video is a small shop selling videos. The owner, Raul, wishes ...

    has been added double DESIGN PSEUDOCODE Declare vat and discount rates constants Prompt for video ID, Title, Price and Quantity Read inputted values vdSubtotal = vdPrice*vdQty if vdQtyAll >= 15 discount = disFor15Plus * vdSubtotalAll if vdQtyAll >= 10 discount = disFor10To14 * vdSubtotalAll if vdQtyAll >= 5 discount =

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

    I continue to add code as follows: Dim find As Range A global variable of type Range is declared. Private Sub cmdShow_Click() Dim z As Integer Set find = Worksheets("Inventory").Range("E5:E10") For z = 1 To find.Count lsbModels.AddItem find.Item(z) Next End Sub This part of the code is for the click event of the 'show' command button.

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

    } return dictionary[key].defList; } void LinHTable::traverse() { //displaying word and defini for(int h=0 ;h<TABLE_SIZE; h++) { if(dictionary[h].word!="") { cout<<dictionary[h].word<<": "<<endl; get(dictionary[h].word).printList(); cout<<endl; } } } // to search , it will display the search word void LinHTable::search(string str) { int inc=0; for(int key=0 ; key<TABLE_SIZE; key++) {//hash function to calculate the table index for search key.

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

    Generates Excess amount of paper: The current system uses too much paper as the recording of the customer details and orders wastes unnecessary amount of paper. Tracking Customers: The un-organisation of the file in which customer details are kept, makes tracking customers time consuming.

  2. Critique: An Approach to Software Product Testing (CarlosMunoz) Submitted by: - Abhishek Das (2003002) ...

    Utility of this approach can be extended to the Mecomb life cycle project that we are doing .It would be a beneficial idea to prepare a log book measuring the defect and percentage successful at each stage of the coding and for the various modules that are present.

  1. Evaluating Websites Usability - comparing 5 websites.

    The other links with photos are good and have good headings such as ?Basics?, News?, ?Market?, ?Science?, ?Recipes?, ?Tips? and ?Random? which are good and lead to relevant information except for 3 as discussed above which bring you to the home page.

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

    WinRE may be installed to the hard disk or run from the operating system installation disc. When installed on the hard drive, Windows Recovery Environment can be accessed by pressing F8 while the computer is booting. [21] In Windows 7, WinRE is automatically installed in the system, eliminating the need

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