Creating Test Harnesses and Starter Applications

Size: px
Start display at page:

Download "Creating Test Harnesses and Starter Applications"

Transcription

1 ch02 11/18/03 8:54 AM Page 27 Creatig Test Haresses ad Starter Applicatios Applicatio Types You Ca Create with Visual C++ Visual C++.NET comes with a package of wizards that geerate startig code for a wide variety of applicatios, both maaged ad umaaged. A useful way to categorize these applicatios is by their user iterface: Cosole applicatios ru i a commad prompt ad are text-oly, readig from the keyboard ad writig to the scree. Widows applicatios are graphical, usig the mouse ad keyboard ad geerally usig well-kow Widows cotrols such as buttos, text boxes, dropdow boxes, ad so o. 2 IN THIS CHAPTER. Applicatio Types You Ca Create with Visual C++. What Is a Test Haress?. Creatig a Umaaged C++ Applicatio. Testig a Umaaged Class with a Umaaged Test Haress. Creatig a Maaged C++ Applicatio. Testig a Maaged Class with a Maaged Test Haress. I Brief Web applicatios ru o a Web server whe a particular URL is loaded, ad sed HTML to a waitig browser. Services are applicatios that ru i the backgroud ad respod to requests, but do ot have ay visual user iterface. Class libraries are collectios of code that ca be called by other code. Other wizards create project types that are typically used by developers makig uusual types of applicatios by had or portig applicatios from aother platform.

2 ch02 11/18/03 8:54 AM Page CHAPTER 2 Creatig Test Haresses ad Starter Applicatios Table 2.1 categorizes the applicatios that Visual C++.NET 2003 will create for you. TABLE 2.1 Applicatio Types i Visual C++ USER INTERFACE UNMANAGED MANAGED Cosole Wi32 Cosole Project Cosole Applicatio (.NET) Widows MFC Applicatio Widows Forms Applicatio (.NET) Web ATL Server Project, MFC ISPAPI Extesio DLL Service ATL Server Web Service ASP.NET Web Service, Widows Service (.NET) Class Library ATL Project, Exteded Stored Procedure Class Library (.NET), Widows DLL, MFC ActiveX Cotrol, MFC DLL Cotrol Library (.NET) Other Custom Wizard, Makefile Project, Empty Project (.NET) Wi32 Project If you took Itro to C++ at college or were set o a oe-week C++ course, you almost certaily wrote cosole applicatios. These applicatios use the iostream library (ci ad cout, for example) to write characters (ot graphics) to the scree ad read them from the keyboard. They geerally ca t iteract with the mouse. Although this might seem hopelessly out of date, cosole applicatios serve a very useful purpose as test haresses, discussed i the ext sectio. Maaged cosole applicatios ca use the System::Cosole class (with methods ReadLie, WriteLie, ad the like) rather tha the iostream library, ad they eed the.net Framework istalled o the machie where they will ru. The excitemet over.net coected applicatios, built o Web Services or leveragig the power of ASP.NET, has obscured the very real role of Widows applicatios i the lives of most computer users. Thik about the products you use every day: Word, Excel, eve Notepad they re all Widows applicatios. They ca read from ad write to your local hard drive, commuicate with local priters, ad they are probably the workhorses of your day. Visual C++.NET 2003 ca be used to create Widows applicatios that require the.net Framework to ru, as you ll see i Chapter 4, Buildig Simple User Iterfaces with Widows Forms. Alteratively, you ca build umaaged Widows applicatios that ru directly uder Widows usig the MFC library. Web applicatios are accessed through a browser. Whe the Web server is asked for a specific page or URL, it rus your code to geerate the HTML that is retured to the browser. Umaaged Web applicatios, which ru through ISAPI or through ATL Server, are very high-performace solutios to specific problems. Your code must maually geerate ay output HTML, so typically the user iterface is ot visually complex, although of course you ca geerate ay HTML you wat. Developers who use VB.NET or C# ca create ASP.NET applicatios for a rich user experiece with code that rus o the Web server, but that optio is ot available to Visual C++.NET 2003 developers.

3 ch02 11/18/03 8:54 AM Page What Is a Test Haress? Services geerally do t have a user iterface. They ca start whe the computer starts eve if o oe has logged i ad are cotrolled from the Services sectio of Computer Maagemet. They are typically used by other applicatios or to iteract with the operatig system. Chapter 12, Writig a Widows Service, has more details. Web Services are similar to services but, like Web applicatios, respod to requests directed to a Web server. Umaaged Web Services ca be created with the ATL Server ad maaged Web Services ca be created with ASP.NET. Maaged Web services do t require the framework o machies that use the service, but they do require it o the Web server. Lear more about maaged Web Services i Chapter 10, Writig ad Cosumig a Web Service. Class libraries are also destied to be called by other applicatios. Most large applicatios are separated ito layers or tiers, ad each of these layers is typically implemeted as a class library, except for the user iterface layer which is a Widows or Web applicatio. As a result, may developers sped more time developig class libraries tha ay other kid of applicatio. Visual C++ developers ca create umaaged DLLs, umaaged COM compoets, ad.net class libraries. Chapter 5, Writig a Class Library i Umaaged C++, discusses some of the architectural cocepts ivolved i desigig class libraries ad the layers of your applicatio for maximum iteroperability. Chapter 6, Writig a Class Library i Maaged C++, describes how simple it is to write code that ca be used from ay.net laguage. Chapter 7, Buildig DLLs i Umaaged C++, ad Chapter 8, Writig COM Compoets I C++, describe two ways of makig a uit of code available to both the maaged ad umaaged world, while workig i umaaged C++. What Is a Test Haress? Because writig class libraries is a big part of ay developer s job, it follows that testig class libraries is a big part of your job, too. Testig a applicatio, whether it s a Widows applicatio or a Web applicatio, is relatively straightforward you ru it, ad experimet with various paths through the applicatio i terms of which buttos you click, or which fields you fill out or leave blak. But how do you test a class library, or a service, or eve a sigle class that ecapsulates a importat busiess process or set of rules? Cosole applicatios are perfect for this kid of testig. They are quick to write, ad you do t eed a facy user iterface. I fact, it s easy to capture the output of a cosole applicatio by redirectig it to a file. This eables you to save the results of test after test ad compare them. Widows programmers are t always familiar with the techiques for iteractig with users without usig cotrols, but they re quick to lear ad defiitely useful. A test haress for workig with a sigle class is the simplest to write. Typically it should perform the followig steps: Create a istace of the class. If there are several costructors, create several istaces. Use ay Display() or Report() method of the object to show its cotets after creatio.

4 ch02 11/18/03 8:54 AM Page CHAPTER 2 Creatig Test Haresses ad Starter Applicatios Exercise each method ad property of the class, ad display the results of each call or the cotets of the object after the call. If methods must be called i the right order, have some code that calls them i the right order ad also some code that calls them i the wrog order, to cofirm that error-checkig code works. If the methods throw exceptios, set up calls that will fail ad surroud them with try ad catch blocks to prove that the correct exceptios are throw. If you have writte a copy costructor or coversio operator for the class, write code that will use them ad display the cotets of all affected objects to demostrate successful copyig or coversio. If the object has a clea-up method such as Dispose(), call it ad prove it was called. If the object is ot garbage-collected, let it go out of scope or delete it to prove that the destructor works correctly. It s a good idea to have lots of output statemets sprikled throughout this code, so that output might look somethig like this: Creatig accout1, default costructor Accout # 123, Balace $0.00 Creatig accout2, passig 50 Accout #124, Balace $50.00 Deposit 100 to accout1 Accout #124, Balace $ This sort of output demostrates which parts of your code are workig ad serves as a excellet record of the developmet process. Geerally, all of the values are hard-coded so that you ca ru the whole thig without havig to iteract with it, but some people write test haresses that prompt for values or eve for which methods to exercise. Whe your test haress is testig a compoet or a layer, your tests will typically iteract either with a sigle bridgig class that provides access to the fuctioality of the compoet or layer, or with each of the classes i the compoet or layer. This ca make the haress quite log, but a systematic test of all your fuctioality is well worth doig, so take the time. Creatig a Umaaged C++ Applicatio The best way to test a umaaged class is with a umaaged test haress. You ll eed to coect the ew applicatio with the class you re testig: Either brig copies of both the header file ad the implemetatio file ito the test solutio, or add the test haress to the

5 ch02 11/18/03 8:54 AM Page Creatig a Umaaged C++ Applicatio solutio i which you are buildig the class. (If you re buildig a COM compoet or DLL, your test haress will typically be a separate solutio because you will be testig whether your compoet is properly registered ad available from aother applicatio.) This chapter shows you how to make a umaaged cosole applicatio that you ca use to write C++ programs without eedig to kow aythig about Widows, the Web, or the.net Framework. Later, whe you ve writte a class, a class library, or a compoet, you ca put your ability to write cosole applicatio to good use by writig a test haress for your reusable code. To build a cosole applicatio that will ru o a computer without the.net Framework istalled, follow these steps: 1. Ope Visual Studio.NET O the Start Page, click New Project. If the Start Page is t visible, choose File, New, Project. 3. Select the Visual C++ Projects folder o the left ad Wi32 Cosole Project o the right. 4. Eter FirstCosole as the project ame (the dialog box should resemble Figure 2.1) ad click OK. 5. Click Fiish from the wizard that appears. The wizard geerates the skeleto of a umaaged C++ applicatio. After the #iclude statemet that was geerated, add these lies: #iclude <iostream> usig amespace std; FIGURE 2.1 Creatig a Wi32 Cosole Project called FirstCosole. Before the retur statemet that was geerated, add this lie: cout << Hello from the cosole << edl; Build the project by choosig Build, Build Solutio. Ru it by choosig Debug, Start without Debuggig. You should see output like Figure 2.2. FIGURE 2.2 The cosole applicatio rus i a commad prompt ad writes characters to the scree. Now that you kow how to create, compile, ad ru a simple cosole applicatio i umaaged C++, you ca do a tremedous amout of programmig. You ca defie classes, ad the

6 ch02 11/18/03 8:54 AM Page CHAPTER 2 Creatig Test Haresses ad Starter Applicatios write code to create istaces of the class ad call their methods. You ca write ad test hudreds of thousads of lies of code i this way, just by addig lies to the mai fuctio (defied as _tmai i Visual C++) that is geerated for you whe you create a Wi32 cosole project. These applicatios do t require the.net Framework ad ca t use the fuctioality of the.net Base Class Libraries. They ca use libraries, such as MFC ad ATL, that do t require the framework. They ca also use the implemetatio of the Stadard Template Library (STL) that comes with Visual C++. I additio there are hudreds of third-party libraries, most of them free, that maipulate images or equatios or molecular simulatios while drawig o the power of C++. Your umaaged C++ code ca leverage these libraries to reduce your codig effort dramatically. Testig a Umaaged Class with a Umaaged Test Haress To illustrate the desig of a test haress, this sectio explais a simple class ad some code that will test it. Switch to the solutio view i Visual Studio by clickig the Solutio tab i the tabbed widow at the right or choosig View, Solutio Explorer. Right-click the solutio ame, FirstCosole, ad choose Add, Add Class. Select Geeric C++ class o the left ad click Ope. Writig a Simple Class Fill i the class ame as Order. (This class will represet a customer order.) The fileames will be etered for you; click Fiish. The defiitio of the class looks like Listig 2.1, ad the implemetatio appears i Listig 2.2. The implemetatio of the global operator for sedig the object to a ostream such as cout is icluded with the actual member fuctios of the class, because it is a fried ad has access to the private member variables. LISTING 2.1 #pragma oce Defiitio of the Order Class #iclude <iostream> usig amespace std; class Order

7 ch02 11/18/03 8:54 AM Page Testig a Umaaged Class with a Umaaged Test Haress LISTING 2.1 Cotiued private: it orderumber; it itemumber; it quatity; fried ostream& operator<<(ostream& os, cost Order& order); public: Order(void); Order(it o, it i, it q); ~Order(void); }; LISTING 2.2 Implemetatio of the Order Class #iclude StdAfx.h #iclude.\order.h ostream& operator<<(ostream& os, cost Order& order) os << Order Number << order.orderumber << : << order.quatity << of item << order.itemumber << edl; retur os; } Order::Order(void) : orderumber(-1), itemumber(-1), quatity(0) } Order::Order(it o, it i, it q): orderumber(o), itemumber(i), quatity(q) } Order::~Order(void) } Order is a simple class that holds three variables: It has two costructors ad a overload of the << operator that ca be used to write the three variables values. The destructor does t do aythig, but because the wizard geerated it you might as well leave it i case you add members later that eed to be cleaed up i a destructor.

8 ch02 11/18/03 8:54 AM Page CHAPTER 2 Creatig Test Haresses ad Starter Applicatios Writig a Test Haress Here is a simple mai fuctio that exercises both costructors ad the << operator, ad cofirms that it s okay to allocate a istace o the heap with the ew operator ad the get rid of it with the delete operator: #iclude stdafx.h #iclude order.h it _tmai(it argc, _TCHAR* argv[]) Order blak; cout << Blak Order << edl; cout << blak << edl; Order filled(1,345,7); cout << Filled Order << edl; cout << filled << edl; Order* p = ew Order(); cout << Heap Order << edl; cout << *p << edl; delete p; } cout << Tests complete << edl; retur 0; The output of this test haress looks like this: Blak Order Order Number -1: 0 of item -1 Filled Order Order Number 1: 7 of item 345 Heap Order Order Number -1: 0 of item -1 Tests complete Press ay key to cotiue

9 ch02 11/18/03 8:54 AM Page Testig a Umaaged Class with a Umaaged Test Haress This proves that the costructors perform as they should, that the << operator works, ad that the applicatio does t blow up or ed abormally whe it uses istaces of the Order class o either the stack or the heap. That s just what test haresses are for. Test haresses you write professioally might be more complex, especially oes that test several classes at oce, but they should always be easy to uderstad ad perform oe purpose to test your code ad prove it works. Because FirstCosole is a umaaged applicatio, you ca copy the.exe file to aother Widows machie ad it will ru there without ay problem. The oly library it eeds is the C rutime, which is istalled with Widows. If you created a more complex test haress, you would eed to deploy ay related COM compoets or DLLs alog with the.exe file, register them, ad perhaps adjust the eviromet variables such as PATH. Large umaaged applicatios ca be difficult to deploy. Ad of course, the executable caot be copied to a o-widows machie it is strictly a Widows applicatio. Debuggig a Umaaged Cosole Applicatio You write a test haress to test your code ad prove that it works. What if it does t? Oe of the most powerful tools available to a developer is the debugger, which lets you examie your code ad variables while a applicatio executes, so that you ca uderstad why it is doig somethig you did t expect. The debugger is part of Visual Studio, ad you ca iteract with it from the code editor. This makes Visual Studio a very productive developmet tool. I the code editor, click i the gray margi to the left of this lie of code: Order blak; A red dot should appear, as i Figure 2.3, represetig a breakpoit a place i the executio of your applicatio where the debugger will pause. Choose Debug, Start, ad the applicatio will ru util this breakpoit is reached. The yellow arrow i the margi, as i Figure 2.4, idicates the lie of code that is about to execute. The Debug, Step Over meu item (look for a toolbar butto ad a keyboard shortcut for this commad) moves the executio poit to the ext lie of code. Step your way through the code a lie at a time. Hover a variable to see its value, ad if you like, step ito a lie of code (such as the costructio of a object or the call to the << operator) to watch the called fuctio ru. You ca switch to the cosole widow where the output of the applicatio appears to watch it beig writte as you move through the applicatio. Whe you are debuggig, the prompt press ay key to cotiue does ot appear at the ed of the program as it does whe you ru without debuggig.

10 ch02 11/18/03 8:54 AM Page CHAPTER 2 Creatig Test Haresses ad Starter Applicatios FIGURE 2.3 Click i the margi to set a breakpoit, which appears as a red dot. FIGURE 2.4 Whe the applicatio is ruig, it will pause at the breakpoit.

11 ch02 11/18/03 8:54 AM Page Creatig a Maaged C++ Applicatio Creatig a Maaged C++ Applicatio As discussed i Chapter 1, C++, Visual C++, ad Maaged C++: What s the Differece? a maaged C++ applicatio is fudametally differet from a umaaged C++ applicatio. The C++ code compiles ot to machie code that ca execute directly, but to a assembly of Itermediate Laguage, or IL. The assembly is kept i a file with a extesio of.exe or.dll, but the cotet of the file is othig like a traditioal executable or DLL. Istead it holds IL ad metadata, iformatio about the classes i the assembly. To ru the applicatio, you actually ask the rutime to ru it for you. The rutime loads the assembly, performig some security checks, ad the calls a method i a class that the assembly holds. For cosole applicatios like those i this chapter, it calls the mai() fuctio, which is disguised as _tmai() i your source because some behid-the-scees code is takig your character set ito accout. Whe ay method or fuctio i a assembly is called for the first time, it is compiled Just-I-Time (some say it is jitted) to machie code. This machie code is cached to be used the ext time this method is called. The machie code executes iside the rutime ad is watched as it rus. Maaged applicatios ca use the libraries that are provided with the.net Framework, ad ca call methods of classes writte i other.net-supported laguages without ay special keywords or techiques. The rutime hadles all the marshallig ad coversio that is ecessary to call from oe laguage ito aother. As a result, most programmers are more productive i maaged C++ tha i umaaged C++, especially whe developig a product that itegrates a variety of compoets. Whe testig a class writte i maaged C++, it s best to write your test haress i maaged C++, so as ot to icur ay performace pealties for the trasitio betwee maaged ad umaaged code. Eve though a maaged cosole applicatio is very differet from a umaaged cosole applicatio, the process of creatig them feels very much the same. Visual Studio takes care of the work behid the scees for you. Here s what you do: 1. Ope Visual Studio.NET 2003, if it s ot already ope. 2. O the Start Page, click New Project. If the Start Page is t visible, choose File, New, Project. 3. Select the Visual C++ Projects folder o the left ad Cosole Applicatio (.NET) o the right. 4. Eter MaagedCosole as the project ame (as show i Figure 2.5), ad click OK. FIGURE 2.5 Creatig a.net cosole applicatio called MaagedCosole.

12 ch02 11/18/03 8:54 AM Page CHAPTER 2 Creatig Test Haresses ad Starter Applicatios The wizard geerates the skeleto of a maaged C++ applicatio. Remove the commet that starts TODO ad edit the lie that was geerated for you so that it reads Cosole::WriteLie(S Hello from a maaged applicatio ); Build the project by choosig Build, Build Solutio. Ru it by choosig Debug, Start without Debuggig. You should see output like Figure 2.6. FIGURE 2.6 applicatio. A cosole applicatio ruig o the.net Framework looks just like a umaaged cosole Although this might feel a lot like creatig the umaaged cosole applicatio from earlier i this chapter, there are some obvious differeces. Brig up the solutio view ad expad the Refereces folder uder the MaagedCosole project. I the umaaged cosole applicatio, FirstCosole, there were o etries i the Refereces folder. I this maaged cosole applicatio, there are three: System.Data, System, ad mscorlib. Each of these etries ames a assembly that implemets a part of the.net Framework ad the Base Class Libraries. Whe a assembly is amed as a referece, the classes defied i it are available to all of the classes defied i this project. I additio, the geerated code i MaagedCosole.cpp cotais this lie: #usig <mscorlib.dll>

13 ch02 11/18/03 8:54 AM Page Testig a Maaged Class with a Maaged Test Haress This lie of code makes the classes i mscorlib.dll available to the code i the mai fuctio. It s redudat, because a referece has already bee added to mscorlib, but the wizard geerates it ayway. The classes i the Base Class Libraries are divided ito amespaces to make them easier to documet ad uderstad. For example, the Cosole class is i the System amespace. Its full ame is therefore System::Cosole. This lie of code lets you refer to it, ad all the other classes i the System amespace, without icludig the amespace ame (System): usig amespace System; There is really oly oe lie i the mai fuctio, _tmai(): Cosole::WriteLie(S Hello from a maaged applicatio ); The WriteLie() member fuctio of the Cosole class takes a maaged referece to a istace of the Strig class i the System amespace, System::Strig. A ordiary C-style strig, as represeted by characters i double quotes, is ot a istace of a System::Strig. The S macro i this lie of code coverts from a C-style strig to a System::Strig referece that ca be passed to Cosole::WriteLie(). As you might guess from the ame, the method writes text, followed by a lie break, to the cosole scree. Now that you kow how to create, compile, ad ru a simple cosole applicatio i maaged C++, you ca do a tremedous amout of programmig for the.net Framework. You ca defie classes, ad the write code to create istaces of the class ad call their methods. You ca write ad test hudreds of thousads of lies of code i this way, just by addig lies to the mai fuctio (defied as _tmai i Visual C++) that is geerated whe you create a.net cosole applicatio with the project wizard. These applicatios all require the.net Framework ad leverage the fuctioality of the.net Base Class Libraries. They ca also use libraries, such as MFC ad ATL, that do t require the framework. (Accessig legacy libraries is covered i Chapter 6.) The most commo use of a maaged cosole applicatio is to test a maaged class, desiged as part of a class library ad to be used from ay.net-supported laguage. Testig a Maaged Class with a Maaged Test Haress The maaged test haress i this chapter tests the same umaaged class, Order, as the umaaged test haress did just to prove that maaged code does t have to use maaged data. I additio, a simple maaged class demostrates how to work with maaged data from maaged code.

14 ch02 11/18/03 8:54 AM Page CHAPTER 2 Creatig Test Haresses ad Starter Applicatios Start by copyig (use Widows Explorer) order.cpp ad order.h ito the project folder of the MaagedCosole project. The right-click the MaagedCosole project i Solutio View, ad choose, Add, Add Existig Item. A file dialog box appears, displayig the project folder. Select order.cpp ad order.h, ad the click Ope. Because the Order class overloads the << operator but does ot have ay other way of displayig its cotets, the test haress will have to use cout ad the << operator rather tha Cosole::WriteLie(). There is o problem combiig the two ways of writig to the scree. (Although I recommed you use the edl or flush maipulators liberally whe usig cout, to esure that oe of your output is left i a buffer whe WriteLie() starts writig to the scree.) Copy the mai() fuctio from FirstCosole to MaagedCosole, ad add the #iclude statemet at the top that brigs i order.h. Compile ad ru the applicatio to make sure everythig has bee copied correctly. I Solutio view, right-click the MaagedCosole project ad choose Add, Add Class. Select Geeric C++ Class o the right, ad click Ope. I the Geeric C++ Class wizard, ame the class Purchaser ad click Fiish. The class that is geerated for you is ot garbage collected. I Purchaser.h, chage this lie class Purchaser to this public gc class Purchaser Note that the gc keyword starts with two uderscores. Now Purchaser is a garbagecollected class, as discussed i Chapter 1. The defiitio of the class looks like Listig REFERENCES TO ASSEMBLIES AND 2.3, ad the implemetatio is i Listig NAMESPACES 2.4. Notice that istead of a overload of the If you re workig alog, do t forget to iclude ay << operator, Purchaser icludes a overload #usig ad usig statemets you see i this sample of the ToStrig method, which all maaged code. Without them, this code wo t compile. classes iherit from Object. (Eve whe you do t specify a base class, all maaged classes iherit from Object, ad Object declares the ToStrig method.) This makes it simple to pass a Purchaser istace to Cosole::WriteLie(), because that method will try covertig the istace to a Strig by callig ToStrig(). Notice that the costructors use iitializer sytax: This is still C++, so you have all the capabilities ad coveieces of the laguage.

15 ch02 11/18/03 8:54 AM Page Testig a Maaged Class with a Maaged Test Haress LISTING 2.3 Defiitio of the Purchaser Class #pragma oce usig amespace System; public gc class Purchaser private: Strig* ame; it accout; public: Purchaser(void); Purchaser(Strig*, it a); ~Purchaser(void); Strig* ToStrig(); }; LISTING 2.4 Implemetatio of the Purchaser Class #iclude StdAfx.h #iclude.\purchaser.h #usig <mscorlib.dll> Purchaser::Purchaser(void) : ame(s ),accout(-1) } Purchaser::Purchaser(Strig*, it a) : ame(),accout(a) } Purchaser::~Purchaser(void) } Strig* Purchaser::ToStrig() retur Strig::Cocat(ame,, accout.tostrig()); }

16 ch02 11/18/03 8:54 AM Page CHAPTER 2 Creatig Test Haresses ad Starter Applicatios Addig these lies to the mai fuctio exercises the Purchaser ad Order classes: Purchaser* blakpurchaser = ew Purchaser(); Cosole::WriteLie(blakpurchaser); Purchaser* filledpurchaser = ew Purchaser(S Joe Customer, 456); Cosole::WriteLie(filledpurchaser); The output from these lies looks like this: -1 Joe Customer 456 Notice that the ToStrig() method was called by Cosole::WriteLie(). This simple maaged test haress proves that the umaaged class ca be called from maaged code, ad works just as it did whe called from maaged code. It also proves that the costructors for the maaged class work correctly. Of course, you do t eed to delete the istaces of Purchaser; the garbage collector will take care of them. Because MaagedCosole is a maaged applicatio, you ca copy the.exe file (the assembly) to ay other machie with the.net Framework istalled, ad it will ru there without ay problem. The oly libraries it eeds are those istalled with the framework. If you created a more complex test haress, you would eed to deploy ay assemblies, but typically they would just be copied ito the same folder as the test haress. Large maaged applicatios are much easier to deploy tha their umaaged equivalets. Ad of course, it ca eve be possible to the copy a executable to a o-widows machie as log as that machie has the.net Framework. As of this book s writig, the versios of the.net Framework for o- Widows machies are severely limited, but they do exist ad would be able to execute the test haress show i this chapter o a Mac or UNIX machie without recompilig the C++ source. I Brief Visual C++.NET 2003 ca be used to create both maaged ad umaaged applicatios with user iterfaces that rage from oe at all (services) to simple cosole iterfaces to Widows applicatios. Cosole applicatios ru i a commad prompt ad use character-based iput ad output.

17 ch02 11/18/03 8:54 AM Page I Brief Although maaged ad umaaged cosole applicatios use differet libraries, they look similar whe they ru. Maaged C++ applicatios ca use techiques (such as cout ad the << operator) from umaaged C++ to simplify movig legacy C++ applicatios to the.net Framework. The debugger i Visual Studio.NET is simple to use for debuggig both maaged ad umaaged applicatios.

18 ch02 11/18/03 8:54 AM Page 44

C++, Visual C++, and Managed C++: What s the Difference?

C++, Visual C++, and Managed C++: What s the Difference? 02 6000 ch01 11/18/03 8:52 AM Page 7 C++, Visual C++, ad Maaged C++: What s the Differece? Differeces Betwee Visual C++ ad C++ C++ is a laguage, ad Visual C++ is a product. The laguage itself was developed

More information

n Some thoughts on software development n The idea of a calculator n Using a grammar n Expression evaluation n Program organization n Analysis

n Some thoughts on software development n The idea of a calculator n Using a grammar n Expression evaluation n Program organization n Analysis Overview Chapter 6 Writig a Program Bjare Stroustrup Some thoughts o software developmet The idea of a calculator Usig a grammar Expressio evaluatio Program orgaizatio www.stroustrup.com/programmig 3 Buildig

More information

Python Programming: An Introduction to Computer Science

Python Programming: An Introduction to Computer Science Pytho Programmig: A Itroductio to Computer Sciece Chapter 1 Computers ad Programs 1 Objectives To uderstad the respective roles of hardware ad software i a computig system. To lear what computer scietists

More information

Chapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 5 Fuctios for All Subtasks Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 5.1 void Fuctios 5.2 Call-By-Referece Parameters 5.3 Usig Procedural Abstractio 5.4 Testig ad Debuggig

More information

One advantage that SONAR has over any other music-sequencing product I ve worked

One advantage that SONAR has over any other music-sequencing product I ve worked *gajedra* D:/Thomso_Learig_Projects/Garrigus_163132/z_productio/z_3B2_3D_files/Garrigus_163132_ch17.3d, 14/11/08/16:26:39, 16:26, page: 647 17 CAL 101 Oe advatage that SONAR has over ay other music-sequecig

More information

Chapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 1 Itroductio to Computers ad C++ Programmig Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 1.1 Computer Systems 1.2 Programmig ad Problem Solvig 1.3 Itroductio to C++ 1.4 Testig

More information

Chapter 10. Defining Classes. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 10. Defining Classes. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 10 Defiig Classes Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 10.1 Structures 10.2 Classes 10.3 Abstract Data Types 10.4 Itroductio to Iheritace Copyright 2015 Pearso Educatio,

More information

Python Programming: An Introduction to Computer Science

Python Programming: An Introduction to Computer Science Pytho Programmig: A Itroductio to Computer Sciece Chapter 6 Defiig Fuctios Pytho Programmig, 2/e 1 Objectives To uderstad why programmers divide programs up ito sets of cooperatig fuctios. To be able to

More information

Exceptions. Your computer takes exception. The Exception Class. Causes of Exceptions

Exceptions. Your computer takes exception. The Exception Class. Causes of Exceptions Your computer takes exceptio s s are errors i the logic of a program (ru-time errors). Examples: i thread mai java.io.filenotfoud: studet.txt (The system caot fid the file specified.) i thread mai java.lag.nullpoiter:

More information

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved. Chapter 11 Frieds, Overloaded Operators, ad Arrays i Classes Copyright 2014 Pearso Addiso-Wesley. All rights reserved. Overview 11.1 Fried Fuctios 11.2 Overloadig Operators 11.3 Arrays ad Classes 11.4

More information

Guide to Applying Online

Guide to Applying Online Guide to Applyig Olie Itroductio Respodig to requests for additioal iformatio Reportig: submittig your moitorig or ed of grat Pledges: submittig your Itroductio This guide is to help charities submit their

More information

Weston Anniversary Fund

Weston Anniversary Fund Westo Olie Applicatio Guide 2018 1 This guide is desiged to help charities applyig to the Westo to use our olie applicatio form. The Westo is ope to applicatios from 5th Jauary 2018 ad closes o 30th Jue

More information

BAAN IVc/BaanERP. Conversion Guide Oracle7 to Oracle8

BAAN IVc/BaanERP. Conversion Guide Oracle7 to Oracle8 BAAN IVc/BaaERP A publicatio of: Baa Developmet B.V. P.O.Box 143 3770 AC Bareveld The Netherlads Prited i the Netherlads Baa Developmet B.V. 1999. All rights reserved. The iformatio i this documet is subject

More information

CS : Programming for Non-Majors, Summer 2007 Programming Project #3: Two Little Calculations Due by 12:00pm (noon) Wednesday June

CS : Programming for Non-Majors, Summer 2007 Programming Project #3: Two Little Calculations Due by 12:00pm (noon) Wednesday June CS 1313 010: Programmig for No-Majors, Summer 2007 Programmig Project #3: Two Little Calculatios Due by 12:00pm (oo) Wedesday Jue 27 2007 This third assigmet will give you experiece writig programs that

More information

Baan Tools User Management

Baan Tools User Management Baa Tools User Maagemet Module Procedure UP008A US Documetiformatio Documet Documet code : UP008A US Documet group : User Documetatio Documet title : User Maagemet Applicatio/Package : Baa Tools Editio

More information

Chapter 6. I/O Streams as an Introduction to Objects and Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Chapter 6. I/O Streams as an Introduction to Objects and Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved. Chapter 6 I/O Streams as a Itroductio to Objects ad Classes Overview 6.1 Streams ad Basic File I/O 6.2 Tools for Stream I/O 6.3 Character I/O Slide 6-3 6.1 Streams ad Basic File I/O I/O Streams I/O refers

More information

CS 11 C track: lecture 1

CS 11 C track: lecture 1 CS 11 C track: lecture 1 Prelimiaries Need a CMS cluster accout http://acctreq.cms.caltech.edu/cgi-bi/request.cgi Need to kow UNIX IMSS tutorial liked from track home page Track home page: http://courses.cms.caltech.edu/courses/cs11/material

More information

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 9 Poiters ad Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 9.1 Poiters 9.2 Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Slide 9-3

More information

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design College of Computer ad Iformatio Scieces Departmet of Computer Sciece CSC 220: Computer Orgaizatio Uit 11 Basic Computer Orgaizatio ad Desig 1 For the rest of the semester, we ll focus o computer architecture:

More information

Overview Chapter 12 A display model

Overview Chapter 12 A display model Overview Chapter 12 A display model Why graphics? A graphics model Examples Bjare Stroustrup www.stroustrup.com/programmig 3 Why bother with graphics ad GUI? Why bother with graphics ad GUI? It s very

More information

Customer Portal Quick Reference User Guide

Customer Portal Quick Reference User Guide Customer Portal Quick Referece User Guide Overview This user guide is iteded for FM Approvals customers usig the Approval Iformatio Maagemet (AIM) customer portal to track their active projects. AIM is

More information

Baan Finance Financial Statements

Baan Finance Financial Statements Baa Fiace Fiacial Statemets Module Procedure UP041A US Documetiformatio Documet Documet code : UP041A US Documet group : User Documetatio Documet title : Fiacial Statemets Applicatio/Package : Baa Fiace

More information

Web OS Switch Software

Web OS Switch Software Web OS Switch Software BBI Quick Guide Nortel Networks Part Number: 213164, Revisio A, July 2000 50 Great Oaks Boulevard Sa Jose, Califoria 95119 408-360-5500 Mai 408-360-5501 Fax www.orteletworks.com

More information

The VSS CCD photometry spreadsheet

The VSS CCD photometry spreadsheet The VSS CCD photometry spreadsheet Itroductio This Excel spreadsheet has bee developed ad tested by the BAA VSS for aalysig results files produced by the multi-image CCD photometry procedure i AIP4Wi v2.

More information

Workflow model GM AR. Gumpy. Dynagump. At a very high level, this is what gump does. We ll be looking at each of the items described here seperately.

Workflow model GM AR. Gumpy. Dynagump. At a very high level, this is what gump does. We ll be looking at each of the items described here seperately. Workflow model GM AR Gumpy RM Dyagump At a very high level, this is what gump does. We ll be lookig at each of the items described here seperately. User edits project descriptor ad commits s maitai their

More information

Computers and Scientific Thinking

Computers and Scientific Thinking Computers ad Scietific Thikig David Reed, Creighto Uiversity Chapter 15 JavaScript Strigs 1 Strigs as Objects so far, your iteractive Web pages have maipulated strigs i simple ways use text box to iput

More information

BEA Tuxedo. Using the BEA Tuxedo System on Windows NT

BEA Tuxedo. Using the BEA Tuxedo System on Windows NT BEA Tuxedo Usig the BEA Tuxedo System o Widows NT BEA Tuxedo Release 7.1 Documet Editio 7.1 May 2000 Copyright Copyright 2000 BEA Systems, Ic. All Rights Reserved. Restricted Rights Leged This software

More information

Chapter 8. Strings and Vectors. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Chapter 8. Strings and Vectors. Copyright 2014 Pearson Addison-Wesley. All rights reserved. Chapter 8 Strigs ad Vectors Overview 8.1 A Array Type for Strigs 8.2 The Stadard strig Class 8.3 Vectors Slide 8-3 8.1 A Array Type for Strigs A Array Type for Strigs C-strigs ca be used to represet strigs

More information

GE FUNDAMENTALS OF COMPUTING AND PROGRAMMING UNIT III

GE FUNDAMENTALS OF COMPUTING AND PROGRAMMING UNIT III GE2112 - FUNDAMENTALS OF COMPUTING AND PROGRAMMING UNIT III PROBLEM SOLVING AND OFFICE APPLICATION SOFTWARE Plaig the Computer Program Purpose Algorithm Flow Charts Pseudocode -Applicatio Software Packages-

More information

n Maurice Wilkes, 1949 n Organize software to minimize errors. n Eliminate most of the errors we made anyway.

n Maurice Wilkes, 1949 n Organize software to minimize errors. n Eliminate most of the errors we made anyway. Bjare Stroustrup www.stroustrup.com/programmig Chapter 5 Errors Abstract Whe we program, we have to deal with errors. Our most basic aim is correctess, but we must deal with icomplete problem specificatios,

More information

Basic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000.

Basic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000. 5-23 The course that gives CM its Zip Memory Maagemet II: Dyamic Storage Allocatio Mar 6, 2000 Topics Segregated lists Buddy system Garbage collectio Mark ad Sweep Copyig eferece coutig Basic allocator

More information

Term Project Report. This component works to detect gesture from the patient as a sign of emergency message and send it to the emergency manager.

Term Project Report. This component works to detect gesture from the patient as a sign of emergency message and send it to the emergency manager. CS2310 Fial Project Loghao Li Term Project Report Itroductio I this project, I worked o expadig exercise 4. What I focused o is makig the real gesture recogizig sesor ad desig proper gestures ad recogizig

More information

Chapter 8. Strings and Vectors. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 8. Strings and Vectors. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 8 Strigs ad Vectors Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 8.1 A Array Type for Strigs 8.2 The Stadard strig Class 8.3 Vectors Copyright 2015 Pearso Educatio, Ltd..

More information

. Written in factored form it is easy to see that the roots are 2, 2, i,

. Written in factored form it is easy to see that the roots are 2, 2, i, CMPS A Itroductio to Programmig Programmig Assigmet 4 I this assigmet you will write a java program that determies the real roots of a polyomial that lie withi a specified rage. Recall that the roots (or

More information

Abstract. Chapter 4 Computation. Overview 8/13/18. Bjarne Stroustrup Note:

Abstract. Chapter 4 Computation. Overview 8/13/18. Bjarne Stroustrup   Note: Chapter 4 Computatio Bjare Stroustrup www.stroustrup.com/programmig Abstract Today, I ll preset the basics of computatio. I particular, we ll discuss expressios, how to iterate over a series of values

More information

In this chapter, you learn the concepts and terminology of databases and

In this chapter, you learn the concepts and terminology of databases and A Itroductio to Database Developmet I this chapter, you lear the cocepts ad termiology of databases ad how to desig the tables that your forms ad reports will use. Fially, you build the actual tables used

More information

Basic Design Principles

Basic Design Principles + Basic Desig Priciples + Assigmet 2: Your studet web site 1. Baer 2. Your ame 3. Your accout umber 4. A lik to aother web page, preferably oe useful to you i this class 5. A photo, preferably of you 6.

More information

Bike MS: 2013 Participant Center guide

Bike MS: 2013 Participant Center guide Bike MS: 2013 Participat Ceter guide bikems.org 1 Why use Olie Fudraisig Tools? Usig olie tools makes fudraisig easier Table of Cotets Participats who use persoal pages raise more moey! Bike MS $883 v.

More information

Bike MS: 2014 Participant Center guide

Bike MS: 2014 Participant Center guide Bike MS: 2014 Participat Ceter guide bikems.org 1 Table of Cotets Why Use Olie Fudraisig Tools... 2 Participat Ceter... 3 Guide to Olie Fudraisig... 3 Edit Persoal Page... 5 Address Book... 7 Email Messages...

More information

BEA WebLogic Process Integrator

BEA WebLogic Process Integrator BEA WebLogic Process Itegrator A Compoet of BEA WebLogic Itegratio BEA WebLogic Process Itegrator Studio Olie Help BEA WebLogic Process Itegrator Release 2.0 Documet Editio 2.0 July 2001 Copyright Copyright

More information

Avid Interplay Bundle

Avid Interplay Bundle Avid Iterplay Budle Versio 2.5 Cofigurator ReadMe Overview This documet provides a overview of Iterplay Budle v2.5 ad describes how to ru the Iterplay Budle cofiguratio tool. Iterplay Budle v2.5 refers

More information

Appendix D. Controller Implementation

Appendix D. Controller Implementation COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Appedix D Cotroller Implemetatio Cotroller Implemetatios Combiatioal logic (sigle-cycle); Fiite state machie (multi-cycle, pipelied);

More information

top() Applications of Stacks

top() Applications of Stacks CS22 Algorithms ad Data Structures MW :00 am - 2: pm, MSEC 0 Istructor: Xiao Qi Lecture 6: Stacks ad Queues Aoucemets Quiz results Homework 2 is available Due o September 29 th, 2004 www.cs.mt.edu~xqicoursescs22

More information

Definitions. Error. A wrong decision made during software development

Definitions. Error. A wrong decision made during software development Debuggig Defiitios Error A wrog decisio made durig software developmet Defiitios 2 Error A wrog decisio made durig software developmet Defect bug sometimes meas this The term Fault is also used Property

More information

Adapter for Mainframe

Adapter for Mainframe BEA WebLogic Java Adapter for Maiframe Workflow Processig Guide Release 5.0 Documet Date: Jauary 2002 Copyright Copyright 2002 BEA Systems, Ic. All Rights Reserved. Restricted Rights Leged This software

More information

Chapter 4. Procedural Abstraction and Functions That Return a Value. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 4. Procedural Abstraction and Functions That Return a Value. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 4 Procedural Abstractio ad Fuctios That Retur a Value Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 4.1 Top-Dow Desig 4.2 Predefied Fuctios 4.3 Programmer-Defied Fuctios 4.4

More information

Getting Started. Getting Started - 1

Getting Started. Getting Started - 1 Gettig Started Gettig Started - 1 Issue 1 Overview of Gettig Started Overview of Gettig Started This sectio explais the basic operatios of the AUDIX system. It describes how to: Log i ad log out of the

More information

A Taste of Maya. Character Setup

A Taste of Maya. Character Setup This tutorial goes through the steps to add aimatio cotrols to a previously modeled character. The character i the scee below is wearig clothes made with Cloth ad the sceery has bee created with Pait Effects.

More information

MOTIF XF Extension Owner s Manual

MOTIF XF Extension Owner s Manual MOTIF XF Extesio Ower s Maual Table of Cotets About MOTIF XF Extesio...2 What Extesio ca do...2 Auto settig of Audio Driver... 2 Auto settigs of Remote Device... 2 Project templates with Iput/ Output Bus

More information

Overview. Chapter 18 Vectors and Arrays. Reminder. vector. Bjarne Stroustrup

Overview. Chapter 18 Vectors and Arrays. Reminder. vector. Bjarne Stroustrup Chapter 18 Vectors ad Arrays Bjare Stroustrup Vector revisited How are they implemeted? Poiters ad free store Destructors Iitializatio Copy ad move Arrays Array ad poiter problems Chagig size Templates

More information

3.1 Overview of MySQL Programs. These programs are discussed further in Chapter 4, Database Administration. Client programs that access the server:

3.1 Overview of MySQL Programs. These programs are discussed further in Chapter 4, Database Administration. Client programs that access the server: 3 Usig MySQL Programs This chapter provides a brief overview of the programs provided by MySQL AB ad discusses how to specify optios whe you ru these programs. Most programs have optios that are specific

More information

10/23/18. File class in Java. Scanner reminder. Files. Opening a file for reading. Scanner reminder. File Input and Output

10/23/18. File class in Java. Scanner reminder. Files. Opening a file for reading. Scanner reminder. File Input and Output File class i Java File Iput ad Output TOPICS File Iput Exceptio Hadlig File Output Programmers refer to iput/output as "I/O". The File class represets files as objects. The class is defied i the java.io

More information

Panel for Adobe Premiere Pro CC Partner Solution

Panel for Adobe Premiere Pro CC Partner Solution Pael for Adobe Premiere Pro CC Itegratio for more efficiecy The makes video editig simple, fast ad coveiet. The itegrated pael gives users immediate access to all medialoopster features iside Adobe Premiere

More information

BEA Tuxedo. Creating CORBA Client Applications

BEA Tuxedo. Creating CORBA Client Applications BEA Tuxedo Creatig CORBA Cliet Applicatios BEA Tuxedo 8.0 Documet Editio 8.0 Jue 2001 Copyright Copyright 2001 BEA Systems, Ic. All Rights Reserved. Restricted Rights Leged This software ad documetatio

More information

Architectural styles for software systems The client-server style

Architectural styles for software systems The client-server style Architectural styles for software systems The cliet-server style Prof. Paolo Ciacarii Software Architecture CdL M Iformatica Uiversità di Bologa Ageda Cliet server style CS two tiers CS three tiers CS

More information

BEA WebLogic XML/Non-XML Translator

BEA WebLogic XML/Non-XML Translator BEA WebLogic XML/No-XML Traslator A Compoet of BEA WebLogic Itegratio Plug-I Guide BEA WebLogic XML/No-XML Traslator Release 2.0 Documet Editio 2.0 July 2001 Copyright Copyright 2001 BEA Systems, Ic. All

More information

Recursion. Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Review: Method Frames

Recursion. Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Review: Method Frames Uit 4, Part 3 Recursio Computer Sciece S-111 Harvard Uiversity David G. Sulliva, Ph.D. Review: Method Frames Whe you make a method call, the Java rutime sets aside a block of memory kow as the frame of

More information

Structuring Redundancy for Fault Tolerance. CSE 598D: Fault Tolerant Software

Structuring Redundancy for Fault Tolerance. CSE 598D: Fault Tolerant Software Structurig Redudacy for Fault Tolerace CSE 598D: Fault Tolerat Software What do we wat to achieve? Versios Damage Assessmet Versio 1 Error Detectio Iputs Versio 2 Voter Outputs State Restoratio Cotiued

More information

Threads and Concurrency in Java: Part 1

Threads and Concurrency in Java: Part 1 Cocurrecy Threads ad Cocurrecy i Java: Part 1 What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.

More information

BIKE MS: 2015 PARTICIPANT CENTER GUIDE

BIKE MS: 2015 PARTICIPANT CENTER GUIDE BIKE MS: 2015 PARTICIPANT CENTER GUIDE bikems.org 1 Table of Cotets Why Use Olie Fudraisig Tools... 2 Participat Ceter... 3 Guide to Olie Fudraisig... 3 Edit Persoal Page... 5 Address Book... 7 Email Messages...

More information

BEA Tuxedo. Creating CORBA Server Applications

BEA Tuxedo. Creating CORBA Server Applications BEA Tuxedo Creatig CORBA Server Applicatios BEA Tuxedo Release 8.0 Documet Editio 8.0 Jue 2001 Copyright Copyright 2001 BEA Systems, Ic. All Rights Reserved. Restricted Rights Leged This software ad documetatio

More information

Threads and Concurrency in Java: Part 1

Threads and Concurrency in Java: Part 1 Threads ad Cocurrecy i Java: Part 1 1 Cocurrecy What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.

More information

CMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago

CMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago CMSC 22200 Computer Architecture Lecture 12: Virtual Memory Prof. Yajig Li Uiversity of Chicago A System with Physical Memory Oly Examples: most Cray machies early PCs Memory early all embedded systems

More information

9.1. Sequences and Series. Sequences. What you should learn. Why you should learn it. Definition of Sequence

9.1. Sequences and Series. Sequences. What you should learn. Why you should learn it. Definition of Sequence _9.qxd // : AM Page Chapter 9 Sequeces, Series, ad Probability 9. Sequeces ad Series What you should lear Use sequece otatio to write the terms of sequeces. Use factorial otatio. Use summatio otatio to

More information

Pseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance

Pseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Pseudocode ( 1.1) High-level descriptio of a algorithm More structured

More information

n Explore virtualization concepts n Become familiar with cloud concepts

n Explore virtualization concepts n Become familiar with cloud concepts Chapter Objectives Explore virtualizatio cocepts Become familiar with cloud cocepts Chapter #15: Architecture ad Desig 2 Hypervisor Virtualizatio ad cloud services are becomig commo eterprise tools to

More information

n We have discussed classes in previous lectures n Here, we discuss design of classes n Library design considerations

n We have discussed classes in previous lectures n Here, we discuss design of classes n Library design considerations Chapter 14 Graph class desig Bjare Stroustrup Abstract We have discussed classes i previous lectures Here, we discuss desig of classes Library desig cosideratios Class hierarchies (object-orieted programmig)

More information

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Part A Datapath Design

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Part A Datapath Design COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter The Processor Part A path Desig Itroductio CPU performace factors Istructio cout Determied by ISA ad compiler. CPI ad

More information

Code Review Defects. Authors: Mika V. Mäntylä and Casper Lassenius Original version: 4 Sep, 2007 Made available online: 24 April, 2013

Code Review Defects. Authors: Mika V. Mäntylä and Casper Lassenius Original version: 4 Sep, 2007 Made available online: 24 April, 2013 Code Review s Authors: Mika V. Mätylä ad Casper Lasseius Origial versio: 4 Sep, 2007 Made available olie: 24 April, 2013 This documet cotais further details of the code review defects preseted i [1]. of

More information

Interface Changes. What s New. User Interface Themes IN THIS CHAPTER

Interface Changes. What s New. User Interface Themes IN THIS CHAPTER Iterface Chages 3 IN THIS CHAPTER What s New This chapter touches o some of the ew iterface chages ad features i Widows Server 2003. Just as Widows NT Server 4.0 shares a user iterface with Widows 95 ad

More information

CMPT 125 Assignment 2 Solutions

CMPT 125 Assignment 2 Solutions CMPT 25 Assigmet 2 Solutios Questio (20 marks total) a) Let s cosider a iteger array of size 0. (0 marks, each part is 2 marks) it a[0]; I. How would you assig a poiter, called pa, to store the address

More information

COSC 1P03. Ch 7 Recursion. Introduction to Data Structures 8.1

COSC 1P03. Ch 7 Recursion. Introduction to Data Structures 8.1 COSC 1P03 Ch 7 Recursio Itroductio to Data Structures 8.1 COSC 1P03 Recursio Recursio I Mathematics factorial Fiboacci umbers defie ifiite set with fiite defiitio I Computer Sciece sytax rules fiite defiitio,

More information

Floristic Quality Assessment (FQA) Calculator for Colorado User s Guide

Floristic Quality Assessment (FQA) Calculator for Colorado User s Guide Floristic Quality Assessmet (FQA) Calculator for Colorado User s Guide Created by the Colorado atural Heritage Program Last Updated April 2012 The FQA Calculator was created by Michelle Fik ad Joaa Lemly

More information

Global Support Guide. Verizon WIreless. For the BlackBerry 8830 World Edition Smartphone and the Motorola Z6c

Global Support Guide. Verizon WIreless. For the BlackBerry 8830 World Edition Smartphone and the Motorola Z6c Verizo WIreless Global Support Guide For the BlackBerry 8830 World Editio Smartphoe ad the Motorola Z6c For complete iformatio o global services, please refer to verizowireless.com/vzglobal. Whether i

More information

How do we evaluate algorithms?

How do we evaluate algorithms? F2 Readig referece: chapter 2 + slides Algorithm complexity Big O ad big Ω To calculate ruig time Aalysis of recursive Algorithms Next time: Litterature: slides mostly The first Algorithm desig methods:

More information

n Learn how resiliency strategies reduce risk n Discover automation strategies to reduce risk

n Learn how resiliency strategies reduce risk n Discover automation strategies to reduce risk Chapter Objectives Lear how resiliecy strategies reduce risk Discover automatio strategies to reduce risk Chapter #16: Architecture ad Desig Resiliecy ad Automatio Strategies 2 Automatio/Scriptig Resiliet

More information

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation 6-0-0 Kowledge Trasformatio from Task Scearios to View-based Desig Diagrams Nima Dezhkam Kamra Sartipi {dezhka, sartipi}@mcmaster.ca Departmet of Computig ad Software McMaster Uiversity CANADA SEKE 08

More information

JoLetter 6.7. JoLauterbach Software GmbH. Mail and merge with QuarkXPress. JoLauterbach Software GmbH. Stolzingstraße 4a Bayreuth Germany

JoLetter 6.7. JoLauterbach Software GmbH. Mail and merge with QuarkXPress. JoLauterbach Software GmbH. Stolzingstraße 4a Bayreuth Germany JoLetter 6.7 Mail ad merge with QuarkXPress JoLauterbach Software GmbH Stolzigstraße 4a 95445 Bayreuth Germay Telefo: +49-921-730 3363 Fax: +49-921-730 3394 E-Mail: ifo@jolauterbach.com Iteret: http://www.jolauterbach.com

More information

Using the Keyboard. Using the Wireless Keyboard. > Using the Keyboard

Using the Keyboard. Using the Wireless Keyboard. > Using the Keyboard 1 A wireless keyboard is supplied with your computer. The wireless keyboard uses a stadard key arragemet with additioal keys that perform specific fuctios. Usig the Wireless Keyboard Two AA alkalie batteries

