Anda di halaman 1dari 6

Programming Concepts Roots Billing System

ACKNOWLEDGEMENT First and foremost we would like to thank Ms. Thilani who supported us immensely with the completion of this assignment. And we would also like to thank our fel low students for helping us when ever needed. Last but not least we would also like to thank our family members and our fellow mates who encouraged us to finish this assignment successfully. THANK YOU. By: Jude Perera University of Moratuwa

Contents ACKNOWLEDGEMENT 2 EXECUTIVE SUMMARY Introduction 6 What is programming?

5 7

History of C++ Language 8 Significant Language Features 8 Areas of Application 9 TASK 1 10 Introduction to Flow Chart 10 Flowchart 1 Main 13 Flowchart 2 Log In 16 Flowchart 3 Main Menu 17 Flowchart 4 Display Menu 18 Flowchart 5 Placing Order 19 Flowchart 6 Exit 21 Flowchart 7 - Print Check 22 Flowchart 8 Lock 23 TASK 2 24 What is pseudocode? 24 Why is pseudocode necessary? 24 PSEUDOCODE 1 MAIN 25 PSEUDOCODE 2 LOGIN 25 PSEUDOCODE 3 MAIN MENU 26 PSEUDOCODE 4 DISPLAY MENU 27 PSEUDOCODE 4 DISPLAY MENU (CONTINUED) 28 PSEUDOCODE 5 - EXIT 28 PSEUDOCODE 6 LOCK 29 PSEUDOCODE 7 PLACING ORDER 30 PSEUDOCODE 8 PRINT CHECK 33 TASK 3 34 Outline of the Program 34 Coding of the developed system 36 TASK 4 42 Definition of Data Type 42 Simple Data Types 42 Fundamental data types 43 Variables 44 Identifier 44 TASK 5 46 Scope of Variables 46 Lifetime of Variables 46 Static Local Variables 47 Static Global Variables 47 Summary of Scope and Lifetime Rules in C++ Side Effect of Global Variables 49 TASK 6 50 Modularization 50 Advantages of Modularization 50 Main function 51 Log In function 52 Main Menu function 52 Display Menu function 53 Exit function 54 Placing Order function 55 Print Check function 57 Lock function 57 Parameters and Parameter Passing Techniques Value Parameter Passing 59 Reference Parameter Passing 60 TASK 7 61 INTERNAL DOCUMENTATION 61 Why to use comments? 61 Types of comments 62 TASK 8 63

47

58

User Manual 63 TASK 9 68 Syntax and Semantic Errors 68 The most common kinds of programming errors can be broadly classified as follows 68 Listed below are some common programming errors 68 Debugging Tools 70 Common Syntax Errors 72 Examples of Syntax Errors 72 SYNTAX WARNINGS 76 SEMANTIC ERRORS 78 EXAMPLES OF SEMANTIC ERRORS 78 TASK 10 81 TEST PLAN 81 TEST CASE 83 TASK 11 87 Software testing methods 87 Software Testing Levels 87 White Box Testing 88 Black Box Testing 88 The advantages of this type of testing include: 88 The disadvantages of this type of testing include: 88 Gray Box Testing 89 CONCLUSION 90 FUTURE RECCOMENDATION (strengths, weaknesses and enhancements) 91 REFERENCES 92 Gantt chart 93 EXECUTIVE SUMMARY To create this system, few steps have been followed as required and mentioned be low; Designing flow charts Writing the pseudocodes Creating the program using C++ Debugging Designing a test plan Testing the software using software testing levels and methodologies. A computerized / automated system is created specifically to display the menu an d print the bill. This process will become much efficient and accurate because i ts changing from a manual system to a computerized system. For security purposes, only the administrative staff can login to the system so faulty and fake bills won t be printed.

Introduction Roots is a local fast growing fruit juice outlet which offers variety of different fresh juices. Currently they are maintaining the orders and the printing of the bills using a manual calculating system using a cash book.

They want to automate the billing system and to get printed receipt to serve the re valuable customers more faster, there main objective is to provide faster and reliable services by providing correct information to customers, to make it fas ter so the customer do not have to wait till the calculation is done and the rec eipt given. From the developed system it makes it easy for the staff of Roots and also for t he customers as it is very fast and accurate and also secured, the developed sys tem is a user friendly system where even a beginner can simply use the system as even instructions are given in the system, the different kind of juices are all on the screen with a simple unique code for it, price and also the dividend of tax is also calculated once the juices are selected.

What is programming? Programming is instructing a computer to do something for you with the help of a programming language. The role of a programming language can be described in tw o ways: Technical: It is a means for instructing a Computer to perform Tasks Conceptual: It is a framework within which we organize our ideas about things an d processes. What is a programming language? A vocabulary and set of grammatical rules for instructing acomputerto perform spec ific tasks. The termprogramming languageusually refers to high-level languages, su ch asBASIC,C,C++,COBOL,FORTRAN,Ada, and Pascal. Eachlanguagehas a unique set ofkeywords(words that it understands) and a specialsynta xfor organizingprograminstructions. High-level programming languages, while simple compared to human languages, are more complex than the languages the computer actually understands, calledmachine languages. Each different type ofCPUhas its own unique machine language. Lying between machine languages and high-level languages are languages calledasse mbly languages. Assembly languages are similar to machine languages, but they ar e much easier to program in because they allow a programmerto substitutenamesfor nu mbers. Machine languages consist of numbers only. Lying above high-level languages are languages calledfourth-generation languages(u sually abbreviated4GL). 4GLs are far removed from machine languages and represent the class of computer languages closest to human languages. Regardless of what language you use, you eventually need toconvertyour program int o machine language so that the computer can understand it. There are two ways to do this: compilethe program interpretthe program The question of which language is best is one that consumes a lot of time and en ergy among computer professionals. Every language has its strengths and weakness es. For example, FORTRAN is a particularly good language for processing numerica ldata, but it does not lend itself very well to organizing large programs. Pascal

is very good for writing well-structured and readable programs, but it is not a s flexible as the C programming language. C++ embodies powerfulobject-orientedfeat ures, but it is complex and difficult to learn. The choice of which language to use depends on the type of computer the program is torunon, what sort of program it is, and the expertise of the programmer. History of C++ Language The C++ programming languages is an extension of C that was developed by Bjarne Stroustrup in the early 1980s at Bell Laboratories. C++ provides a number of fea tures that "spruce up" the C language, but more importantly, it provides capabil ities for object-oriented programming. Significant Language Features Object-oriented programs are easier to understand, correct and modify. Many othe r object-oriented languages have been developed, including most notably, Smallta lk. The best features of C++ are: C++ is a hybrid language-it is possible to program in either a C-like style, an object-oriented style, or both. C++ programs consist of pieces called classes and functions. You can program eac h piece you may need to form a C++ program. The advantage of creating your own f unctions and classes is that you will know exactly how they work. You will be ab le to examine the C++ code.

Areas of Application C++ provides a collection of predefined classes, along with the capability of us er-defined classes. The classes of C++ are data types, which can be instantiated any number of times. Class definitions specify data objects (called data member s) and functions (called member function). Classes can name one or more parent c lasses, providing inheritance and multiple inheritance, respectively. Classes in herit the data members and member functions of the parent class that are specifi ed to be inheritable. Therefore it is mainly used for: Software Engineering Graphics

TASK 1 Introduction to Flow Chart A flow chart is a graphical or symbolic representation of a process. Each step i n the process is represented by a different symbol and contains a short descript ion of the process step. The flow chart symbols are linked together with arrows

showing the process flow direction.

Symbol Symbol Name Symbol Description Process Show a Process or action step. This is the most common symbol in both process flowcharts and business process maps. Predefined Process (Subroutine) A Predefined Process symbol is a marker for another process step or series of process flow steps that are formally defined elsewhere. This shape commonly depicts sub-processes (or subroutines in programming flowcharts). If t he sub-process is considered "known" but not actually defined in a process proce dure, work instruction, or some other process flowchart or documentation, then i t is best not to use this symbol since it implies a formally defined process. Alternate Process As the shape name suggests, this flowchart symbo l is used when the process flow step is an alternate to the normal process step. Flow lines into an alternate process flow step are typically dashed. Delay The Delay flowchart symbol depicts any waiting period that is pa rt of a process. Delay shapes are common in process mapping. Preparation As the names states, any process step that is a Preparat ion process flow step, such as a set-up operation. Manual Operation Manual Operations flowchart shapes show which pr ocess steps are not automated. In data processing flowcharts, this data flow sha pe indicates a looping operation along with a loop limit symbol (which is not su pported by Microsoft Office, but a Manual Operation symbol rotated 180 will do th e trick.) Branching and Control of Flow Symbols Flow Line (Arrow, Connector) Flow line connectors show the direction that the process flows.

Anda mungkin juga menyukai