Sie sind auf Seite 1von 28

CHAPTER-1

INTRODUCTION
This note introduces some simple C++ concepts and outlines a subset of C++ that is easier to learn and use than the full language. Although we originally wrote this note for explaining the C++ used in the Nachos project, I belie e it is useful to anyone learning C++. I assume that you are already somewhat familiar with C concepts li!e procedures, for loops, and pointers" these are pretty easy to pic! up from reading #ernighan and $itchie%s &&The C 'rogramming (anguage.%% I should admit up front that I am )uite opinionated about C++, if that isn%t ob ious already. I !now se eral C++ purists *an oxymoron perhaps+, who iolently disagree with some of the prescriptions contained here" most of the objections are of the form, &&-ow could you ha e possibly left out feature .+%% -owe er, I% e found from teaching C++ to nearly /000 undergrads o er the past se eral years that the subset of C++ described here is pretty easy to learn, ta!ing only a day or so for most students to get started. The basic premise of this note is that while object1oriented programming is a useful way to simplify programs, C++ is a wildly o er1complicated language, with a host of features that only ery, ery rarely find a legitimate use. It%s not too far off the mar! to say that C++ includes e ery programming language feature e er imagined, and more. The natural tendency when faced with a new language feature is to try to use it, but in C++ this approach leads to disaster. Thus, we need to carefully distinguish between *i, those concepts that are fundamental *e.g., classes, member functions, constructors, 11 ones that e eryone should !now and use, *ii, those that are sometimes but rarely useful *e.g., single inheritance, templates, 11 ones that beginner programmers should be able to recogni2e *in case they run across them, but a oid using in their own programs, at least for a while, and *iii, those that are just a bad idea and should be a oided li!e the plague *e.g., multiple inheritance, exceptions, o erloading, references, etc,.

33/0434

5f course, all the items in this last category ha e their proponents, and I will admit that, li!e the hated goto, it is possible to construct cases when the program would be simpler using a goto or multiple inheritance. -owe er, it is my belief that most programmers will ne er encounter such cases, and e en if you do, you will be much more li!ely to misuse the feature than properly apply it. 6or example, I seriously doubt an undergraduate would need any of the features listed under *iii, for any course project *at least at 7er!eley this is true,. And if you find yourself wanting to use a feature li!e multiple inheritance, then, my ad ice is to fully implement your program both with and without the feature, and choose whiche er is simpler. 8ure, this ta!es more effort, but pretty soon you%ll !now from experience when a feature is useful and when it isn%t, and you%ll be able to s!ip the dual implementation.

1.1 Importance:
Nowadays, technologies ha e ad anced to a large degree. Now each day, the result of technology could be felt e erywhere. 8e eral wor! processes which formerly re)uired a lengthy period of time now ta!es lesser time by automated software. 9ithin the domain names of billing in oicing software may come to great help. 7illing software has all of the accounting concepts integrated within it and therefore the job of accounting is made easier. 7illing software programs and companies are offered online. 7illing systems integrated in these software would also help to create fast print outs of bills. 7illing systems can compute complex bills within a few minutes and therefore the job associated with a store !eeper and accountant is created is a lot easier. 6irst and foremost 7illing systems in this software are simple to understand and also to execute or you can outsource all of your billing ser ices. If one should download any billing software that will compute the entire alues of in oice or would generate in oice in a few minutes then you can get such billing in oice software from the internet. :ou can get billing software in from many reputable sites which permit download of the latest software. Anyone with the smallest idea of using computer and accounting using computer can really ta!e full ad antage of such out of the box programs. Any 8oftware for billing ought to be handled with utmost care because they;re automated software and therefore a small mista!e can set a series of mista!es within the 7illing systems from the 8oftware 33/0434 4

for billing. 6or this reason and if your billing processes are more sophisticated, you may need a customi2ed solution which there are companies out there that can help you achie e. 7illing and Accounting 8oftware allows you to definitely maintain multiple company records, customer1 endor records" tax related and in entory management information, earnings and expenses particulars of the organi2ation with the aid of ad anced barcode technology. 8electing the best billing software or ser ice company for the office is important to de eloping profitability and efficiency. 7illing software or ser ice companies might help simplify useless office tas!s and again place the focus bac! on reaching your practice goals

1.2 Objective
The following objecti es ha e been set< Add and maintain records of a ailable products. Add and maintain description of new products. Add and maintain new entered category of products. 'ro ide economic =financial reports to owner monthly or wee!ly and yearly. 'ro ide a con enient solution of billing pattern. >a!e an easy to use en ironment for users and customers. Accuracy, timeliness and comprehensi eness of the system output. ?nhancement in the completion of wor! within the constraints of time

33/0434

CHAPTER-2
! TE" ANA#! I 2.1 $EA I%I#IT! TUD! 2.1.1 Economic &ea'ibi(it)
?conomic analysis is the most fre)uently used method for e aluating the effecti eness of a new system. >ore commonly !nown as co't*bene&it ana()'i', the procedure is to determine the benefits and sa ings that are expected from a candidate system and compare them with costs. If benefits outweigh costs, then the decision is made to design and implement the system. An entrepreneur must accurately weigh the cost ersus benefits before ta!ing an action Cost 7ased< No special in estment is needed to manage the tool. No specific training is re)uired for employees to use the tool. In estment re)uires only once at the time of installation. The software used in this project is freeware so the cost of de eloping the tool is minimal

2.1.2 #e+a( &ea'ibi(it)


Aetermines whether the proposed system conflicts with legal re)uirements, e.g. a Aata 'rocessing system must comply with the local Aata 'rotection Acts.

2.1., Operationa( &ea'ibi(it)


Is a measure of how well a proposed system sol es the problems, and ta!es ad antages of the opportunities identified during scope definition and how it satisfies the re)uirements identified in the re)uirements analysis phase of system de elopment.

2.1.- c.e/0(e &ea'ibi(it)


A project will fail if it ta!es too long to be completed before it is useful. Typically this means estimating how long the system will ta!e to de elop, and if it can be completed in a gi en time period using some methods li!e paybac! period. 8chedule feasibility is a measure of how reasonable the project timetable is. Bi en our technical expertise, are the project deadlines reasonable+ 8ome projects are initiated with specific deadlines. :ou need to determine whether the deadlines are mandatory or desirable.

33/0434

2.1.1 "ar2et an/ rea( e'tate &ea'ibi(it)


>ar!et 6easibility 8tudy typically in ol es testing geographic locations for a real estate de elopment project, and usually in ol es parcels of real estate land. Ae elopers often conduct mar!et studies to determine the best location within a jurisdiction, and to test alternati e land uses for a gi en parcels. Durisdictions often re)uire de elopers to complete feasibility studies before they will appro e a permit application for retail, commercial, industrial, manufacturing, housing, office or mixed1use project. >ar!et 6easibility ta!es into account the importance of the business in the selected area.

2.1.3 Re'o0rce &ea'ibi(it)


This in ol es )uestions such as how much time is a ailable to build the new system, when it can be built, whether it interferes with normal business operations, type and amount of resources re)uired, dependencies, etc. Contingency and mitigation plans should also be stated here.

2.1.4 C0(t0ra( &ea'ibi(it)


In this stage, the project%s alternati es are e aluated for their impact on the local and general culture. 6or example, en ironmental factors need to be considered and these factors are to be well !nown. 6urther an enterprise%s own culture can clash with the results of the project

33/0434

CHAPTER-,
! TE" DE I5N
Aescribes desired features and operations in detail, including screen layouts, business rules, process diagrams, pseudocode and other documentation. unctions and 'arameters

,.1 Intro/0ction
6unctions are used to brea! a programming problem up into reasonable chun!s. A function should be cohesi e, which means that it should ha e one o erall tas!. Ao not ha e a function carry out se eral unrelated actions. 9hen a function is called, the code for the function is executed. 9hen the function code has been executed, program execution continues at the point right after the function call. 'arameters are used to send data into a function. 5rdinary parameters use call1by1 copy. This means that each formal parameter *parameter name used inside the function code, gets a copy of the alue of the corresponding actual parameter *the ariable or alue that is used in the function call,. 5f course, the first actual parameter gets matched with the first formal parameter, the second actual parameter with the second formal parameter, etc. $eference parameters are used to send data bac! out of a function. A reference parameter is normally indicated by an E between the type name and the formal parameter name. Falues can also be sent into the function ia a reference parameter. The !ey idea is that any change made by the function to such a parameter is sent bac! out of the function. A reference parameter is said to use call1by1reference. Aata can also be send bac! out of a function in the function name itself. This is accomplished by using a return statement inside the code for the function. 6or example, return x" would send the alue of x bac! in the function name. A 6irst ?xample (et%s loo! at an example program, fn.cpp, that illustrates many of these features. $ead through the code and try to identify the ways that data is sent into and bac! out of the functions. *If you wish, sa e a copy of the code, compile it, and run it to see more exactly what it does., Then read the following description to see if you got it rightG 33/0434 H

The $un1Time 8tac! 'rogram execution begins at the start of the main function, of course. The main function in this program has ariables (ength, 9idth, Area, and 'erim. 8pace is sa ed for these ariables in an area of main memory called the run1time stac!. The section of the run1time stac! for the main function is shown below. Note that there is more room a ailable at the top end of this stac! should we need it. 8ince the main function begins by assigning alues to ariables (ength and 9idth, these alues are shown in the drawing of the run1time stac!.

6ig. @./ $un1Time 8tac! Next, the main function calls the 6indArea function as follows< 6indArea*(ength, 9idth, Area," The ariables (ength, 9idth, and Area inside these parentheses are the actual parameters. They correspond in order from left to right to the three formal parameters found in the code for the function, shown below. oid 6indArea*float (ength, float 9idth, float E Area, I Area J (ength K 9idth" L 9hen a function call is reached, a stac! frame *sometimes called an acti ation record, is placed on the run1time stac!. 9e will use a simplified picture of a stac! frame that ignores some of the technical details *such as the local base or base pointer, and does not loo! at differences that exist between arious platforms *such as 9indows ersus (inux,.

33/0434

In our picture, the first items in the stac! frame are the parameters. Then comes the so1called return address, while the last items would be local ariables *but our example has no local ariables,. The first two formal parameters are non1reference *call1by1copy, parameters. Thus, in the picture of the run1time stac! below, you see that the @.C and /.4 ha e been copied into these formal parameters. The third formal parameter, Area, is a reference parameter. No alue is stored in a reference parameter. $ather, it contains a pointer to the corresponding actual parameter. In our example the formal parameter Area contains a pointer to the ariable also called Area in the main function section of the stac!. The pointer is essentially the main memory address of the item pointed to, but is more con eniently drawn as an arrow instead of a number. The return address is the location in the compiled, executable code to return to when the called function has completed. In our example, program execution should continue on the line following the function call. 8ince this return address is a number indicating a location in the compiled machine code, no attempt is made to show the number itself, as it will ary from computer to computer and may e en ary from one run to another on the same computer.

6ig @.4 $eturn address Note that the stac! grows from high addresses to low addresses in memory, at least on most computers. This is bac!wards of what you might expect, but wor!s fine as long as you don%t run out of free memory by running up against something else at 33/0434 N

the low end of memory. -owe er, e en on a computer whose stac! grows from low to high memory addresses, it is possible to run up against something else on the high end. 9hen the function multiplies the length and width to get the area, this alue, C.0N, is stored by following the pointer for the Area reference parameter. Thus the answer gets stored in the Area ariable for function main. This is the mechanism that a reference parameter uses in order to send an answer bac! to whate er function called this function. 9hen the end of the function 6indArea is reached, the return address is used to tell where to continue with the execution of the program. The stac! frame for 6indArea is also remo ed from the stac!. *Actually, it is not really erased. $ather, some indicator of where the top item is on the stac! is just mo ed. This indicator is typically called the stac! pointer., Note that the parameters (ength, 9idth, and Area are now gone. They ha e a short lifetimeG Their lifetime begins when the function is called and is o er when the function is finished. 5ne can also tal! about the scope of a ariable, parameter, or other identifier. The scope is that section of code where it is legal to use that identifier. In our example program, parameters (ength, 9idth, and Area ha e as scope the section of code comprising function 6indArea. Those parameters don%t exist outside of this function. In any case, once function 6indArea ends and its stac! frame is remo ed, the run1 time stac! loo!s li!e this<

6ig. @.@ 6unction 6ind Ares 33/0434 O

Next, as program execution continues in the main function, we see that main calls function 6ind'erim as follows< 'erim J 6ind'erimeter*(ength, 9idth," 8ince this function is returning a alue in its function name, this may well be handled by using a mechanism similar to a reference parameter. 9e will assume that the compiler will set things up so that a temporary ariable is put on the stac! for the main function before putting on the stac! frame for function 6ind'erimeter. The stac! frame for 6ind'erimeter will start with the parameters *both alue or non1reference parameters, (ength and 9idth, each containing a copy of the corresponding actual parameter. Next, in order to return a alue ia the function name, the stac! frame has a location *labelled Temp in the drawing below, that acts li!e a reference parameter in that it contains a pointer to the Temp ariable for the main function. 6inally we ha e the return address of where to go bac! to in the main function. There are no local ariables for this function, but if there were, they would after the return address.

6ig. @.C 6ins 'arimeter

33/0434

/0

,.2. #a)o0t o& t.e propo'e/ Net6or2

$i+ ,.2.1 Data $(o6 Dia+ram

33/0434

//

$i+ ,.2.2 Data $(o6 Dia+ram

33/0434

/4

CHAPTER-! TE" I"P#E"ENTATION Re70irement 'peci&ication -.1 o&t6are


The software re)uired for the project are as underPP /. A full functional window li!e .p=.pM. 4. Installed the full setup of C++. @. Installed the full setup of >s 5ffice including >s 9ord, >s 'ower'oint etc. C. 8oftware of printer which is connected. HARD8ARE:- The hardware re)uired for the project are as underPP /. A 'entium C or higher processor=C'Q. 4. 3/4 or higher $A>. @. Approximate 4B7 or more hard dis! space. C. A CA=AFA read=writer. 3. /3inches or high resolution monitor=(CA. H. A !eyboard. M. A mouse. N. A Q'8 of better bac!up. O. An in!jet or laser printer.

33/0434

/@

-.2 Project Con&i+0ration

6ig C.4./

33/0434

/C

6ig C.4.4

Enter t.e recor/:

6ig C.4.@

33/0434

/3

6ig C.4.C

6ig C.4.3

33/0434

/H

6ig C.4.H

6ig C.4.M

Enter t.e c.oice i& )o0 6ant to enter more /ata:

33/0434

/M

6ig C.4.N

6ig C.4.O

Enter 9/:to /i'p(a) recor/:

33/0434

/N

6ig C.4./0

Di'p(a) recor/:

6ig C.4.//

earc.in+ recor/:

33/0434

/O

6ig C.4./4

6ig C.4./@

enter c.oice to 'earc. t.e recor/:

33/0434

40

6ig C.4./C

6ig C.4./3

Enter c.oice &or /e(etin+ t.e recor/:

33/0434

4/

6ig C.4./H

6ig C.4./M

33/0434

44

6ig C.4./N

6ig C.4.40

33/0434

4@

6ig C.4.4/

CHAPTER-1
! TE" TE TIN5 AND TROU%#E HOOTIN5
8ystem testing of software or hardware is testing conducted on a complete, integrated system to e aluate the system%s compliance with its specified re)uirements. 8ystem testing falls within the scope of blac! box testing, and as such, should re)uire no !nowledge of the inner design of the code or logic. As a rule, system testing ta!es, as its input, all of the RintegratedR software components that ha e passed integration testing and also the software system itself integrated with any applicable hardware system*s,. The purpose of integration testing is to detect any inconsistencies between the software units that are integrated together *called assemblages, or between any of the assemblages and the hardware. 8ystem testing is a more limited type of testing" it see!s to detect defects both within the Rinter1assemblagesR and also within the system as a whole. 8ystem testing is performed on the entire system in the context of a 6unctional $e)uirement 8pecification*s, *6$8, and=or a 8ystem $e)uirement 8pecification 33/0434 4C

*8$8,. 8ystem testing tests not only the design, but also the beha iour and e en the belie ed expectations of the customer. It is also intended to test up to and beyond the bounds defined in the software=hardware re)uirements specification

1.1 T)pe' o& te't' to inc(0/e in ')'tem te'tin+


The following examples are different types of testing that should be considered during 8ystem testing<

1.2 5rap.ica( 0'er inter&ace te'tin+


In software engineering, graphical user interface testing is the process of testing a product%s graphical user interface to ensure it meets its written specifications. This is normally done through the use of a ariety of test cases.

1., U'abi(it) te'tin+


Qsability testing is a techni)ue used in user1centered interaction design to e aluate a product by testing it on users. This can be seen as an irreplaceable usability practice, since it gi es direct input on how real users use the system.S/T This is in contrast with usability inspection methods where experts use different methods to e aluate a user interface without in ol ing users. Qsability testing focuses on measuring a human1made product%s capacity to meet its intended purpose. ?xamples of products that commonly benefit from usability testing are foods, consumer products, web sites or web applications, computer interfaces, documents, and de ices. Qsability testing measures the usability, or ease of use, of a specific object or set of objects, whereas general human1computer interaction studies attempt to formulate uni ersal principles.

1.- o&t6are per&ormance te'tin+

33/0434

43

n software engineering, performance testing is in general testing performed to determine how a system performs in terms of responsi eness and stability under a particular wor!load. It can also ser e to in estigate, measure, alidate or erify other )uality attributes of the system, such as scalability, reliability and resource usage. 'erformance testing is a subset of performance engineering, an emerging computer science practice which stri es to build performance into the implementation, design and architecture of a system.

1.1 Compatibi(it) te'tin+


Compatibility testing, part of software non1functional tests, is testing conducted on the application to e aluate the application%s compatibility with the computing en ironment. Computing en ironment may contain some or all of the below mentioned elements<

1.3 E;ception .an/(in+


?xception handling is the process of responding to the occurrence, during computation, of exceptions U anomalous or exceptional e ents re)uiring special processing U often changing the normal flow of program execution. It is pro ided by speciali2ed programming language constructs or computer hardware mechanisms. In general, an exception is handled *resol ed, by sa ing the current state of execution in a predefined place and switching the execution to a specific subroutine !nown as an exception handler. If exceptions are continuable, the handler may later resume the execution at the original location using the sa ed information. 6or example, a floating point di ide by 2ero exception will typically, by default, allow the program to be resumed, while an out of memory condition might not be resol able transparently.

1.4 #oa/ te'tin+


33/0434 4H

(oad testing is the process of putting demand on a system or de ice and measuring its response. (oad testing is performed to determine a system;s beha ior under both normal and anticipated pea! load conditions. It helps to identify the maximum operating capacity of an application as well as any bottlenec!s and determine which element is causing degradation. 9hen the load placed on the system is raised beyond normal usage patterns, in order to test the system%s response at unusually high or pea! loads, it is !nown as stress testing. The load is usually so great that error conditions are the expected result, although no clear boundary exists when an acti ity ceases to be a load test and becomes a stress test. There is little agreement on what the specific goals of load testing are.Scitation neededT The term is often used synonymously with concurrency testing, software performanc

CHAPTER-3
CONC#U ION AND $UTURE COPE CONC#U ION
At the end of the project we find that the V7I((INBW play an important role in the shops, malls etc. 9e can sa e many records in a single file. 8o that we can sa e the wastage of papers. 9ith the help of this project we can easily E )uic!ly see the record of any product of computer which we want only just pressing a !ey of that record. 9ith the help of this type of projects the office;s wor!s are going ery fast without wasting time. And only a single person=employee can handle this project. 8o that this project helps to sa e time E money. 8o these projects can helps us in the future to gi e a fast=)uic! response in searching process. And this project also helps us to sa e money E time. These projects would be helpful for the new employee. In simple words this project is need of the future. 33/0434 4M

$UTURE COPE
This project will help the store !eeper in fast billing. This project enable store !eeper to maintain a great database of all customer isited and purchase product from store. 'roject will enable to see report regarding product and category. ?asy to maintain in future prospect.

RE$ERENCE http<==www.wi!ipedia.org http<==www.cplusplusonline.org http<==www.ncseonline.org

33/0434

4N

Das könnte Ihnen auch gefallen