More information

BaanERP. DB2 Installation Guide for BaanERP on Windows NT

BaanERP. DB2 Installation Guide for BaanERP on Windows NT BaaERP DB2 Istallatio Guide for BaaERP o Widows NT A publicatio of: Baa Developmet B.V. P.O.Box 143 3770 AC Bareveld The Netherlads Prited i the Netherlads Baa Developmet B.V. 1999. All rights reserved.

More information

CS 111: Program Design I Lecture 19: Networks, the Web, and getting text from the Web in Python

CS 111: Program Design I Lecture 19: Networks, the Web, and getting text from the Web in Python CS 111: Program Desig I Lecture 19: Networks, the Web, ad gettig text from the Web i Pytho Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago April 3, 2018 Goals Lear about Iteret Lear about

More information

BEA Tuxedo. Using the BEA Tuxedo Workstation Component

BEA Tuxedo. Using the BEA Tuxedo Workstation Component BEA Tuxedo Usig the BEA Tuxedo Workstatio Compoet BEA Tuxedo Release 7.1 Documet Editio 7.1 May 2000 Copyright Copyright 2000 BEA Systems, Ic. All Rights Reserved. Restricted Rights Leged This software

More information

Interactive PMCube Explorer

Interactive PMCube Explorer Iteractive PMCube Explorer Documetatio ad User Maual Thomas Vogelgesag Carl vo Ossietzky Uiversität Oldeburg December 9, 206 Cotets Itroductio 3 2 Applicatio Overview 4 3 Data Preparatio 6 3. Data Warehouse

More information

Chapter 4 Threads. Operating Systems: Internals and Design Principles. Ninth Edition By William Stallings

Chapter 4 Threads. Operating Systems: Internals and Design Principles. Ninth Edition By William Stallings Operatig Systems: Iterals ad Desig Priciples Chapter 4 Threads Nith Editio By William Stalligs Processes ad Threads Resource Owership Process icludes a virtual address space to hold the process image The

More information

Oracle Server. What s New in this Release? Release Notes

Oracle  Server. What s New in this Release? Release Notes Oracle email Server Release Notes Release 5.2 for Widows NT May 2001 Part No. A90426-01 These release otes accompay Oracle email Server Release 5.2 for Widows NT. They cotai the followig topics: What s

More information

Data Warehousing. Paper

Data Warehousing. Paper Data Warehousig Paper 28-25 Implemetig a fiacial balace scorecard o top of SAP R/3, usig CFO Visio as iterface. Ida Carapelle & Sophie De Baets, SOLID Parters, Brussels, Belgium (EUROPE) ABSTRACT Fiacial

More information

BEA Tuxedo. Using the CORBA Name Service

BEA Tuxedo. Using the CORBA Name Service BEA Tuxedo Usig the CORBA Name Service BEA Tuxedo Release 8.0 Documet Editio 8.0 Jue 2001 Copyright Copyright 2001 BEA Systems, Ic. All Rights Reserved. Restricted Rights Leged This software ad documetatio

More information

Goals of the Lecture UML Implementation Diagrams

Goals of the Lecture UML Implementation Diagrams Goals of the Lecture UML Implemetatio Diagrams Object-Orieted Aalysis ad Desig - Fall 1998 Preset UML Diagrams useful for implemetatio Provide examples Next Lecture Ð A variety of topics o mappig from

More information

BEA WebLogic Enterprise. Using the WebLogic EJB Deployer

BEA WebLogic Enterprise. Using the WebLogic EJB Deployer BEA WebLogic Eterprise Usig the WebLogic EJB Deployer WebLogic Eterprise 5.0 Documet Editio 5.0 December 1999 Copyright Copyright 1999 BEA Systems, Ic. All Rights Reserved. Restricted Rights Leged This

More information

CS 111 Green: Program Design I Lecture 27: Speed (cont.); parting thoughts

CS 111 Green: Program Design I Lecture 27: Speed (cont.); parting thoughts CS 111 Gree: Program Desig I Lecture 27: Speed (cot.); partig thoughts By Nascarkig - Ow work, CC BY-SA 4.0, https://commos.wikimedia.org/w/idex.php?curid=38671041 Robert H. Sloa (CS) & Rachel Poretsky

More information

n The C++ template facility provides the ability to define n A generic facility allows code to be written once then

n The C++ template facility provides the ability to define n A generic facility allows code to be written once then UCLA PIC 10 B Problem Solvig usig C++ Programmig Ivo Diov, Asst. Prof. i Mathematics, Neurology, Statistics Istructor: Teachig Assistat: Suzae Nezzar, Mathematics Chapter 13 Templates for More Abstractio

More information

The Magma Database file formats

The Magma Database file formats The Magma Database file formats Adrew Gaylard, Bret Pikey, ad Mart-Mari Breedt Johaesburg, South Africa 15th May 2006 1 Summary Magma is a ope-source object database created by Chris Muller, of Kasas City,

More information

From last week. Lecture 5. Outline. Principles of programming languages

From last week. Lecture 5. Outline. Principles of programming languages Priciples of programmig laguages From last week Lecture 5 http://few.vu.l/~silvis/ppl/2007 Natalia Silvis-Cividjia e-mail: silvis@few.vu.l ML has o assigmet. Explai how to access a old bidig? Is & for

More information

Custodial Integrator Automation Guide

Custodial Integrator Automation Guide Custodial Itegrator Automatio Guide Compay Cofidetial Custodial Itegrator Product Versio: V3.8 Documet Versio: 14 Documet Issue Date: April 21, 2017 Techical Support: (866) 856-4951 Telephoe: (781) 376-0801

More information

Elementary Educational Computer

Elementary Educational Computer Chapter 5 Elemetary Educatioal Computer. Geeral structure of the Elemetary Educatioal Computer (EEC) The EEC coforms to the 5 uits structure defied by vo Neuma's model (.) All uits are preseted i a simplified

More information

Descriptive Statistics Summary Lists

Descriptive Statistics Summary Lists Chapter 209 Descriptive Statistics Summary Lists Itroductio This procedure is used to summarize cotiuous data. Large volumes of such data may be easily summarized i statistical lists of meas, couts, stadard

More information

BEA elink Business Process Option User s Guide

BEA elink Business Process Option User s Guide BEA elik Busiess Process Optio User s Guide BEA elik Busiess Process Optio 1.2 Documet Editio 1.2 February 2000 Copyright Copyright 2000 BEA Systems, Ic. All Rights Reserved. Restricted Rights Leged This

More information

The number n of subintervals times the length h of subintervals gives length of interval (b-a).

The number n of subintervals times the length h of subintervals gives length of interval (b-a). Simulator with MadMath Kit: Riema Sums (Teacher s pages) I your kit: 1. GeoGebra file: Ready-to-use projector sized simulator: RiemaSumMM.ggb 2. RiemaSumMM.pdf (this file) ad RiemaSumMMEd.pdf (educator's

More information

Human-Computer Interaction IS4300

Human-Computer Interaction IS4300 Huma-Computer Iteractio IS4300 1 I5 due ext class Your missio i this exercise is to implemet a very simple Java paitig applicatio. The app must support the followig fuctios: Draw curves, specified by a

More information

System and Software Architecture Description (SSAD)

System and Software Architecture Description (SSAD) System ad Software Architecture Descriptio (SSAD) Diabetes Health Platform Team #6 Jasmie Berry (Cliet) Veerav Naidu (Project Maager) Mukai Nog (Architect) Steve South (IV&V) Vijaya Prabhakara (Quality

More information