Computer Science Coursework A Level H446 Component 3/4 Programming Project Candidate Number: 9095 Candidate Name: AMAANI MORESS Centre Number: 47121 Centre Name: St Marys College, Blackburn Analysis Section EPOS systems have become more paramount in recent years, especially within the food industry. It is not only more time efficient, as it allows staff to quickly take orders from customers or remove certain items or place customers on empty tables, but it also allows easy access to stock. This grants the ability to control stock inventory by making the computer think for itself. The program I will create provides the ability for a small business to use an EPOS system. This will improve their time efficiency - in sitting down customers and in their service while, also, in the long run, prove to be cost-efficient. This is due to the fact that only a critical amount of staff will need to be used as they will be servicing their tables more quickly. Furthermore, the program will analyse given data and output the most/least ordered items thus increasing and decreasing the prices of each respectively. It is clear that this program will be multi-functional used for both admin and staff purposes. It is vital that I use computational thinking when creating my solution. I must formulate my entire program as a computational problem and using decomposition, potentially create an algorithm to solve it. The algorithms which I create can be deemed as correct and efficient by ensuring they are tested, logically makes sense and are improved using user feedback. I will continuously test my program and record the errors that occur and debug them accordingly, while also asking external members to view the solution in regular intervals to ask where the program can be made better. As you can understand, the analysis of large amounts of data is often exposed to human discrepancies, however, the usage of the program will avoid this problem. If the code is built 1 correctly the program can take increasing amounts of data and provide an output within milliseconds, whereas using a human to do the same problem can take weeks and will more likely require more than one mathematician to analyse it; this increases cost in requiring to pay for mathematicians to come in to analyse the data and it may still not be 100% accurate. Using the traditional method of staff taking down orders with a pen and paper is not only old fashioned in a world where technology is constantly becoming the normal, but it also falls into the dangers of typical human errors. If the staff do not write the order in a clear manner then it cannot be read by the chefs needing to make the food. It also takes time to move from the table of the customers to the kitchen to give the order. Though it is only a minute or two, this adds up and means that one staff member can only aid with 2/3 tables. Moreover, as a staff member writes down the order, if they have accidentally written it incorrectly, it means messily crossing out the order - and if not done correctly or completely forgoing crossing it out the meal will be made which will thus increase cost and waste food. My program will automatically calculate large summations and use various mathematical protocols to provide an understandable output. This will be shown in calculating: the receipt for each customer, the number of items in stock, the most and least ordered meals and the amount of income from each type of item. This will be beneficial for the company as it will be void of any human errors and it can be carried out in seconds, thus saving time. My program will also be built to carry out validation checks in the form of If statements. An example of this being used will be found in my Login page where only accounts that exist will be allowed to access the Admin page. This will improve the security of my program and will also increase the accuracy of any outputs, as it will ensure that all inputs are reasonable and can be accepted by the program. In my Login page, I will also ensure to use hashing to ensure nobody can access the information of the restaurant without the correct details. There will be a large amount of data stored in the form of a record and database. All the items of food that are in stock will be held in a record as will all the transactions made by customers. This will be useful as it will store all the information in a clear and readable format, while also allowing the ability to easily delete, add and amend any information. The software I will use for my program, after carrying out some research, will be Visual Basic. This will particularly be beneficial for me as I have experience in Visual Basic for a year and a half and all tools required to create my software is provided by Visual Basic, including inbuilt functions. My interface will be easy to use whilst using this software and can be displayed in a clear and concise manner. If I used a different program that I was less familiar with, but had more inbuilt functions I would fall trap to more errors due to the lack of experience. I will use Visual Basic 2010 for my program as this is the version that I use in both my college and at home. The time it takes to carry out tasks related to waiting and analysing is highly wasted when completed manually. However, by using a computerised solution we can reduce both the manpower and time taken to complete these tasks. My computer program is built to show the availability of the tables, how long a set of customers has been at the table and allows the waiters 2 to access a computerised menu which will automatically display the receipt of the transaction and allow amendments to the order. It will also access the local weather, in order to provide a computerised solution to increase or decrease prices in accordance to the temperature, humidity and wind speed. It will also affect the time at which customers are able to stay at their tables. For example, if it is a cold day the prices on soup will increase and if it is snowing then customers can stay at the restaurant for longer, therefore I will increase the time customers can remain at their table, as not many people will come in. Moreover, the admins of the business will be given an opportunity to access the analysis of all the products in stock and all the items that have been sold. This will be beneficial for them for various reasons some being as with a click of a button for the items that are popular/unpopular they may increase/decrease the prices to their choice. They may also look at their inventory and the items that will expire soon they may decrease their prices or if they wish any items that are low in stock they may reorder them. I will also create a button that will make it possible for any waiters/waitresses to contact the chefs directly from the EPOS system, instead of having to go to the kitchens themselves. This will be important due to the fact that if a customer has a particular dietary requirement and it is not clear if he item they have chosen caters for that the staff may contact the chefs and ask them. I also wish to the take into account the time of day and in accordance make some food items available and others not, for example, alcohol will not be available until after 5 pm. By taking the time of day into account the owners of the restaurant can further the program so that they may create lunch meal deals that will increase the intake of customers. Not using a computerised solution will not be as beneficial due to the fact that it can be quite inaccurate to analyse large amounts of data by any human. I have further discussed the issues regarding running a restaurant using paper-based human methods above. However, it is essential that humans run the EPOS system and the restaurant rather than having it completely computerised. One reason is that a restaurant setting is a social place where humans interact with others. Therefore, it is important that our servers are humans to increase that bond which patrons will have with the restaurant. Computers cannot mimic a human’s emotions and cannot provide smiles when greeting a customer etc, thus, it is imperative we continue human involvement in the business. It is necessary to use a graphical user interface as it would make it easier for the workers to take orders from the customers and to handle the customers as a whole. One reason for this is because, after seating, a timer is set which corresponds with the colours of the table they are sat at. As the colour varies the workers can easily see when the customers have been sat at a table for too long and when they should move. The timer for each table will also be displayed alongside the changing colours to be able to track how long the customers have remained at the table. I also wish to use a colour scheme when displaying the different types of meals e.g. Appetizers would be one colour, Mains would be another colour as will Desserts and Drinks. This will avoid an error when choosing meal items for the customers as it will be easy to 3 differentiate between the colours and meals. I also want to create a button which displays the receipt of the transactions and the ability to print it out. Moreover, I wish to display the analysis of the business in the form of several graphs. This will make it easier for the admin to compare and withdraw data in order to make decisions. As mentioned previously humans struggle with handling large amounts of data and are more susceptible to mistakes. Therefore, using a computer will eliminate this problem as computers do not struggle with the speed at which they solve the problem and memory when handling the large amounts of data. This is especially important when you wish to view the analysis of your records immediately. The storage space will not be a large problem as the program has been specifically designed to run on lower spec devices such as a tablet. The program will be backed up virtually so that if the power was to cut off at any given time the information has automatically been backed up online. This also means that the information can be accessed via various devices and is not only restricted in one location. The only disadvantage of this is that the information may become compromised, therefore I will need to ensure my encryption for the sensitive information is built well. However, in addition to this online backup companies use their own safety measures to ensure hackers cannot access your data. In various parts of my program, I have removed unnecessary elements and replaced them with symbols which can still easily be understood by the end user. By doing this I can ensure that my program will run successfully and reduce the time it takes for me to code the solution. It will also reduce the computational resources that may have been required otherwise, which will allow my program to be displayed on a lower spec device such as a tablet which the servers will use to take orders. If Abstraction was not used then I would be using multiple images, which would mean an efficient GPU would be required as my CPU would not be able to handle the graphics. However, this problem is solved by using Abstraction as I am only going to be using one image, the logo of the company, throughout my program. Abstraction will also ensure that the focus is on the main purpose of my program and not on any unnecessary function. Despite the benefits of Abstraction, I will also need to ensure that I do not reduce my program too simplistically as it may lose the appeal to the end user and the user may not be able to understand it completely. Therefore, I will still continue to use colour throughout the program so it may look more understandable and appealing, I will still use an image of the logo to ensure the point is clear for which restaurant the program is being used by and it makes the program more bespoke for the end user. A point at which I will use abstraction is in my Server Menu. Here, one should find the record of the orders made by the customers, buttons which will represent the tables found in the restaurant and timers created to show how long a customer has stayed at a table. The buttons used will be in the form of rectangles, despite the fact that in the restaurant there are some tables which are 4 circular. The reason abstraction will be used is that the rectangles still clearly represent the format of the tables. I also will create a simplified version of the setting where the tables are found - including the kitchen and counter in the form of buttons and labels in order to remove unnecessary elements which will have no effect on the program. I will also use Problem Abstraction in my program which will be seen in my table seating. In a more complex program there should be the ability to reserve tables via the phone or online, however using abstraction on my program there will be no such thing as reservations. Data Abstraction will be used in the form of using my image and using APIs etc. This will be used as when loading the image or using the API, as a user I do not care how it is done - just that it works and how to use it. It is essential in my program that I first decompose my problem into several parts in order to create the solution. This will make it easier for me to debug the smaller problems and manage and maintain the modules. I wish to decompose by way of my forms and the order at which they will be displayed on the screen: 1. Main Menu which will either direct to the Admin Login or the Server Menu 2. Login page 3. Server Menu 4. Individual Order form 5. Order Form 6. Admin Page 7. Stock Record 8. Graph Analysis forms I will then further decompose using a systematic approach to reduce each subtask into further subtasks until each problem is easy to understand and program. My bottom tier will only contain subroutines, procedures, functions etc: 1. Login page: Create a User account, Hash Username and Password, Allow access to Admin page, Delete User 2. Server Menu: Record of transactions, Buttons that direct to Individual Order form, Timers for each table, API that takes in weather 3. Individual Order form: Start the timer, Stop the timer, Reset the timer, Button directs to amend Order form, Button directs to create a new order 4. Order Form: Buttons representing each meal, Delete item from receipt, Amend item from receipt, Print receipt 5. Admin Page: Button to access to Product Record, Button to view graphs for Orders, Button to view graphs for Products 6. Product Record: Record of products, Button for amendments of prices 7. Graph Analysis forms: Form of graphs for Orders - Most/Least popular order etc, Form of graphs for Products - Products most/least in stock etc 5 To create my solution it is also vital that I use Procedural constructs: ● Statement: A place I wish to use it will be in my Login page - if the details are put in correctly then they will be allowed access to the Admin page ● Subroutine: Will be found in my Login page - I will call the routine to create a user when the ‘Create User’ button is clicked ● Procedure: I wish to use this in my Product Record form - Outputs new values for the prices on the dependence of the weather ● Parameter: Will be seen in my Individual Order Form - Will amend/delete/add items on a receipt ● Loop(Iteration): Will be inbuilt in my program to affect the Individual Order Form Depending on the time of the day some items will be available and others will not ● Sequence: Will be found when creating the receipt in order to add the SubTotal of the transaction ● Selection: Will be found in my colour change of tables in accordance with the timer - The colour of the table will change the longer a customer remains at a table ● Declarations: My variables will be declared as Integer /Single /String /Boolean /Array / StringBuilder I will use flow charts in order to break the problem down into smaller components. A flow chart will allow me to detect points at which code must be run simultaneously or where a function is dependable on another. Flowcharts will also be easy for me to plan where various codes must be implemented in order for the program to run smoothly. It will cause fewer errors when actually coding the program as I have thought of it beforehand. As the entire program is long and complex it is necessary that I plan everything out before creating it to avoid any confusion and mistakes. My program will make usage of processing a number of instructions simultaneously. In order to take advantage of this and create it in the most readable format, I will use various modules all run at the same time. This will save time and ensure that my program remains efficient. This means that multiple orders can be made at the same time. It is also necessary in my program that I reuse code in order to save time and allow my program to run as smoothly as possible. In my Login page, I wish to use an inbuilt function of Visual Basic that will automatically Hash the values for my Username and Password. I will also reuse my own created code as some code will be repetitive when setting the timer for each table for example. Advantages of doing this mean that there are fewer bugs than a code which I built myself or I kept needing to rebuild. It also saves time in my coding so that I may complete all the tasks necessary to do in the critical time. Reusing code created by other programmers is more dependable than new software as bugs and faults are already identified. It will also be an 6 effective use of specialists as I can develop reusable software that encapsulates their knowledge. The only problem I may come across is understanding and adapting the reusable components. I may also need to use Object Oriented Programming methods in my program. If I use this then it can save programming time as the child classes will inherit the information from the parent classes and I can build upon this in the child class. It means that code can constantly be accessed and reused, therefore making the program less complicated and more structured. In this, I may use Encapsulation which ensures that data is not changed accidentally and the object can be coded, tested and maintained independently. Also, the data is protected as it can only be accessed using the methods defined within the object. If needed other programmers with little knowledge can also edit the code. Whilst using these methods I can take advantage of concurrent processing so that two tasks can be carried out asynchronously. In order to take advantage of this, I will need to ensure the tasks are not dependant on each other. This can save a lot of processing time. Description of the End User/Stakeholder: The company which will be using my program is a restaurant called Oasis. The people specifically using it will be both the waiters/waitresses and the owners of the company. The system which they asked for is an EPOS system. It was asked that the servers will have the ability to: ● Start timers which measure the amount of time a customer has sat at a table and using some sort of message to show when they should be moved along. ● View transactions in an understandable format that can be used quickly and easily. ● Have access to talk to the kitchen staff in case of any questions. ● Take orders from the customers, calculate their total and create/print a receipt. ● Amend and delete items from the receipt. ● Regularly check the weather. However, the system will automatically change the prices accordingly. ● Use a barcode reader to quickly access the transactions. ● Analyse the number of items sold in a day. They also asked for the chance that the owners can: ● Use a login feature to protect and access important functions that affect the business. ● Analyse data from their stock records. They will be able to view graphs which show: How many type of items are in stock, how many type of items are vegetarian and the income received from each type of items ● View the stock records in an easily readable format. 7 When designing the program they wanted to ensure that their name was displayed on most of the forms and the background maintained their logo. They also asked for a colour scheme in the reds and oranges in order to fit with their logo. They asked that the tables are in the form of the restaurant. Investing existing or similar solutions: A restaurant which I used inspiration from to create my program is Lightspeed Restaurant POS Software. This company specialises in the production of EPOS software for multiple companies. When viewing the features they use for their programs, I was able to create an idea of what my End User and I are looking for in the final solution. The company has created the ability for Severs to take orders by clicking on a table which will then bring up the menu for that table. This is a feature which I wish to take onto my program, however unlike this interface which shows the tables in the exact form the restaurant layout is in, including colours and shape, mine will not have this feature. Instead I will be using abstraction, as stated above, to display the tables where they will all be one shape and colour. 8 9 In this form the servers will have the ability to click items as buttons which will then be added onto the growing receipt. I wish to take a similar approach to my system in that I will have different genres of food in different colours in order to avoid confusion and everything is laid out in a concise and structured manner. This will remove error for the workers using my program as well. I also hope to build my program so that I can use their usage of buttons to order everything and send it to the kitchen staff. This will save time as the workers will not have to physically move to the kitchen to ensure they receive the orders. I will not use their feature of displaying the orders in various forms of time, product, seat or course as this is not a requirement made by my End User. Nor will I have the ability to search for the item via the itemID or name due to the time I have to create the program. It is also not a feature requested by the owners of the restaurant. The solution which I have taken inspiration from has also provided the chance for a server to long press an item’s button which will then display a large image of said item, including details of the ingredients in the item and how many are in stock. I will take the idea of providing information about the items, however I will build this in a Stock record which can only be viewed by admin. This ensures that no detrimental effects to the menu is caused by those outside of the owners. 10 Following from the previous feature the server then has the ability to add extras onto the item or take certain items off. It also shows suggestions of what is usually ordered with the item which is not a feature that I will be using. The customers will have the option of adding extras on to their order if they wish but will not be provided with suggestions due to the fact that the End User has not asked for that feature in the time constraint they have provided for me. 11 The company has created a record of all the customers which have visited the store and all the information regarding them, such as their name, number, how many times they have visited the store, their bill average etc. I will not be using this feature due to time constraints and the fact that my End User has not requested for this feature in their first solution. Lightspeed POS also has created a record structure for their employees in which they can log in and manage their shifts and view reports of their sales. This is not a function I will be providing due to the lack of time I have to build the program and I can use this feature as an improvement for the second solution if the End User requires us to do so. 12 Lightspeed provides the flexibility of allowing the customers to pay in various forms whether cash, credit, debit etc. They also have created the chance to redeem or sell gift cards for their business and collect points for their loyalty scheme. This is another feature I will not be taking as it is not required for this solution, however I will be taking note of doing this for any future improvements. For the owners of the restaurant Lightspeed has created the Reporting feature which provides the chance for the owners to view graphs and records of their businesses in real time. This is a feature I wish to show in my program which will show multiple graph analysis of items. This is a specific feature that has been requested by the End User. The solution allows the owners to modify and add any products of their choice which is something that I want to integrate into my program. My structure will be in the form of a table instead of buttons in order to decrease the amount of forms required to build the program. 13 Essential Features: ● Main Menu to direct to Admin features or Server features ● Login Feature: The User may create an account with a username and password which will be hashed for security to allow them access to the Stock Records. They may delete the account if they wish. ● Save the login accounts to a text file ● Hash (Encrypt) the account details ● Drop down boxes to give the user options for which graph to display ● Graphs that analyse the transactions and the stock ● Update prices in accordance with the stock available ● Store data in record tables of stock and transactions. The information will be held in a record structure. One for the products and one for the orders which have been made by the customers. ● Search completed transactions in which the user will type the ItemID for the item they are looking for and will click a button which will display all of the item’s details. ● Timers to show the servers how long a customer has stayed at their table for and to automatically update the ‘How many items are sold in the day’ graph. ● Automatically update prices depending on the weather ● Disable specific food items depending on the time of day ● API which is integrated into the code to send a request to BBC weather and receives the information in the form of a text file ● Barcode creator ● Print and create Receipt ● Save text files and records in a file ● GUI for workers to click certain buttons and interact with the interface to send orders to the kitchen staff ● Menu to order items in which servers simply click the buttons for the corresponding items which have been ordered and it is automatically added to the receipt Limitations of the proposed solution: I will ensure that the system I create will meet all of the requirements stipulated by the end user. However, when comparing my solution to those professionally made, I will have some clear limitations set out: 14 ● My system will not have the ability to take reservations via the phone or via a website booking. All seatings will be done at the time and day. This has not been done as a form of abstraction and a similar solution to my own, My Lahore, does not take reservations too. ● My program does not yet extend itself so that the staff can input their names and details and we can retrieve information from their transactions or any of their information. This function is not created to avoid confusion with the number of records already being built into the program. This has also not been built in so that I could finish the solution in the critical time. ● My system will also not automatically order items, via EDI, which are running low on stock which is a necessary feature on full solutions. This has been avoided for now in order to avoid complications in making the program too complex. ● I will not be creating the function to keep a record of customer bookings and allow customers to register with the company: taking their names, addresses and numbers down etc. In most systems when this feature is available the company can view customer buying habits and their behaviours may be analysed to suggest deals and other purchases. I do not think this is necessary for my solution as of yet, therefore I have decided to leave this feature out. ● Despite the century we live in, I have not created the ability to allow payments to be taken via electronic payment systems. I decided to leave this for further improvement after the original solution is created as it is not absolutely necessary customers pay electronically. Hardware and software requirements: Furthermore, my solution will need to use a distributed operating system within a network to allow multiple tablets to share resources, like the printer. The distributed operating system allows all the tablets to simultaneously run the program and each input affects every program. This means that servers are automatically communicating with each other through the program so that for example, if somebody seats a customer at table 4 another server will be notified via their tablet that the table is occupied. This is an improvement from using no program at all or a program that does not use a distributed operating system as there would be a lack of communication which, therefore, will cause problems within the restaurant. Moreover, a device driver will need to be used in order to control the devices attached to the computer/tablet and provide a software interface to access the hardware functions. The IDE which I will be using is Visual Basic as mentioned previously. One of the reasons I will be using Visual Basic is due to the fact that it uses high-level programming language. When coding in High-Level language the instructions are closer to English and so easier to understand, 15 debug and code faster. In addition to this, libraries of procedures can be used and selected from when writing a new program which is much more time-saving. These library routines will also have been tried and tested. I hope to use a library routine for my barcode generator, due to the complexity being beyond my current abilities. Visual Basic also uses Bytecode which compiles and interprets the program. The source code is translated using a compiler into intermediate language before interpreted into machine code. Using Visual Basic is beneficial as if a line contains an error, the execution will stop and highlight the problem, whilst also mentioning the reason as to why the program crashed. The error can be corrected before the program will continue running. This also creates object code which allows the program to be executed without the compiler. This executes faster than interpreted code. When programming in Visual Basic after typing a couple of letters it provides a set of suggestions which you may want to use, which decreases programming time and helps you to understand what you are writing. My program will also need access to the internet in order to gain the weather information. I will need broadband that provides quick internet access and is quite fast as the weather information will regularly be needed. This will be in the form of an API which will request for the information and receive it in HTTP format. The API will specify how my software components should interact. I will also need A Wireless Access Point, a wireless router, to enable the tablets to access the WiFi. Due to the necessity of needing fast internet access, it may be a more efficient decision and cost-effective to choose optical fibre broadband. In my program I wish to use a Barcode Generator, therefore it is vital that I use a barcode reader. By scanning the barcode, information about the receipt and therefore, order, will be retrieved such as time of purchase, date of purchase, items purchased, cost etc. Furthermore, I will need an inkjet printer in order to print out the receipts of the transactions. This printer is better used for a small business such as my end user as it produces very high quality black and white as well as colour copies for a very low cost. Moreover, in order to carry out the orders at each table, it is important the servers have a portable output device which runs the program. This device will be a tablet as Visual Basic can run on the tablet and it holds enough storage space to run the program. This device is also lightweight enough to carry around and easy to learn and use. Measurable success criteria: ● The program will need an Admin page which stores stock data. My end user would like a clear view of stock information. ● A login page needed. This will ensure that information and functions available are protected. 16 ● Search/Order items. It will make it easier for admin to look for specific items and order items in accordance with different variables. ● Graph analysis will be needed. It was desired that they can analyse and compare data from their company. ● Timers will be needed to measure the length a customer has sat at the table. This was specifically asked to improve the efficiency of the restaurant. ● A function which checks the weather regularly. Necessary so that the prices can be edited accordingly and the time customers can stay at a table changes. ● A record of the products sold will be needed. End-user wanted to record transactions to later use for analysis. ● Graph for the amount of items sold in a day. This will make it easy for staff to see the most popular items sold in a day. ● A form to order items. Borrowed from my research in other restaurants, to improve critical time and servers. ● A form to view items ordered according to each table and calculate the subtotal. This will make it easy for the servers to view the receipt before printing. ● A function to print out receipts. A necessity for any transactional data so that the customer also has evidence of their transaction. ● A barcode generator. Asked for so that when scanned information of that transaction appears. 17 Design Section: Back End Top-Down design ● Hash username and password will be an algorithm that will help protect the user’s details so that others cannot access the account. ● I will need to create a file to save the hashed account which will be checked when deleting the account. ● Deleting the account will simply look in the file to check the hashed value of the inputted details to the save value and compare then delete. ● Date and time is a simple function that will display the date and time live 18 ● ● ● ● ● ● ● ● ● ● ● Delete record is a simple procedure that will allow the user to delete any record created. Next and previous are two procedures that allow users to move between the records. Add record is another procedure that allows the user to add any record. Amend record is a procedure that allows the user to update any of the fields of a record. Save record is a procedure that allows the user to save the changes they have made to the file. A new record is a procedure which creates a new set of records. Read record is a procedure which displays the set of records in the file. When reading the record the price of the items which have a stock less than 10 increases Make record is a procedure which reads the set of records in the file. When making the record a file will need to be created to save the record there Display record is a procedure which fills in the textboxes with the details read from the file ● Type of items in least stock will be a procedure which will display a graph so that the end user can view the stock in an easy format. ● I will first need to count how many items are in stock from each category using a For loop ● When displaying the graph I will need to colour code each bar to represent the type of item in accordance to the colours on the menu ● No Vegetarian for each type of item will have reused code from the previous graph to allow the end user to make sure that they are catering for other dietary requirements in a fair manner. ● I will need to count how many vegetarian items there are from each category using a For loop ● Income from each type of item will also use reused code to allow the end user to see which item is more expensive to buy in comparison to what they are selling it for. 19 ● I will need to count the retail price for each type of item and then the purchase price for each type. From there I would need to calculate the difference in order to work out the profit that I will be gaining from each type ● Binary search will be an algorithm that will quickly and efficiently go through the records and display to the user the information regarding the item needed. ● Each order item task will be similar to each other, therefore the code will be reused and their purpose will be to display each item in an order according to a variable. This will provide the opportunity for the user to quickly view extremities, for example, items that are most or least expensive. They will all use the bubble sort algorithm which can be edited depending on the variable. ● After the items are searched/sorted I will need to display them which will use the same procedure, but will have different information displayed. ● Creating an API timer and get weather update is a procedure and function respectively that will check the weather every 15 mins and update accordingly which will then amend the time at which people can stay at their tables. ● I will need to request the information about the weather from the website using the API which will then provide me with a text ● In the text I will need to find the words ‘tempmin’, ‘humidity’ and ‘wind’ then the numbers following from these words will be used to display ● I will need to count how many letters are from the words where the numbers start and then display them. A message will follow depending on the information such as ‘it’s going to be a cold day’ etc. 20 ● The order record is similar to stock record, therefore all of the features available will be reused code. ● Both records have been created to provide the user with the ability to view each record in an easy and understandable format. ● Similar to the graphs in the Stock records I will be using their code as a template for this graph which will display which type of item was sold in the day and will show servers their most popular items sold that day. ● The stock timer will be used to tell when to check the item stock in the day and night then display the graph automatically at night ● The graph will need a for count in two separate occasions to count the stock in the day and night so that I could calculate the difference in stocks ● Each bar will need to be displayed with a different colour in accordance to the type of item’s colour in the menu ● Stop timer/Reset timer/Start timer are procedures that will allow servers to measure the amount of time a customer has remained at a table. This will ensure efficiency in the restaurant so that others are seated quickly. 21 ● Search orders: find correct order is a linear search which goes through each table's orders and displays the correct order accordingly. This will remove any confusion for the users when looking at separate table orders. ● Timers for the length of stay are procedures for each table that will change the colour of the timer depending on how long a customer has sat there. These timers will change depending on the weather. The display of this will give the servers an easy message of when the customers should be moving along. ● If the temp < 10 then the time which the customers can remain at the table will increase and if it is > 10 then it will decrease ● Update item will be a procedure that if there are any discrepancies in an order already made or any changes wanted then it can easily be done without deleting the order and then creating a new one. ● Amend Record after update will change the records found on the server menu depending on how the record was updated ● Amend item order will change the order on the receipt. Only the amount that has been sold can be amended ● Display order will show the ordered items on the receipt which is a simple procedure ● Delete item is a procedure which will allow a server to easily delete any items if any accidental orders have been made. ● The item must be first found from the records and then the customer must be asked if they are sure they wish to delete it ● Reduce stock quantities will be an algorithm that will automatically decrease a stock quantity after an order has been made. This will help in the graph analysis in the stock records. ● The system will first check if there is enough of the item in stock before it is added to the receipt and will display a message if there is not enough of an item. ● The print document is a feature that will print out the receipts to give to the customers so they too have a hard copy and evidence if anything has gone awry. ● Barcode Generator and Create barcode number are two procedures that have been found in a library routine which I will use. It will give the servers a chance to simply scan the barcode so that they may quickly bring up the receipt of that particular transaction. 22 ● Amend booking to X is a procedure that will change the table name in the record to have an X prior to the name. This will allow users to easily see which orders have been completed and which are still pending. ● Find Price is an algorithm that will loop through the stock records to match the price with the correct item in the Add order. This will allow the admin to edit the prices in the stock record and it will automatically show the correct price in the Add Order. ● Find item name is an algorithm that will have the itemID passed through it and will provide the correct item name.. This will be used when pressing a button to add an item to the receipt so that rather than displaying the itemID which is confusing the item name will be displayed instead. ● Disable alcohol is a procedure that will remove the ability to order alcohol until 5. This will use the date and time displayed before it enables the button, which was asked for by the end user. ● Add to order is a procedure that will add the number of items selected to the receipt, which will make it easy for servers to quickly order large numbers. ● After the items have been added to the receipt and the order has been saved the order will be added to the Order record for servers to view after ● When adding an order the system will first check if there is an order pending to ensure the servers are sure they need to add to the correct order or they need to finalise that order. ● Buttons for menu items are almost the exact same procedures, therefore the code will be reused and each will use the find price and find item name algorithms to correctly identify the item being ordered. ● Save table order is a procedure that will save the items ordered and save it in the record that can be viewed later. It will be seen as pending orders as the X will be missing and will allow servers to take more orders from other tables without having to worry any table will lose their transaction. ● A random number will be created to provide that order with an orderID to show which items are involved with which orders ● The period of the day will also need to be checked so that when the item is added to the record the period of day can be displayed with it 23 Front End Top-Down design 24 Everything has been broken down to these specific smaller parts for the Front End of the design as they are all just simply buttons that need to be added or labels etc. Algorithms ● For the security feature, which will use a login, I have developed the following flowchart: 25 This flowchart will be used to create my login in order to protect certain features from those who are not part of the admin. ● To create the user I will use the following Pseudocode: This process will first check if the account already exists and if it is not then it will save the hashed account in the file, otherwise it will show a message that the file already exists. ● In order to enter a user into the system I will use the pseudocode: 26 This template will hash the inputted details of the user and check these against the hashed details saved in the file. If it matches then it will allow the user to access the Stock Records, otherwise it will show the message that the account details are not correct. ● To delete any account I will use this pseudocode: This will check if the account exists in the file and if it does then the user will have the option to delete it. If the file does not exist then a message will appear to the user that the account doesn’t exist. ● This Pseudocode will be used to increase the prices if the stock gets under 10 and reads the record saves in the file: 27 If the stock is reduced to below 10 then the retail price will increase by 20% otherwise it will remain at its original price. The procedure will also read the records as long as there are records saved in the file. When reading the files this will also be used for my Order Record in the Server Menu. ● These templates will be used to move through the records: The first pseudocode will be used to move to the next record while the second procedure will be used to move to the previous record. This will also be used for my Order Record in the Server Menu. ● In order to add a record to the file I will use the following: 28 This pseudocode will be used to add information about a new record to the file. If any information has not been added correctly then an error message is outputted. This will also be used for my Order Record in the Server Menu. ● In order to amend the records I will use this pseudocode: This will count through the records until the correct is found and the user will be able to amend any of the information and output to the user that the record has been amended. This will also be used for my Order Record in the Server Menu. ● To delete a record I will use: The user is first asked if they would like to delete the record if they say yes then the record is deleted and the file is read from the next record. This will also be used for my Order Record in the Server Menu. ● To create a new record this template will be used: 29 In order to create a new record the user is first asked if they would like to make a new one. If the answer is yes then the record is started from the beginning and the user can start a fresh record with everything empty in the record. This will also be used for my Order Record in the Server Menu. ● This pseudocode will be used when an order is added to the record via the Order Menu: This will add the appropriate fields on the Server Menu’s record when an order is saved. ● To make the files I will use the following: 30 This will be used for each of the items in stock and a similar code will be used for the Order Records with the fields and information changing. ● To display the graphs I will have to carry out some calculations before the graphs’ calculations are displayed. The template which I can use is the following Pseudocode: These calculations will be used for all of the graphs with a change in variable. They will be used to add a type of item on the growing count. A similar pseudocode will also be used on the graph in the Server Menu, however the difference will be that it will be used in the morning and the evening then a simple subtraction of these values will produce numbers which will be used in displaying the graph. 31 ● The following Pseudocode will be used to order the items in accordance with a particular field: This will be used to first search the length of the records and then record whether a swap has been made. Until the swap being made is false the algorithm will continue to swap the variables. It will make use of a temporary variable in order to make the swap. This algorithm is the Bubble Sort and it will be used for every procedure that is needed to order the items for the admin. ● In order to create my Binary search to find specific items and their information I will be using the following Pseudocode: The algorithm will be used so that the owners can quickly find information in a couple of seconds without having to go through the entire records individually. 32 ● The Get Weather Update flowchart will be used to receive the weather from online and t h e n display it on screen: This API will be used so that the prices and duration at which a customer can remain at the restaurant changes depending on how hot or cold it is. ● In order to get the weather information from the internet I will need an API. This Pseudocode will make use of that: 33 The pseudocode will receive the information required as text and and finds the word required which informs the user of the number. This is converted to integer and compared. Depending on the if statement being used the according message is outputted. This pseudocode will also be used for humidity and wind speed with the appropriate names being changed. ● When an order has been made, after the order has been saved the following pseudocode will be used to add the order to the records: 34 This will increase the number of records and then save the different information in the appropriate fields. ● When an item is being updated from the View Order form the following pseudocode will be used to update the item in the record: ● The following pseudocode will be used to update the receipt when an item is amended in the View Order form: 35 This will look through the order records and find the records which need to be amended from the View Order form. ● The pseudocode below will be used to change a table number to have an X proceeding it when an order is complete: When the server is ready to print out the receipt the order will be complete, therefore all the records in the Order record which involves that particular receipt will have an X proceeding the table number. ● The pseudocode will be used to display information on the receipt in a clear format: The pseudocode will be used to go through the information and display certain fields on the receipt. It will also record whether that table has an order so that the Server is informed if they would like to continue adding to a live order, or if they have made a mistake. 36 ● In order to delete an item from the View Order form I will use the following: If the Server has made a mistake or the customers weren’t happy with the food and so an items needs to be deleted from the View Order form the above pseudo code will look for the item which needs to be deleted and ask the user if they would like to delete the item. If the answer is yes then the item is deleted and the file is read again. ● To measure and let the servers know how long a customer has remained at the table the following will be used: This will check the timer against the fixed values and change the colour of the tables accordingly to let the servers know when to move customer along. It will be used for all of the tables. 37 ● The following pseudocode will be used to check if there is already a live order on the receipt: This will check if there is a live order, if there is then the server is asked if they would like to continue with the order, if they choose yes then they will be moved to the menu page to add extra orders, however if they say no then they will continue with the Table Choice page. ● In order to find the name and price from the Stock records and read it into the Menu page I will use this pseudocode: This will be used to find the correct information with the word variable changing to Price or Name depending on what is needed. ● To disable alcohol until after 5 a simple If statement will be used and the following Pseudocode can be used as a template: This will ensure that the restaurant provides a safe and professional environment for all its customers as was requested by the end user. 38 ● In order to add to the receipt in the menu page buttons will need to be clicked and the corresponding item will be added, with information attached. The following pseudo code displays this: This will be used to ask the user how many of the item they would like and add it to the receipt. It will display the necessary information and add VAT at the end before it is saved. It will save all the information in an array to be used in other parts of the program. ● This pseudocode will be used to Save a table order in the records found in the Server Menu: The code will run through the order and if something exists then it will provide a random number to the order which will act as the orders’ ID. It will check the time and in the records save all of this information. 39 ● The following will be used to either delete an item from the View order or amend it: The above will be used to amend the quantity or delete an item from the View Order form. The ItemID in the receipt will have a hashtag proceeding it, therefore the program will look for where the hashtag occurs and find the itemID by moving back one space. The word change can be replaced with delete or amend depending on the function taking place. ● The following Pseudocode will show how I wish to reduce my stock quantities in the stock file, only accessed by Admin: This will be used to ensure we do not promise to sell anything when we do not have the amount to sell. It will also help in my graphical analysis to view the amount sold in a day. ● When the order is complete the following pseudocode will be used: 40 When the button is clicked to save an order the document is printed and barcode generated, using inbuilt functions. It will then find the itemID and set the table number to X in the records found in the server menu as the order is now complete. ● This will generate random numbers used for the barcode: This will generate two sets of random numbers and provide give it to the barcode so that each barcode number is unique and can be identified. Usability features The purpose of the features I will use is to avoid any confusion on the part of the servers and the admin. A lot of it will be based on structure and colour to enhance usability. ● To ensure the correct information is displayed I will use validation message boxes around my program such as when the server menu loads a message box will pop up with the temperature, humidity and wind speed, while also displaying a comment: ‘It is going to be a cold day.’ This will similarly occur with a message box appearing with how much is in stock at 9 am and again at 11 pm. ● I will also create message boxes which display sensible messages such as when deleting anything, the user will be asked if they are sure they want to delete it. This will occur when completing an order, adding and amending records etc. ● I will use a GUI in my entire system for easy access as shown in the annotations below: 41 42 43 44 45 46 Key data structures I have used arrays when creating records for orders. This has been done in order to make it easier when creating the receipt for the records. The first array contains the initial data that is created and the second array will be used to store the content of the text file that contains the orders made. I have also used two records one for my stock and one for my orders. The purpose of both records is to save all the information about the items/orders and be able to quickly amend, delete, add etc any record. However, the stock record will only be accessed by the admin of the restaurant, while the Order record will be used by the servers. BIN files have been used when creating my records and my login accounts. The accounts are saved in a BIN file and read when somebody wants to access the stock records. In creating the records there is some information which is hardcoded, which is read from the BIN files and displayed on the interface. The records have been made public in order to access them from all of the forms which will be necessary in order to make the receipt for example. The stock record would need to be accessed as to find the item and the price, while the order record will be needed so that the order can be saved. Some functions will also be made public such as Amending the record so as to have an X proceed the table name. These such functions will be needed in other forms as they will be needed to call upon. Taking the Amend record to X procedure as an example this will be created in the Server Menu, however, called upon in the View Order form when completing the order. Field Name Data Type Data Format Field Size Description Example ItemID String XXXX 4 The ID used to reference to a specific item P001 Item String The name of the item Hummus and Pitta Type of Item String What category does the item fall under Appetiser Number In Stock Integer How many of that item is in stock 6 Retail Price Single How much is it being sold for 8.57 Purchase Price Single How much did it cost 6.5 47 Vegetarian String Is it vegetarian Yes Expiry Date Date XX/XX/XX 8 The date which the item expires 26/3/19 Field Name Data Type Data Format Field Size Description Example ItemID Integer The random number generated with an order to show which items have been ordered together 1 Table Number String XX 2 The table that has ordered that item T1 ProductID String XXXX 4 The corresponding ItemID P002 Number Ordered Integer How many of that item has been ordered 1 Sub Total Decimal How much was the overall order cost 34 Date/Time Date Date and time it was ordered 01/01/2019 18:38:00 AM/PM String What time of the day was it EVE XX/XX/XXXX XX:XX:XX 18 Global Variables Variable Type Content DisplayOrder StringBuilder Displays the order which has been made by a table TableName String The name of the table being accessed PresentOrder Boolean Checks if there is a live order TableOrders(20,3) String Holds the data for a given table Table1TimerValue Integer Holds the minutes gone since table 1’s timer has started Table2TimerValue Integer Holds the minutes gone since table 2’s timer has started 48 Table3TimerValue Integer Holds the minutes gone since table 3’s timer has started Table4TimerValue Integer Holds the minutes gone since table 4’s timer has started Table5TimerValue Integer Holds the minutes gone since table 5’s timer has started Table6TimerValue Integer Holds the minutes gone since table 6’s timer has started Table7TimerValue Integer Holds the minutes gone since table 7’s timer has started Table8TimerValue Integer Holds the minutes gone since table 8’s timer has started RegularStay Integer When temperature is above 10, amount of time timer stays green LongStay Integer When temperature is above 10, amount of time timer stays blue VeryLongStay Integer When temperature is above 10, amount of time customers stay before timer turns red ColdRegularStay Integer When temperature is below 10, amount of time timer stays green ColdLongStay Integer When temperature is below 10, amount of time timer stays blue ColdVeryLongStay Integer When temperature is below 10, amount of time customers stay before timer turns red FinalOrderTotalForTable Decimal The final cost of an order including VAT NewTableOrder(20,3) String Array which holds the orders made by a table Local Variables Variable Type Location Content Path String Login.vb Stores the location where the hashed account details will be stored 49 FinalString String Login.vb Holds the converted hashed value into string Account String Login.vb The hashed value of the account Product ProductRec StockRecord.v b Holds the product record Stock() ProductRec StockRecord.v Holds the product record b ServerMenu.vb AddOrder.vb IndividualOrder Display.vb NoRecords Integer StockRecord.v The amount of records found b ServerMenu.vb IndividualOrder Display.vb P Integer StockRecord.v The position the record is to be b displayed ServerMenu.vb Answer Integer StockRecord.v The message which is displayed when b deleting or making a new record ServerMenu.vb TableChoice.v b AppetisersNIS Integer StockRecord.v b Holds the number of appetisers in stock MainsNIS Integer StockRecord.v b Holds the number of mains in stock DessertsNIS Integer StockRecord.v b Holds the number of desserts in stock DrinksNIS Integer StockRecord.v b Holds the number of drinks in stock ExtrasNIS Integer StockRecord.v b Holds the number of extras in stock AppetisersV Integer StockRecord.v b Holds the number of appetisers which are vegetarian 50 MainsV Integer StockRecord.v b Holds the number of mains which are vegetarian DessertsV Integer StockRecord.v b Holds the number of desserts which are vegetarian DrinksV Integer StockRecord.v b Holds the number of drinks which are vegetarian ExtrasV Integer StockRecord.v b Holds the number of extras which are vegetarian AppetisersRP Single StockRecord.v b Holds the total of the appetisers retail price MainsRP Single StockRecord.v b Holds the total of the mains retail price DessertsRP Single StockRecord.v b Holds the total of the desserts retail price DrinksRP Single StockRecord.v b Holds the total of the drinks retail price ExtrasRP Single StockRecord.v b Holds the total of the extras retail price AppetisersPP Single StockRecord.v b Holds the total of the appetisers purchase price MainsPP Single StockRecord.v b Holds the total of the mains purchase price DessertsPP Single StockRecord.v b Holds the total of the desserts purchase price DrinksPP Single StockRecord.v b Holds the total of the drinks purchase price ExtrasPP Single StockRecord.v b Holds the total of the extras purchase price AppetisersDiffe Single rence StockRecord.v b Holds the total difference of the appetisers purchase and retail price. i.e.income MainsDifferenc e StockRecord.v b Holds the total difference of the mains purchase and retail price. i.e.income Single 51 DessertsDiffere Single nce StockRecord.v b Holds the total difference of the desserts purchase and retail price. i.e.income DrinksDifferenc Single e StockRecord.v b Holds the total difference of the drinks purchase and retail price. i.e.income ExtrasDifferenc Single e StockRecord.v b Holds the total difference of the extras purchase and retail price. i.e.income Temp ProductRec StockRecord.v b Holds a record whilst a swap is being made SwapMade Boolean StockRecord.v b Checks to see if a swap has been made SearchLength Integer StockRecord.v b The length of the record being ordered Pointer Integer StockRecord.v b The position where the item has been found in the search Midpoint Integer StockRecord.v b The middle index of the record being searched NoofStockRec ords Integer ServerMenu.vb Number of records present in stock AddOrder.vb NewOrder Sale ServerMenu.vb Used to create the initial date for the orders Orders() Sale ServerMenu.vb Stores the content of the text file for the orders DataBack String ServerMenu.vb Holds the data returned from the API request mintemptodayI NT Integer ServerMenu.vb Holds min temp every 30 min humidityINT Integer ServerMenu.vb Holds the humidity every 30 min windspeedINT Decimal ServerMenu.vb Holds the wind speed every 30 min GoURL String ServerMenu.vb Holds the URL address of the API request request HttpWebRequest ServerMenu.vb Requests for a HTTP response to the weather 52 Positionoftemp min Integer ServerMenu.vb Will locate the word "tempmin" Positionofhumi dity Integer ServerMenu.vb Will locate the word "humidity" Positionofwind Integer ServerMenu.vb Will locate the word "wind" texttocheck String ServerMenu.vb The text which is being searched for the weather mintemptoday String ServerMenu.vb Holds the number of the minimum temperature humidity String ServerMenu.vb Holds the number of the humidity windspeed String ServerMenu.vb Holds the number of the wind speed RecordPointer Integer ServerMenu.vb The position of the record being amended xtn String ServerMenu.vb Places an X infront of the table which has an order completed IntTableOrders (20,7) String ServerMenu.vb The record which contains the correct table number’s order is copied into this array NumberOfOrde Integer rs ServerMenu.vb Number of orders made by that table AppetisersAM Integer ServerMenu.vb Holds the number of appetisers in stock in the morning MainsAM Integer ServerMenu.vb Holds the number of mains in stock in the morning DessertsAM Integer ServerMenu.vb Holds the number of desserts in stock in the morning DrinksAM Integer ServerMenu.vb Holds the number of drinks in stock in the morning ExtrasAM Integer ServerMenu.vb Holds the number of extras in stock in the morning AppetisersPM Integer ServerMenu.vb Holds the number of appetisers in stock at night 53 MainsPM Integer ServerMenu.vb Holds the number of mains in stock at night DessertsPM Integer ServerMenu.vb Holds the number of desserts in stock at night DrinksPM Integer ServerMenu.vb Holds the number of drinks in stock at night ExtrasPM Integer ServerMenu.vb Holds the number of extras in stock at night AppetisersDiffe Integer rence ServerMenu.vb Holds the number of appetisers sold in the day MainsDifferenc e ServerMenu.vb Holds the number of mains sold in the day Integer DessertsDiffere Integer nce ServerMenu.vb Holds the number of desserts sold in the day DrinksDifferenc Integer e ServerMenu.vb Holds the number of drinks sold in the day ExtrasDifferenc Integer e ServerMenu.vb Holds the number of extras sold in the day CountAM Boolean ServerMenu.vb Checks if the number of the type of item in stock has been added in the morning SubTotal Decimal AddOrder.vb The amount of money the order costs IteminOrder Integer AddOrder.vb The position in the array where the order is being added displayout Stringbuilder AddOrder.vb Displays the information about the order TempPrice Decimal AddOrder.vb Holds the founded price of an item from the stock record TempName String AddOrder.vb Holds the founded name of the item from the stock record Quantity Integer AddOrder.vb Holds the amount of an item that has been ordered ItemSubTotal Decimal AddOrder.vb Holds the worked out value of the subtotal of an order 54 rn Random AddOrder.vb Holds a random number generated by the system for the ItemID nrn Integer AddOrder.vb Holds the next random number generated by the system for the ItemID currentdate Date AddOrder.vb Holds the present date and time periodofday String AddOrder.vb Shows the period of day which the order has been made at TempReceipt Integer AddOrder.vb The number on the receipt to refer back to it BarcodeNumb erx Integer IndividualOrder When an order has been completed it is Display.vb the generated barcode OrderForTable( String 20,7) IndividualOrder It will store: ItemID(Random Number), Display.vb Table Number, Product ID, Quantity and subtotal Tablelength Integer IndividualOrder The length of the array Display.vb TableSubtotal Decimal IndividualOrder Stores the subtotal for the table Display.vb HASHposition Integer IndividualOrder Finds the first occurance of the HASH Display.vb tag and records the position. Itemtosetox Integer IndividualOrder The integer value of the ItemID which is Display.vb set to x when the order is complete newrandomnu mber Integer IndividualOrder Adds 999 to random number and acts Display.vb the barcode number Test Data To test the following modules I will do this by inputting either valid or invalid data or extreme data, black box testing. I will need to test my Login page: ● Check if Username and Password have been hashed ● They have been stored in the correct file ● The user can login with correct details 55 ● A message appears if there is an invalid username or password ● The user will be able to delete any created account ● After the user logs in the Stock record will load up In checking my stock records, I will need to make sure: ● The records are read correctly, from the correct file ● The price increases/decreases in accordance with the amount of stock ● Records can be added with the correct input ● Records can be amended and saved ● Records can be deleted When creating my Graph analysis in my Stock Records, I will need to ensure: ● When selecting the graph for Items in the least stock the correct graph and information can be seen ● When selecting the graph for Number of Vegetarian items the correct graph and information can be seen ● When selecting the graph for Income from the items the correct graph and information can be seen When placing all of the items in an order, I will need to check if: ● The items are ordered correctly by ItemID when selected ● The items are ordered correctly by Item when selected ● The items are ordered correctly by Number In stock when selected ● The items are ordered correctly by Retail Price when selected ● The items are ordered correctly by Purchase Price when selected ● The items are ordered correctly by Expiry Date when selected ● The clear button will clear everything from the label When searching for an item using a Binary Search, I will need to: ● Make sure the correct information is displayed about the item ● Look to see if the item is not found ‘-1’ is outputted Using the API to receive the weather from the internet, I will need to check: ● The response from the API, while if the response cannot be found a message box will tell me so ● The position of the information, so I can display it ● The information that is needed can be found ● Catch it if the information cannot be found ● An appropriate message is provided depending on the weather 56 When viewing Order Records, I will need to see: ● The records are read correctly, from the correct file ● The price increases/decreases in accordance with the amount of stock ● Records can be added with the correct input ● Records can be amended and saved ● Records can be deleted ● An item is added onto the record when it is ordered ● Records are amended after updated ● When an order is completed the table name is changed so an X proceeds it When looking at each tables’ functions I will need to see if: ● When a table is clicked the correct form is displayed ● The correct order is displayed ● The timers start, reset and stop when clicked ● The colours to show how long a customer has been sat for work properly ● The length of time for each colour increases when it is below a certain temperature When creating my graph for the number of items sold in a day, I will need to check if: ● The correct information is displayed on the graph ● The timer for which the graph works on coincides to when the graph will appear When creating the receipt in the Add Order function, I will need to make sure: ● Everything is displayed correctly on the receipt ● The items' prices are added up correctly, including with VAT ● If the table has a live order then the server is asked if they would like to continue creating the order ● The items have the correct price found from the stock records ● The Item name is found and requested for instead of the ItemID from the Stock Records ● Alcohol is disabled until 5 pm ● It is asked how many items they would like to order ● The order can be saved with the period of the day ● The order is saved with a random number attached as an OrderID to know which items are all within that order When the receipt is being finalised, I will need to check: ● An item can be deleted from the database and is deleted ● The receipt is displayed with the correct order ● The stock is reduced and a message appears if there is not enough of that item ● An item can be updated ● The receipt can be printed 57 ● A barcode is generated ● A barcode number is generated When updating an order from the finalisation of the receipt, I will need to check: ● The items can be amended and are changed on the receipt and later on in the record Blackbox Testing What will I be testing Input Expected result Admin button on home page Click the admin button Login page loads up Server button on home page Click the server button Server menu page load up Create new account for login Enter username and password details New account is created Delete account for login Enter correct username and password Account is successfully deleted Delete account for login Enter incorrect username or password Account cannot be found Enter account for login Enter correct username or password Stock records loads up Enter account for login Enter incorrect username or password Account cannot be found Home button on login Click the Home button Home page loads up Make button on stock records Click the make button The record has been made successfully Read button on stock records Click the read button The correct information on the items comes up Add button on stock records Information is correctly inputted Record has been added successfully and can be seen 58 Add button on stock records Information has not been inputted correctly. E.g. Number in stock = eight Record cannot be added Amend button on stock records Information is amended correctly Record has been amended successfully and can be seen Amend button on stock records Information is amended incorrectly. E.g. Retail price = seven Record cannot be amended Save button on stock records Information is all correct Record has been saved Save button on stock records Information is incorrect. E.g.Vegetarian = 5 Record cannot be saved Delete button on stock records Click the delete button Record has successfully been deleted New button on stock records Click new button, are you sure you want to create a new record then yes Entire record is deleted New button on stock records Click new button, are you sure you want to create a new record then no Records should remain the same Next button on stock records Next Button is clicked Next record is shown Previous button on stock records Previous button is clicked Previous record is shown Home button on stock records Home button is clicked Home page is shown Order drop down list on stock records Click on any method of ordering Method of ordering is shown Order button on stock records Click on order button Stock is ordered in the method that is chosen Clear button on stock records Click on clear button Display box is cleared completely Search button on stock Existing itemID is written is Correct information of 59 records search text box searched itemID is displayed Search button on stock records Invalid information is written is search text box. E.g. Chicken sizzler Information cannot be found Graph listbox on stock records Information which wants to be displayed in the graph is shown. E.g. Number of vegetarian items Correct graph chosen is shown in the listbox Graph button on stock records Graph button is clicked Correct graph is displayed with correct information Make button on order records Click the make button The record has been made successfully Read button on order records Click the read button The correct information on the items comes up Add button on order records Information is correctly inputted Record has been added successfully and can be seen Add button on order records Information has not been inputted correctly. E.g. Number ordered = eight Record cannot be added Amend button on order records Information is amended correctly Record has been amended successfully and can be seen Amend button on order records Information is amended incorrectly. E.g. Subtotal = seven Record cannot be amended Save button on order records Information is all correct Record has been saved Save button on order records Information is incorrect. E.g Date/Time = 5 Record cannot be saved Delete button on order records Click the delete button Record has successfully been deleted New button on order records Click new button, are you sure you want to create a Entire record is deleted 60 new record then yes New button on order records Click new button, are you sure you want to create a new record then no Records should remain the same Next button on order records Next Button is clicked Next record is shown Previous button on order records Previous button is clicked Previous record is shown Home button on order records Home button is clicked Home page is shown Current temperature - Current temperature is displayed Wind Speed - Wind speed is displayed Humidity - Humidity is displayed Date/Time - Date and time is displayed Graph of number items sold in a day - Graph with correct information is displayed Receipt number - Receipt number is displayed Table buttons When any table button is clicked Table choice page loads up Return to table menu button on Table Choice When the button is clicked Server Menu is displayed Start/Continue Timer button Button is clicked Timer starts in server menu to right table with green colour. After 30 secs it turns blue, after 45 secs it turns red. When temp<10, after 60 secs turns blue after 90 secs turns red. Reset timer button Button is clicked Timer is reset to 0 Stop timer button Stop button is clicked Timer stops at that time 61 Add order button Add order button is clicked Add order form loads up. If there is a live order user is asked if they would like to continue View Order button View Order button is clicked Individual Order Display form loads up. If there is not enough of any item ordered in stock message is displayed that there is not enough of said item. Date/Time - Date and Time is displayed When any button is clicked User is asked how many they would like of the item and it is added to receipt SubTotal and VAT total - SubTotal and VAT total is displayed Save Table Orders button When the button is clicked Order is saved in records Receipt on Individual Order Display - Receipt with correct order items is displayed Any menu item button item Edit Receipt Listbox Order SubTotal Click on any item - Item is highlighted Displays final sub total of order Delete Item button Button is clicked Highlighted item on Edit receipt is deleted Update Item button Button is clicked Update Item form loads with information about highlighted item Order Complete button Button is clicked Stock records with those orders will have X proceeding the table number Barcode generator - Barcode is displayed Print Receipt button Button is clicked Receipt is printed Close Form button Button is clicked Form is closed 62 Amend button Valid number is inputted in number ordered textbox. E.g. 3 Item has been successfully updated Amend button Invalid number is inputted in number ordered textbox. E.g. three Item can not be updated Return button Button is clicked Individual Order Form loads 63 Iterative Development and testing Login Before 64 After 65 Code to Before Originally, as I built the code to create a new user and password, rather than receiving a message box which should state the hashed value of the Username created followed by the statement ‘New User Created’, I constantly kept receiving the message that it has already been taken. I knew immediately that the problem lied in my If statement as this is the only area which would return any of those messages. It was after tweaking various bits of code that I noticed I had set the existing of the file as True when I should have set it to False, a clear logical error. By doing this with my first set of code I was sending the program to displaying the ‘Username has already been taken’ when it should be sent to create the new user. After editing the code I was able to fix the problem which also worked when I entered the now existing user. 66 Code to After 67 Testing 68 In order to test my delete function, I first sent the program to the specific file that I wanted to delete which contained the hashed value of the username and password. This worked when tested and the correct file was deleted. Error 69 When extending the function to find the account’s file in the correct folder, I constantly kept getting a message that the account could not be found, despite the fact that I was creating the account and it was showing it was there. I could not figure out the reason as to why it was not working, therefore I searched some ways to delete the account in an alternate method. It was through this, I later realised that I had made a logical error and I was not sending the program in the correct place that the account was in nor was I using the correct inbuilt functions of Visual Basic to delete the account. After 70 The Admin of the Oasis restaurant was happy with the final login and its features: Create account, Enter account and Delete account. Stock Graphs Before When originally creating the code for the graphs, I realised that I cannot create a graph before categorising the items in the stock into Appetisers, Mains, Desserts etc.. This was due to the fact that there are too many items to represent in the graph with 60 items. Therefore, as a form of Abstraction and to still ensure the graph caters for the End Users’ needs I counted how many items are in the least stock for each type of item. After 71 72 Before I made a clear syntax error here as I had forgotten the Number of Vegetarian items was declared as a String and not an integer/single, therefore it could not be counted as I had done with the other three graphs. I first had to check if the item was vegetarian and then count it as such. 73 My End User was happy with the graphs that I created and was particularly pleased with colours that I used to represent each bar which corresponded with the colours for the type of item in the menu. Stock Record - increase/decrease prices Before 74 When first trying to automatically increase/decrease the prices in accordance to how much was in stock of that item, I created the code so that the system would go through the algorithm as the form loads. However, this clearly did not work and it was by chance that instead, I moved the code so that the algorithm would run when the ‘Read’ button was clicked. This worked and I realised it was due to the fact that as the form loads there is nothing being read for the algorithm to work on - it is as if the records do not exist. After The End User required that the prices increased/decreased according to the stock and was pleased that the program could think for itself and change the prices without the Admin clicking and buttons. 75 Items Ordered in an order Before When I used the list box to choose which method I wanted to order my items, nothing was appearing. Therefore, I needed to use the process of elimination at which place the code had gone wrong. I first started at the code for the actual order of the items. I removed the usage of the list box and just checked to see if the code for the ordering worked. 76 When I was not using the list box the actual ordering was working, therefore I knew immediately that the problem lay in my usage of the list box. It was after this realisation that I then checked 77 the index which was being selected when the method was being chosen. If the first item was a different index then I was calling then no information would appear. As shown above the image on the left shows the index of the first item using the original list box which contains Chronological… The message box is displaying -1, therefore no information was being displayed as I was calling on index 0. However, the image on the right show a new list box and the first index was 0. It is not clear as to why the original list box did not work and was displaying negative indexes, yet I was able to reach the root of the problem. Due to the uncertainty of using list boxes and how unreliable they were in this scenario, I decided to use a Combobox instead for ease. After 78 One of the success criterai was that the Admin will be able to quickly order the stock depending on different variables. After showing this function the End User was pleased with what I had made. Binary Search No problem occurred with this search and the End User was happy with the information displayed and how it was searched 79 Stock Record Before When creating the stock recording and reading it from file, the Expiry Date was the only variable that was not being displayed. It was due to this I created a message box to figure out where the 80 problem was. This message box, as shown above, would show the information about each field, so that I could see if Expiry Date existed. After the testing was completed, it became clear through the above images that the Date was not being read at all, and was skipping it to move onto the next item. It was through this realisation that I looked through my writing and reading variables procedure. It was here that I noticed I had not written in Expiry Date. After 81 The End User was happy with the display of the stock records and the fields used to describe an item. API Before 82 When using the API to find out the weather, I found the current temperature not appearing, despite seeing on the message box the temperature. I also kept receiving the message that it could not determine if it was cold eventhough the temperature was clearly seen in the messagebox as below 10. It was due to this I created a textbox on the lower right-hand side of the interface to display the information from the API. After recounting the number of spaces until temp_min and also noticing in the message box a comma followed the integer, I remembered the system could only accept integers, therefore I changed the limit of spaces to count until so the integer can only be read. I changed the ‘Positionoftempmin + 11’ to ‘Positionoftempmin + 10’. After 83 The End User was pleased with the final display of the temperature, humidity and wind speed. They were particularly surprised and happy with the messages that appeared depending on the weather. 84 Amend Record Before I found out that the problem lay in the position. When this was run it was creating a duplicate file in either position 1 or 10 because the pointer was not being updated to the position at which I wanted to amend. I changed the position so that updaterecordpointer became a function that would find the position of the item I was looking for and change the pointer accordingly. After 85 The End User was happy with the records and how they are automatically amended when an order has been changed and the different functions that can be applied to the form. Timer Before 86 87 After The End User was pleased with the changes made with the timers where the value at which the colours change depend on the weather. 88 How many items sold in a day Graph Before 89 As I was creating the graph to show how many items was sold in a day, I found that sometimes the difference in the graph was showing as a negative number. It was when I used message boxes as testing purposes that I found the reason was due to the fact that when I started the program after the 0 second mark it was only doing the PM count and thus it would take the AM mark as 0. This would cause the difference to be negative. It eas because of this I used Boolean statements and If statements so that the PM count and difference would only occur when the AM count was done. After 90 The End User was happy with the way the graph was displayed and when it was displayed, though asked me to remove the message boxes which displayed the stock in the morning and night. Displaying on Receipt Before When clicking the button to add an item to the receipt this error was occurring. The purpose of this function was to find the name of the product in the stock records and display it on the receipt and order record accordingly. It was through the help of the error message that I realised it was due to the fact that I had declared TempName as a Decimal when it should have been a String. After Before 91 When adding an item to order, the information displayed on the receipt was not providing me with the item name. I immediately knew it has something to do with the output and what was being declared in the indexes. By changing the way the Product name was being sent through the form, i.e. It was being found in the Stock Record, I realised I needed to call the function to find the stock record name and declare that as another index. After 92 The End User was pleased with the displayal of the ordered items on the receipt and the menu which was used to order the items. They were overall happy with the end product of this form. Displaying Price on Receipt Before 93 As I was trying to find the price from the Stock Records and read it to the receipt, I received this error message. Intuitively, I knew that it had to do with the way I had passed through the ItemID. This could also be realised through the error message I received. I figured out that I was passing TempItemID as an Integer when it was declared as a String. After . Before 94 For testing purposes I added a message box to show the price of the item before it is added to the list to make sure it’s reading the right price, however for mozzarella sticks the price was showing 8.57 even though it’s 12. I checked the Product IDs of each item and realised that I had accidentally created two items with the same ID. Therefore, the system was reading the other item’s price. After 95 The owners of the restaurant was happy with the find price function and how it was displayed on the receipt. Alcohol is Disabled The End User asked that this function was to be made in order to ensure the restaurant remains a safe environment was happy with the above product. Stock Reduction Original 96 Extension - Before When I was trying to create the ability to send a message to the server if there is not enough of an item that has been ordered, instead of receiving the item name alongside the message, I received SimpleBinaryFile. I knew that the problem lay in the output, therefore when looking at the message I realised that I could not display the item name as ProductName as it varies. Therefore, I knew I had to change it so that when the count was on that item the name would display as such. Extension - After 97 This is an important feature for any EPOS system due to the embarrassment that may fall if a customer orders and item and they do not tell said customer that there is not enough of the ordered item. Therefore, the owners and servers were happy to be told when there is not enough of the item in stock. Barcode and Printing 98 The company required that i create a barcode so that each receipt is uniquely identified with a set of unique number. They also asked that they have the ability to print out the receipt. It is due to this the owners were happy with what I had produced for the final system. Amending Items 99 The servers were happy with this as they did not need to return to the add order and delete an item from there then reorder the item, but instead they simply just needed to change the details of the item in the View Order form making it less time consuming and more efficient. 100 Evidence of Prototypes Version 1 Version 2 As the first version was shown the End Users hated the dull colour scheme and did not think each button was understandable as to where it would lead the user, when the button is clicked. After editing the colours and the buttons’ names the End User was very happy with the appearance and they believed the buttons could be understood better. Version 1 101 Version 2 In Version 1 the End User liked the colour scheme and all of the function, however they requested that I create a Delete Account button so that they can delete any account easily. The End User was happy with the functions of Version 2 and were pleased with the end results. Version 1 102 Version 2 Final Version 103 When I first showcased version 1 the End User was not happy with the colour scheme or the layout of the interface. They wanted reds and oranges with the logo in the background and felt the interface was too busy. They also wanted to add more fields to describe the products in Stock. When version 2 was shown the owners were happy with the colour scheme and asked that it was sticked to for the other forms. They were also pleased with the fields of the items and the format at which the information can be seen. However, in this version they users would have to click the button to move to other forms which would show the graphs and searches. They did not want to do this as they believed that it would cause too much confusion if there were too many forms that can be accessed and asked that the information could all be found on one graph. With the final version, the users were very happy with both the format and usability of the interface. They were happy with using tabs to navigate the graphs and were overall happy with the functions. Version 1 Ve rsion 2 104 Final Version Version 1, similar to the Stock Records, lacked the colour scheme which the End User requested. They also asked that the tables were set out in the way the the restaurant has laid them out. They mentioned that viewing the actual weather was not that important, therefore asked that its display could be made smaller. In Version 2, they were happy with the colours and display, yet they asked to get rid of the grey colour found with the displaying of the weather. They also wanted to show where the kitchen could be found and use that as a method to navigate the user to message the chefs if need be. They also asked for the Graph to be shown in this form where the number of items sold in the day can be seen. Version 3 catered for all of these requests which the End User was very happy about. However, after mentioning the button for the Kitchen did not work due to timing problems they asked that this is made as a future development for later on. Version 1 105 Final Version Though they liked the different colours used in Version 1 they were skeptical with it fitting with the rest of the program and the lack of consistency it would have. It was due to this they requested that I change the colours and layout of the page so that it would look more structured and professional. In the Final version they were happy with all the changes I made and made no further requests to change anything. Version 1 106 Version 2 Final Version 107 In the first version the End User was not happy with the colour scheme of the from nor were they happy with the layout. They believed that everything looked too packed together and also said that with the amount of items on the menu it would not be feasible to have every item on the same form. In version 2 I showed them the ability to click the button and it would direct the user to another form which would show the items that can be ordered. They were not upset with this idea and explained that if I thought that would be the best way to structure then so be it. Yet, they did not like my use of black believing it to be too dull for the design and clashing too much with the logo. The End Users were immensely pleased with the Final version and praised me on my use of colours when differentiating between the type of items. They were also very happy with the tabs as it would be easier to navigate and less confusing as it would cause less forms in the system. Version 1 Final Version 108 When shown the first version, again the End Users were not happy with the colour scheme and asked that all the writing could be made larger so it could be read more clearly. Besides this they were happy with the functions of the form and asked for no further improvement. In the Final version they liked the colours and stated that they could read the buttons better at an arm's length distance. Version 1 109 Final Version When discussing Version1 the owners only asked that the colours were changed to fit with the scheme of the company, however they were pleased with everything else. This was achieved in the Final version which the End Users were happy with. 110 Login 111 112 Stock Records 113 114 115 Server Menu 116 117 118 119 120 Add Order 121 122 Individual Order Display 123 124 125 126 Data Dictionary Field Name Data Type Data Format Field Size Description Example ItemID String XXXX 4 The ID used to reference to a specific item P001 Item String The name of the item Hummus and Pitta Type of Item String What category does the item fall under Appetiser Number In Stock Integer How many of that item is in stock 6 Retail Price Single How much is it being sold for 8.57 Purchase Price Single How much did it cost 6.5 Vegetarian String Is it vegetarian Yes Expiry Date Date XX/XX/XX 8 The date which the item expires 26/3/19 Field Name Data Type Data Format Field Size Description Example ItemID Integer The random number generated with an order to show which items have been ordered together 1 Table Number String XX 2 The table that has ordered that item T1 ProductID String XXXX 4 The corresponding ItemID P002 Number Ordered Integer How many of that item has been ordered 1 Sub Total Decimal How much was the overall order cost 34 Date/Time Date Date and time it was 01/01/2019 XX/XX/XXXX 18 127 XX:XX:XX AM/PM String ordered 18:38:00 What time of the day was it EVE Global Variables Variable Type Content DisplayOrder StringBuilder Displays the order which has been made by a table TableName String The name of the table being accessed PresentOrder Boolean Checks if there is a live order TableOrders(20,3) String Holds the data for a given table Table1TimerValue Integer Holds the minutes gone since table 1’s timer has started Table2TimerValue Integer Holds the minutes gone since table 2’s timer has started Table3TimerValue Integer Holds the minutes gone since table 3’s timer has started Table4TimerValue Integer Holds the minutes gone since table 4’s timer has started Table5TimerValue Integer Holds the minutes gone since table 5’s timer has started Table6TimerValue Integer Holds the minutes gone since table 6’s timer has started Table7TimerValue Integer Holds the minutes gone since table 7’s timer has started Table8TimerValue Integer Holds the minutes gone since table 8’s timer has started updaterecordpointer Integer The position of the record being updated RegularStay Integer When temperature is above 10, amount of time timer stays green LongStay Integer When temperature is above 10, amount of time 128 timer stays blue VeryLongStay Integer When temperature is above 10, amount of time customers stay before timer turns red ColdRegularStay Integer When temperature is below 10, amount of time timer stays green ColdLongStay Integer When temperature is below 10, amount of time timer stays blue ColdVeryLongStay Integer When temperature is below 10, amount of time customers stay before timer turns red FinalOrderTotalForTable Decimal The final cost of an order including VAT NewTableOrder(20,3) String Array which holds the orders made by a table TempOrderForTable(20,3) String Copies values of order for table in to array that can be accessed publicly. ItemIDtoDelete Integer The item which is being updated so that all the information is copied onto the form Local Variables Variable Type Location Content Path String Login.vb Stores the location where the hashed account details will be stored M5 System.Security. Cryptography.MD 5CryptoServicePr ovider Login.vb Computes the MD5 hash value using the inbuilt function ByteString() Byte Login.vb Holds the hashed value of the account in a byte FinalString String Login.vb Holds the converted hashed value into string Account String Login.vb The hashed value of the account Product ProductRec StockRecord.v b Holds the product record 129 Stock() ProductRec StockRecord.v Holds the product record b ServerMenu.vb AddOrder.vb IndividualOrder Display.vb NoRecords Integer StockRecord.v The amount of records found b ServerMenu.vb IndividualOrder Display.vb P Integer StockRecord.v The position the record is to be b displayed ServerMenu.vb Ans Integer StockRecord.v The message which is displayed when b deleting or making a new record ServerMenu.vb TableChoice.v b FS System.IO.FileStr eam StockRecord.v Shows the place the record will be saved b ServerMenu.vb BW System.IO.Binary Writer StockRecord.v Writes the records down in binary in the b file ServerMenu.vb AppetisersNIS Integer StockRecord.v b Holds the number of appetisers in stock MainsNIS Integer StockRecord.v b Holds the number of mains in stock DessertsNIS Integer StockRecord.v b Holds the number of desserts in stock DrinksNIS Integer StockRecord.v b Holds the number of drinks in stock ExtrasNIS Integer StockRecord.v b Holds the number of extras in stock AppetisersV Integer StockRecord.v b Holds the number of appetisers which are vegetarian 130 MainsV Integer StockRecord.v b Holds the number of mains which are vegetarian DessertsV Integer StockRecord.v b Holds the number of desserts which are vegetarian DrinksV Integer StockRecord.v b Holds the number of drinks which are vegetarian ExtrasV Integer StockRecord.v b Holds the number of extras which are vegetarian AppetisersRP Single StockRecord.v b Holds the total of the appetisers retail price MainsRP Single StockRecord.v b Holds the total of the mains retail price DessertsRP Single StockRecord.v b Holds the total of the desserts retail price DrinksRP Single StockRecord.v b Holds the total of the drinks retail price ExtrasRP Single StockRecord.v b Holds the total of the extras retail price AppetisersPP Single StockRecord.v b Holds the total of the appetisers purchase price MainsPP Single StockRecord.v b Holds the total of the mains purchase price DessertsPP Single StockRecord.v b Holds the total of the desserts purchase price DrinksPP Single StockRecord.v b Holds the total of the drinks purchase price ExtrasPP Single StockRecord.v b Holds the total of the extras purchase price AppetisersDiffe Single rence StockRecord.v b Holds the total difference of the appetisers purchase and retail price. i.e.income MainsDifferenc e StockRecord.v b Holds the total difference of the mains purchase and retail price. i.e.income Single 131 DessertsDiffere Single nce StockRecord.v b Holds the total difference of the desserts purchase and retail price. i.e.income DrinksDifferenc Single e StockRecord.v b Holds the total difference of the drinks purchase and retail price. i.e.income ExtrasDifferenc Single e StockRecord.v b Holds the total difference of the extras purchase and retail price. i.e.income Temp ProductRec StockRecord.v b Holds a record whilst a swap is being made SwapMade Boolean StockRecord.v b Checks to see if a swap has been made SearchLength Integer StockRecord.v b The length of the record being ordered Pointer Integer StockRecord.v b The position where the item has been found in the search Midpoint Integer StockRecord.v b The middle index of the record being searched NoofStockRec ords Integer ServerMenu.vb Number of records present in stock AddOrder.vb NewOrder Sale ServerMenu.vb Used to create the initial date for the orders Orders() Sale ServerMenu.vb Stores the content of the text file for the orders DataBacknew String ServerMenu.vb Holds the data returned from the API request mintemptodayI NT Integer ServerMenu.vb Holds min temp every 30 min humidityINT Integer ServerMenu.vb Holds the humidity every 30 min windspeedINT Decimal ServerMenu.vb Holds the wind speed every 30 min GoURL String ServerMenu.vb Holds the URL address of the API request request HttpWebRequest ServerMenu.vb Requests for a HTTP response to the weather 132 response HttpWebRespons e ServerMenu.vb Holds the response of the HTTP request responseStrea m System.IO.Strea m ServerMenu.vb Provides a generic of the response streamreader System.IO.Strea mReader ServerMenu.vb Reads the response from the responseStream Databack String ServerMenu.vb Holds the entire response in a readable format Positionoftemp min Integer ServerMenu.vb Will locate the word "tempmin" Positionofhumi dity Integer ServerMenu.vb Will locate the word "humidity" Positionofwind Integer ServerMenu.vb Will locate the word "wind" texttocheck String ServerMenu.vb The text which is being searched for the weather mintemptoday String ServerMenu.vb Holds the number of the minimum temperature humidity String ServerMenu.vb Holds the number of the humidity windspeed String ServerMenu.vb Holds the number of the wind speed RecordPointer Integer ServerMenu.vb The position of the record being amended xtn String ServerMenu.vb Places an X infront of the table which has an order completed IntTableOrders (20,7) String ServerMenu.vb The record which contains the correct table number’s order is copied into this array Tcount Integer ServerMenu.vb The position of the array NumberOfOrde Integer rs ServerMenu.vb Number of orders made by that table ExtraSpaces ServerMenu.vb Fills the missing spaces so that the order can be formatted correctly String 133 MissingSpaces Integer ServerMenu.vb The amount of spaces missed when the information is displayed AppetisersAM Integer ServerMenu.vb Holds the number of appetisers in stock in the morning MainsAM Integer ServerMenu.vb Holds the number of mains in stock in the morning DessertsAM Integer ServerMenu.vb Holds the number of desserts in stock in the morning DrinksAM Integer ServerMenu.vb Holds the number of drinks in stock in the morning ExtrasAM Integer ServerMenu.vb Holds the number of extras in stock in the morning AppetisersPM Integer ServerMenu.vb Holds the number of appetisers in stock at night MainsPM Integer ServerMenu.vb Holds the number of mains in stock at night DessertsPM Integer ServerMenu.vb Holds the number of desserts in stock at night DrinksPM Integer ServerMenu.vb Holds the number of drinks in stock at night ExtrasPM Integer ServerMenu.vb Holds the number of extras in stock at night AppetisersDiffe Integer rence ServerMenu.vb Holds the number of appetisers sold in the day MainsDifferenc e ServerMenu.vb Holds the number of mains sold in the day Integer DessertsDiffere Integer nce ServerMenu.vb Holds the number of desserts sold in the day DrinksDifferenc Integer e ServerMenu.vb Holds the number of drinks sold in the day ExtrasDifferenc Integer e ServerMenu.vb Holds the number of extras sold in the day CountAM ServerMenu.vb Checks if the number of the type of item Boolean 134 in stock has been added in the morning SubTotal Decimal AddOrder.vb The amount of money the order costs IteminOrder Integer AddOrder.vb The position in the array where the order is being added displayout Stringbuilder AddOrder.vb Displays the information about the order TempPrice Decimal AddOrder.vb Holds the founded price of an item from the stock record TempName String AddOrder.vb Holds the founded name of the item from the stock record Quantity Integer AddOrder.vb Holds the amount of an item that has been ordered ItemSubTotal Decimal AddOrder.vb Holds the worked out value of the subtotal of an order rn Random AddOrder.vb Holds a random number generated by the system for the ItemID nrn Integer AddOrder.vb Holds the next random number generated by the system for the ItemID currentdate Date AddOrder.vb Holds the present date and time periodofday String AddOrder.vb Shows the period of day which the order has been made at TempReceipt Integer AddOrder.vb The number on the receipt to refer back to it BarcodeNumb erx Integer IndividualOrder When an order has been completed it is Display.vb the generated barcode OrderForTable( String 20,7) IndividualOrder It will store: ItemID(Random Number), Display.vb Table Number, Product ID, Quantity and subtotal Tablelength Integer IndividualOrder The length of the array Display.vb TableSubtotal Decimal IndividualOrder Stores the subtotal for the table Display.vb HASHposition Integer IndividualOrder Finds the first occurance of the HASH 135 Display.vb tag and records the position. Itemtosetox Integer IndividualOrder The integer value of the ItemID which is Display.vb set to x when the order is complete font1 Font IndividualOrder The font that the receipt document will Display.vb be printed with Generator MessagingToolkit .Barcode.Barcod eEncoder IndividualOrder Holds the generated barcode which the Display.vb system has created randomnumber Random IndividualOrder Random number generated by the Display.vb system newrandomnu mber Integer IndividualOrder Adds 999 to random number and acts Display.vb the barcode number 136 Testing to inform evaluation: Test Plan What will I be testing Input Expected result Actual Result Admin button on home page Click the admin button Login page loads up Login page loads up Login page loads up Server button on home page Click the server button Server menu page load up Server menu page load up Server menu page load up Create new account Enter username for login and password details New account is created New account is created New account is created Delete account for login Enter correct username and password Account is successfully deleted Account is successfully deleted Account is successfully deleted Delete account for login Enter incorrect username or password Account cannot be found Account cannot be found Account cannot be found Enter account for login Enter correct username or password Stock records loads up Stock records loads up Stock records loads up Enter account for login Enter incorrect username or Account cannot be found Account cannot be found 137 password Account cannot be found Home button on login Click the Home button Home page loads up Home page loads up Home page loads up Make button on stock records Click the make button The record has been made successfully The record has been made successfully The record has been made successfully Read button on stock records Click the read button The correct information on the items comes up The correct information on the items comes up The correct information on the items comes up Add button on stock Information is records correctly inputted Record has been added successfully and can be seen Record has been added successfully and can be seen Record has been added successfully and can be seen Add button on stock Information has not records been inputted correctly. E.g. Number in stock = eight Record cannot be added Record cannot be added Record cannot be added Amend button on stock records Information is amended correctly Record has been amended successfully and can be seen Record has been amended successfully and can be seen Record has been amended successfully and can be seen Amend button on stock records Information is amended incorrectly. E.g. Record cannot be amended Program crashes Program crashes 138 Retail price = seven Save button on stock records Information is all correct Record has been saved Record has been saved Record has been saved Save button on stock records Information is incorrect. E.g.Vegetarian = 5 Record cannot be saved Record cannot be saved Record cannot be saved Delete button on stock records Click the delete button Record has successfully been deleted Record has successfully been deleted Record has successfully been deleted New button on stock records Click new button, are you sure you want to create a new record then yes Entire record is deleted Entire record is deleted Entire record is deleted New button on stock records Click new button, are you sure you want to create a new record then no Records should remain the same Records remain the same Records remain the same Next button on stock records Next Button is clicked Next record is shown Next record is shown Next record is shown Previous button on stock records Previous button is clicked Previous record is shown Previous record is shown Previous record is shown Home button on stock records Home button is clicked Home page is shown Home page is shown Home page is shown Method of ordering is shown Method of ordering is shown Order drop down Click on any list on stock records method of ordering 139 Method of ordering is shown Order button on stock records Click on order button Stock is ordered in the method that is chosen Stock is ordered in the method that is chosen Stock is ordered in the method that is chosen Clear button on stock records Click on clear button Display box is cleared completely Display box is cleared completely Display box is cleared completely Search button on stock records Existing itemID is written is search text box Correct information of searched itemID is displayed Correct information of searched itemID is displayed Correct information of searched itemID is displayed Search button on stock records Invalid information is written is search text box. E.g. Chicken sizzler Information cannot be found Program crashes Program crashes Graph listbox on stock records Information which wants to be displayed in the graph is shown. E.g. Number of vegetarian items Correct graph chosen is shown in the listbox Correct graph chosen is shown in the listbox Correct graph chosen is shown in the listbox Graph button on stock records Graph button is clicked Correct graph is displayed with correct information Correct graph is displayed with correct information Correct graph is displayed with correct information Make button on order records Click the make button The record has been made successfully The record has been made successfully The record has been made successfully 140 Read button on order records Click the read button The correct information on the items comes up The correct information on the items comes up The correct information on the items comes up Add button on order Information is records correctly inputted Record has been added successfully and can be seen Record has been added successfully and can be seen Record has been added successfully and can be seen Add button on order Information has not records been inputted correctly. E.g. Number ordered = eight Record cannot be added Program crashes Program crashes Amend button on order records Information is amended correctly Record has been amended successfully and can be seen Record has been amended successfully and can be seen Record has been amended successfully and can be seen Amend button on order records Information is amended incorrectly. E.g. Subtotal = seven Record cannot be amended Program crashes Program crashes Save button on order records Information is all correct Record has been saved Record has been saved Record has been saved Save button on order records Information is incorrect. E.g Date/Time = 5 Record cannot be saved Record cannot be saved Record cannot be saved Delete button on order records Click the delete button Record has successfully been deleted Record has successfully been deleted 141 Record has successfully been deleted New button on order records Click new button, are you sure you want to create a new record then yes Entire record is deleted Entire record is deleted Entire record is deleted New button on order records Click new button, are you sure you want to create a new record then no Records should remain the same Records remain the same Records remain the same Next button on order records Next Button is clicked Next record is shown Next record is shown Next record is shown Previous button on order records Previous button is clicked Previous record is shown Previous record is shown Previous record is shown Home button on order records Home button is clicked Home page is shown Home page is shown Home page is shown Current temperature - Current temperature is displayed Current temperature is displayed with message Current temperature is displayed with message Wind Speed - Wind speed is displayed Wind speed is displayed with message Wind speed is displayed with message Humidity - Humidity is Humidity is 142 displayed displayed with message Humidity is displayed with message Date/Time - Date and time is displayed Date and time is displayed Date and time is displayed Graph of number items sold in a day - Graph with correct information is displayed Graph with correct information is displayed Graph with correct information is displayed Receipt number - Receipt number is displayed Receipt number is displayed Receipt number is displayed Table buttons When any table button is clicked Table choice page loads up Table choice page loads up Table choice page loads up Return to table menu button on Table Choice When the button is clicked Server Menu is displayed Server Menu is displayed Server Menu is displayed Start/Continue Timer button Button is clicked Timer starts in server menu to right table with green colour. After 30 secs it turns blue, after 45 secs it turns red. When temp<10, after 60 secs turns blue after 90 secs turns red. Timer starts in server menu to right table with green colour. After 30 secs it turns blue, after 45 secs it turns red. When temp<10, after 60 secs turns blue after 90 secs turns red. Timer starts in server menu to right table with green 143 colour. After 30 secs it turns blue, after 45 secs it turns red. When temp<10, after 60 secs turns blue after 90 secs turns red. Reset timer button Button is clicked Timer is reset to 0 Timer is reset to 0 Timer is reset to 0 Stop timer button Stop button is clicked Timer stops at that time Timer stops at that time Timer stops at that time Add order button Add order button is clicked Add order form loads up. If there is a live order user is asked if they would like to continue Add order form loads up. If there is a live order user is asked if they would like to continue Add order form loads up. If there is a live order user is asked if they would like to continue View Order button View Order button is clicked Individual Order Display form loads up. If there is not enough of any item ordered in stock message is displayed that there is not enough of said item. Individual Order Display form loads up. If there is not enough of any item ordered in stock message is displayed that there is not enough of said item. Individual Order Display form loads up. If there is not enough of any item ordered in stock message is displayed that there is not enough of 144 said item. Date/Time - Date and Time is displayed Date and Time is displayed Date and Time is displayed Any menu item button item When any button is clicked User is asked how many they would like of the item and it is added to receipt User is asked how many they would like of the item and it is added to receipt User is asked how many they would like of the item and it is added to receipt Any menu item button item When any button is clicked and user inputs invalid data User is asked how many they would like of the item and it is added to receipt Program crashes Program crashes SubTotal and VAT total - SubTotal and VAT total is displayed SubTotal and VAT total is displayed SubTotal and VAT total is displayed Save Table Orders button When the button is clicked Order is saved in records Order is saved in records Order is saved in records Receipt on Individual Order Display - Receipt with correct order items is displayed Receipt with correct order items is displayed Receipt with correct order items is displayed Edit Receipt Listbox Click on any item Item is highlighted Item is highlighted Item is highlighted Order SubTotal Displays final sub total of order Displays final sub total of order Displays final sub - 145 total of order Delete Item button Button is clicked Highlighted item on Edit receipt is deleted Highlighted item on Edit receipt is deleted Highlighted item on Edit receipt is deleted Update Item button Button is clicked Update Item form loads with information about highlighted item Update Item form loads with information about highlighted item Update Item form loads with information about highlighted item Order Complete button Button is clicked Stock records with those orders will have X proceeding the table number Stock records with those orders will have X proceeding the table number Stock records with those orders will have X proceeding the table number Barcode is displayed Barcode is displayed Barcode is displayed Print Receipt button Button is clicked Receipt is printed Receipt is printed Receipt is printed Close Form button Button is clicked Form is closed Form is closed Form is closed Amend button Valid number is inputted in number ordered textbox. E.g. 3 Item has been successfully updated Item has been successfully updated Item has been successfully updated Amend button Invalid number is inputted in number Item can not be updated Item can not be updated Barcode generator - 146 ordered textbox. E.g. three Return button Button is clicked Item can not be updated Individual Order Form loads Individual Order Form loads Individual Order Form loads I tested the features of the program which was requested by the End User before sending he solution over as shown below: Login details successfully hash and a new user is created to log in The new user can now log in with their details 147 The user can delete their account if they want to Once the account is deleted the system can no longer find the file and as shown through the message box we can see it is looking in the right file. The system correctly reads the file and as shown in the code where the retail price is 8.57, however because the stock is below 10 the retail price is multiplied by 20%. When adding a new item if the boxes are inputted with the correct type of values then it successfully adds the new record. If a box is not inputted correctly then the program will not crash and will display an error message as expected. 148 If the boxes are changed with correct values then a record can be amended and saved successfully, however, if a box is amended with invalid data then the program crashes. In order to fix this I will need to catch if there is any invalid data used to amend the records and again test if it works. as expected. Records can be successfully deleted 149 All three graphs successfully display the correct information in the format required. 150 All the items can be ordered depending on the variable correctly. When searching for an item that is part of the records all the information is displayed correctly, however when searching for an item that is not in the records such as P061 the program crashes. This means that -1 is not being returned if it cannot find it and the problem lies in this. I believe the problem lies in the output of the data as the program is still expecting for something to be 151 displayed. After fixing this I will have to put invalid data in the search box and check if the problem has been fixed. The API works perfectly and shows messages depending on the weather. It also displays the information in a readable format for the servers to view 152 The records for the orders displays the correct information when the record is read. An order can be added successfully if valid data is inputted. When invalid data is inputted the program crashes, therefore I would need to catch if any invalid information is inputted and display an error message accordingly. I would need to test this to check if it works by reinputting invalid data. 153 The timers worked perfectly stopping when the button was clicked and resetting. Due to the temperature the time for the tables to change colour increased which is another function which has worked well. 154 When inputting valid data the functions worked well, however when invalid data was added the program crashed, therefore I would need to catch this invalid data and retest these functions again. The ability to add orders which are then automatically added to the record works perfectly. The function to check if there is enough of the item being ordered in stock works perfectly well. 155 The ability to amend how many items are being ordered in the View Order section works well and when the order has been amended the records in the Order stock also automatically changes as expected. 156 The generating of a barcode and being able to print out the receipt when the order is complete provides the desired results. When the correctly proceeds the table number as shown. order has been completed the X My End User also provided feedback on the program as shown through the red comments in the test table, which they requested that the points where the program crashed was fixed immediately. They also provided an email as shown: 157 158 Evaluation of solution: (15 marks) Judging success criteria: The success criteria which I met: ● I created an Admin page which stores stock data so that the end user can easily look through the stock information and amend/add/delete any stock of their choice. As shown below. ● A login page was needed, which I delivered. This ensured that the information and function were all protected so that nobody can detrimentally affect the business. As shown in pages 147-148. ● The ability to Search and Order items. This made it easier for the owners of the business to simply input the ItemID in the text box and all the information of said ItemID would be displayed. The Admin could also order the stock in various ways, such as chronologically by ItemID or Item name, the items in most stock, the items which have a higher purchase price, the items with a higher retail price or the items with a larger expiry date. As shown in pages 151-152 ● Graph analysis was also provided. This showed the owners the type of items which had the higher stock. Another graph showed the type of items which provided the most income. The last graph showed the type of items items which had the most vegetarian choice. As shown below ● Timers were used to measure the length of time a customer had sat at the table. It also showed an easy way to check when the customers should be moved along by way of colours. When the timer was green the customer could sit there without any hassle, when it turned blue the customers should be rushed slightly and when it turned red the customers had stayed for too long. As shown in page 154 ● A function which checks the weather regularly. This was shown on display in the server menu and then analysed so that the system would automatically change the duration of time the customers could sit at a table. If the temperature was below 10 then the customers could sit for longer as the company would not have much business on that day. As shown in page 152 ● A record of the products sold was shown on the Server Menu. The End User has the ability to view all of the orders made which are live and which have been completed made distinctly different by having an x proceed the tables which had a completed order. The owners could amend/delete/create a new record wherever felt necessary. As shown below 159 ● Graph for the amount of items sold in a day was displayed on the Server Menu. It checked the amount of stock when the business opened and then again when it closed. It then worked out the difference was was displayed on graph. It is automatically done by the solution so no mutton needs to be pressed in order for the graph to display and analyse. As shown in pages 90-92 ● A form to order items was a necessary component which I delivered. Servers simply clicked the item’s button which was ordered and input the amount which was ordered. This was then added to a growing receipt and a total is calculated and saved. As shown below ● A form to view items ordered according to each table and calculate the subtotal. This form also provided the ability to update any items last minute or delete any if there had been discrepancies or if the customers had been upset with the food an item could be taken off and given for free. As shown below ● A function to print out receipts. This included the barcode generated for that order and all the information of said order in case there were any problems in the future. As shown in page 157 ● A barcode generator. This was created and can be used as a unique identifier for each transaction and can be scanned so that the receipt would appear with all the information about the order. As shown in page 157 ● I used validation message boxes around my program such as when the server menu loads a message box will pop up with the temperature, humidity and wind speed, while also displaying a comment: ‘It is going to be a cold day.’ This also occurs in several other places such as when a person logs in they are welcomed with their username or when a record is amended a messagebox appears with ‘The record has been amended’. As shown below I have also remained closely attached to the GUI features I designed as shown from page 45: 160 161 There were two points of my success criteria which I did not meet: ● Increase/decrease prices in accordance to the temperature, humidity and wind speed. ● Create a button that will make it possible for any waiters/waitresses to contact the chefs directly from the EPOS system, instead of having to go to the kitchens themselves. Potential Maintenance issues: If the End User wants to create any extra fields in the records then they would need to add these features in multiple places and edit the interface to add extra space to accommodate for this. However, since the fields are packed together it is quite simple to add the fields if you go through the code in a systematic order. When using the API to get the weather the End User will need to be careful if the address expires, in which case another will need to be requested. 162 The items sold by the End User is hardcoded so that when an order is added the price and name of the item is found by going through the stock records. This will make it difficult to add new items to the menu in which case it will need to be hard coded into the program. Any additional tables that are added to the restaurant will also require to have certain codes amended so as to add that table. It will also require an extra timer and a change in interface structure. Solution limitations My solution does not analyse a lot of data in the form of graphs, which can be changed in the future. If extra fields are created for the items, such as calories, gluten free, halal, order date etc, these fields can be analysed and provide the owners with more information about their products. My system does not take any online bookings or booking from the phone. This will require the system to connect to the website of the restaurant and also have a phone feature. It will also need to provide the opportunity for the servers to disable certain tables at a certain time if it has been reserved and then enable it when clicked. This can be made possible in the future. I have not created the function to keep a record of customer bookings and allow customers to register with the company or a record that holds the staff information. This will require records to be created and to create more forms both of which can also be accessed by the Admin. Improvements: As stated above there are several points in my success criteria which I did not meet. These were not met due to time restraints and are the next immediate thing which will be needed in order to reach optimal customer satisfaction. ● The price of the items should increase or decrease depending on the temperature ● Kitchen staff should be able to contact the servers and vice versa, in order to communicate with any questions made by customers ● I can also improve my system so that I no longer have the limitations mentioned above. My system could extent itself to analyse more data so as to improve business for the owners and see where improvements are necessary. ● By creating a record of customers the business would create loyal customers and they can form some sort of loyal reward scheme using this. ● I can also extend the business to take electric payment via card or apple pay. This is done by many businesses and is vital in this day and age such as Ice Burg. ● My system could automatically order items which are low in stock, via EDI, which is something that a company called eposnow do. They specifically ‘ Streamline and simplify 163 your stock ordering process by automatically raising purchase orders, and easily control and manage inter-location stock transfers.’ ● I can also create the ability to have staff members clock in and out of work and automatically generate staff hours and pay. If I create staff records then owners can see the most performing and underperforming members where they can then handle any gaps in training and knowledge. This is something done in numerous places using EPOS systems such as Asda. 164
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )