 So last time it did not demonstrate the easy graphics programs, particularly the execution. Some of you would have had an opportunity to do your labs on Monday and Tuesday, and you would have thought if you looked at the sample programs and their execution. But most of us wouldn't have it. So I will very quickly demonstrate the execution of the sample programs that we have seen. And additionally, we will look at a feature which does not naturally exist in these windows, namely blocking points. We will use this feature to plot a graph of silence, just one arbitrary function I have chosen. We will then discuss some additional features. Continue to discuss in every lecture that I mentioned last time, a few important aspects of CC class-class programming, which we have not specifically discussed in the class. You will of course discover many more as you proceed with your projects. Some important ones will help you in the CC class. In this context, we will be discussing a simplified way of array initialization when you declare arrays. We will be discussing a new type, an abstract type called enumerated type. So an enumerated type is important wherever you want to give names to values rather than just integer values, ordinary integer to be used. And then finally, we will discuss the free process of macros which are very useful. In fact, we have been using them implicitly without perhaps putting understanding. And finally, we will discuss a new class, an abstract class called strings. We have been handling strings so far in our course using arrays which are non-terminated. So you put characters in an array and at the end of those characters, you put a backslash 0 and that case designated as a character string. Now, ordinarily we could have used any convention that we wanted, backslash 0 is not necessary. But if backslash 0 is used, then see-in, see-out statements can be used in convention with such arrays and they are able to extract strings from an input string automatically inside the backslash 0 or alternatively a non-terminated string that we output directly by saying see-out or non-arranged. Now that's the feature which we will write in the loop. Additionally, all building functions of the C type string I believe involve arrays which are non-terminated strings and that is what we will be using so far. However, as we try to use the object-oriented features of string class class, we discover that we could describe additional data types in terms of abstract classes and we could build class library. We have seen this in our introductory explanation to object-oriented program. Very specifically, we will be discussing the string class. In the coming Friday lectures, we will look at how we can define our own class, our own operations, our own member functions, our own member data types, etc., which possibly can be used very effectively in the approach. So, first of all, the ease and retouch, if you recall, I have discussed programs such as sample 1, sample 2, etc. But we had not seen the demonstration because we could not connect this machine to the projector. I have got another projector today. It's a small one but I think you will be able to see what happens when we execute these programs. So first, at this small window is the graphic window. So if I institute a program such as sample 2 for example, you will recall that it was drawing a window. We just said, hello, ease and retouch. And put a string inside, we said namaste CS, one of our students. So when you execute it, this is what will happen. The terminal will sort of hand because the control goes to the ease and retouch window that has been drawn. So you have to get the cursor back onto this monitor with this terminal and press control C to end it. If you see the other program, this asks for the height and width of the window. So let me this time give a window which is repeat by repeat. And let's say I want to generate some random point. So we call this program was generating random points. But the point was being approximated by a rectangle, a small rectangle as a point. And we were drawing these rectangles wherever the points were generated. So if say five points can be generated randomly. So if I say generate five points for example. So you will see these five points generated. I have added the label along with each point. I put this label. So this label says zero at nine comma two, one at so and so, two at this, three at this. So you will notice these small dots which are actually small rectangles are equal at the points. So that was one way of drawing points. Namely you draw a rectangle of a very small size. Yet we know for sure that this rectangle occupies much more than one pixel. In fact the number of pixels occupied on the screen will be equal to the number of pixels that come inside of it. This small dimension of height and width of that rectangle. So what else? There could be eight pixels, there could be sixteen pixels. What else? There will be spare number obviously. Which we want to figure out how to draw a point. Here is another program which was drawing lines of various types. So there are some black lines, there are some red lines. And the starting point and the end point of these lines. These are such that all the end points of the line, all the lines actually take some sort of a dot. So this is a kind of pattern or any kind of pattern that you can generate by drawing in number of lines. But what if you want to draw only this curve, not these lines. The curve is being given a shape because the lines that are drawn. Ideally when you plot a graph you just like to plot points. And that is what we need to see now. How do we do that? It is just double or more programs. This program draws various shapes. So again this program, the listing is there. We have greatly seen it. What this one does is it uses additional classes which have been defined in my view. So there was an internal shape class using which we drew the rectangle. There was a rendering line function. We could draw a line. But additionally we can draw squares, we can draw circles. And these are the possible features which will permit you to use ease and because to display whatever you wish to display. Now what we want to discuss is how do we draw a point in a better fashion. We saw that drawing a rectangle does give you a feeling of a point. It is not exactly a point. You would like to draw a point which is exactly one pixel wide. So let us look at this method. We try it once for the rectangle. We know how to render a line. Suppose we do a line from one point to itself. What do we draw? There is usually for a line there is a start point and an end point. And what the internal algorithm does is that it draws a series of points between the start point and end point. Such that it gives an inflation of a straight line. Now we know that the straight line is drawn by drawing a set of points. Therefore suppose we restrict this line to begin and end at the same point. We expect that one point should be drawn at that particular point. So this is an approximation that we can use. I have tried to use this for a graph. We draw this graph. We have to decide on the window size. We have to decide on x and y, x's. So let us say we stick to our 10-part rectangle as a circle. We would like to draw a diagonal window. Now we want to plot a graph of sin x. Any graph plotting should have usually x, x's and y-axis. Now we know the sign there. How it looks like. Sine x usually has positive values and negative values. And therefore it does not make sense to put our x, x's either at the top or at the bottom. We would like it somewhere in the center. Since it's a 10-part rectangle. So observe that this is 0 comma 0 and this is 10 comma 0 and this is 0 comma 10. This is the format of the endpoint of this window. We would like to draw an x, x's somewhere here. So let's say I have to draw an x, x's like this. Now what would be this? This can be done by drawing a line. And this line is to be drawn between each point. 0 comma 5 and 10 comma. So we got the x's like format for the x, x's if we draw. There should be draw y-axis. If we draw a graph with the left hand side border of the window itself, then x's may not be visible. So we might decide for example that we will remove a small distance, say a point bar or something and we would like to draw the y-axis like this. So this distance we will assume is let us say 0.1. All distances are in centimeters as depicted here. We still do not know what is the height and width of a pixel or what is the radius of a pixel. It is unknown. We in fact do not know what is the shape of a pixel. We know that this L by 10 window is directly made up as many pixels as that can be accommodated inside that thing. At this stage I would like to distinguish between what is known as vector graphics and what is known as raster graphics. I have indicated to you earlier the literals. Let me elaborate a bit further. Whenever we draw lines or rectangles or shapes of any kind, there we have some sort of a mathematical description of the shape. And we try to implement that mathematical description as an abstract class. Then such drawing is said to be vector drawing. Or raster drawing on the other hand plots individual pixels at designated positions. Now since there will be millions of pixels in whatever space that you have, plotting that is a time consuming effort. And that is why that kind of plotting is resorted to only when you are displaying a full color of a gray scale or a monochrome image which fits the entire screen and for which there is no functional description of where the points will be. The points come as pixel values from a digitizing. Observe that we had a sample program which took up an x3 f5 and displayed that image as it is. And that was called a bitmap. So there is a provision to display a bitmap. A bitmap essentially is a set of image pixel values stored in some kind of an array pressures. And in the low level graphic routine you just say here is an array containing pixel values. All pixels are covered in that window. Just display this entirely. In that case what the internal graphic routines do is that they pick up the pixels from the first row, the top row and keep plotting points than the next row and so on. They usually do not go plotting points arbitrarily. One here, one there, one there. So bitmap graphics which is closest to the last row graphics is titled as unit but is capable of plotting points at any place and to the left. Such bitmap graphics they cannot occupy the entire screen. As you shall see is a bitmap. The bitmap these two properties which are available can permit you to display small bitmaps. So you could create your own rectangular bitmaps say for example the face of a playing card or a face of a dice or any kind of shape that you want. You could draw it separately, digitize it and keep the pixels as you want with that bitmap. And then using these same windows last two graphics as a bitmap display, you could display that. However, the geometry in the graphics in the world is done using bitmap graphics. If you see all animations, modern animations against you will generally have some bitmaps which say represent some characters or features or something. Rest of it will be vectors. Particularly any movement like a car moving, a ball moving. In fact the animation goes to the extent of saying that if a ball is thrown and then it goes, hits the floor, jumps up, goes further etc. since that motion is dictated clearly by some physical laws and formulae. It is possible to incorporate those formulae in your model of graphics. And you can actually drive the motion of the ball exactly as per the physics does. That is the next high level things that you can do. Of course all these things are considered in a larger semester long course of graphics. What we are trying to do here is to understand just the basics of the graphics. So to conclude, you can have a last two graphics and a vector graphics. Most of the drawings that we do are vector graphics. But wherever we are putting bitmap images we typically use the last graphic feature in time. Coming back to this issue of plotting a sin x curve we have identified a window that we would like to draw. We have identified x axis and y axis dimensions. But this is not putting up. We still have to decide how the values of sin x will be plotted on this x and y axis. So let us do some more. This by the way is all paper work. And this is exactly what I meant when I said that whenever the problem is presented to you please don't start writing a program you say. A minimal paper work done here will almost always ensure that you get the program right in the first time without any thought. So we know for example our algorithm in our mind is now very clear. We first define a window which is deadlighted. Then we draw two lines. One vertical and one horizontal. We know the start point and end point of these lines. We call them x axis and y axis. So this much algorithm here was. Let us go further and say that now in this window I want to plot sin x. Now sin x as we know we have positive and negative values culminating into minus 1 and plus 1 respectively and we may match. How many sin values we would like to accommodate here? The best display would be available if we just restrict ourselves to display one cycle of cycle. Multiple cycles don't add any information to us because they are all limited to you. One particular cycle if you want to represent you will look something like this. Well this point will coincide with the end point. But effectively this is what we want to draw. Now we come back and examine how can we calculate sin of x given x. Suppose our formula is y is equal to sin x. What will be the values of x? The x will vary from let's say 0 over here I mean 0.1 but let me say 0 here and 10 here because it is 10. 10 units right whatever it is. Observe that I am still not counting in terms of pixels I don't care yet but the total distance over which I have to map x into sin x varies from 0 to 10. If I want to display one cycle of sin x in that 10 distance what should be the value of x here in terms of radians or angle? The angle is 360 degrees. This is 0 degrees, this is 90 degrees, this is 180 degrees, this is 360 degrees. The sin theta function which is part of the mathematics library will calculate sin theta if theta is given in radians So what it means is that 10 units for us is actually equivalent to 2 pi radians. So we say 2 pi radians is equal to 10. So we can calculate from this 1 radian will be equal to 10 divided by 2 pi and this will therefore be equal to 2 pi by 2. Oh sorry, this is the other way. How 10 units is equal to 2 pi? So 1 unit is equal to 2 pi by 10 or is equal to pi by pi. You will notice that when you write this and if two of you are discussing if I make a mistake you get corrected. But when you start writing a program directly at that time if you translate a formula in your mind this likelihood of error is greater. That is why as I said a whole lot of people will have to start writing before. Having done this now I will exactly what I have to do. I have to vary x from 0 to 10 in some steps. I may arbitrarily decide 0.001 in just a second. After all what any value of x I can calculate and at x I have to plot a point. I already know how to plot a point. I plot a point by saying just draw a line from that point to itself. I still need to take one more decision. This y will be an absolute value. So why will it be between what? Between minus 1 and plus 1. This is the range of values that y will have. But I want this plus 1 to coincide with what quality value minus 1 to coincide with what quality value. Well I am quoting you to a 10 by 10 term. I will obviously not like to get this side go all the way up here. Leaving some space around is what I don't like. Since this line is plotted at 5 minutes this is 0.5 in here. What I like to do is take 3 units on the top and you will set the bottom as the boundary range. So let us say I arbitrarily decide that I want to box the sine curve inside these two boundaries. And that means the ideal value that should be represented should be 2 units here. And the lowest value of minus 1 represented should be 8 units. So that means I want to translate this sine x curve which is between minus 1 and plus 1. I can multiply that value of y by 3 let us say. Then I will get the value between minus 3 and plus 2. And if I add 2 to 8, sorry 5 to 8 then I will get between 2 and 8. So this is roughly what I must do in that much. That means given x I have calculated x correctly because whatever is the value of x is between 0 and 10. I am deciding with myself. Whatever is the value of y I will map it between 2 and 8 so that I get a sine curve problem. So the sample 4 which was drawn in lines I have modified it to call it sample 4 dot, sample 4, 8 or something. Here I use e-sentimental type C as a standard radius for e-sentimental. Additionally I say C map because I need to calculate sine theta, sine. I define a 10 by 10 window. The title I give it is graph for sine x. I can give any title. Then I open that window. Check whether the window is properly opened or not. Define 14 point variables x and y to represent the two values that I have calculated. And let us say that to convert the value of theta into e-s. I have to plot y axis and x axis. So observe what I am doing. I am plotting it from a position 0.1, 0.1 to 0.1, 10 and 0.1, 5 to 10, 5. So basically I am leaving something aside on the left-hand side of the border of that window. Now I calculate the value of radius which is 5 by 5 because 2 pi should be equal to 10. So therefore I have put it like this. Now observe the iterative way in which I am going to generate the y. I am changing x from 0 to less than 10. Instead of 0.001, how many distinct values x will have in this process? 100,000, 10,000. 10,000. So basically in that small n-centimeter by n-centimeter window I am asking it to generate 10,000 points. I think points will come about because I do not know the distinct number of pixels. But there is no harm in trying. At the most what will happen is some pixel will get superimposed on some previous pixel. Why value will be calculated differently? And the y coordinate of the pixel may line it up into a new pixel rather than old pixel. We have no clue on the dimension, physical dimension at this point. The point is I do not care. As now there are points which are close together. Ultimately I know that when I translate this x, not this x into sin x, I should get a function given inside. So I have this iteration and for each value of x, I calculate sin of x for which I convert x into radians as appropriate between minus 1 and plus 1. So I scale it up to make it between minus c and plus 3 as we discussed. And now I do this famous plotting a point by doing a line. So I am saying the position that has been given. The x position is displaced by point 1 because really my x axis is starting from point 1. If I wanted I could have started this in that old new pixel or I could have modified it there. It is my choice here. The y position is displaced by point 1. Why? Because I want the entire sin x from minus c to plus 3 to come between plus 2 and plus 8. And that is why I displaced it by point. So when I render this line from this position to this position in let's say blue color, I expect to get a sin x plot. So we have just seen the indicator coming quite close. And you can see that the result is as expected. Why is it happening like that? Why is it possible? This is a sin x curve but unfortunately it starts at 180 degrees and now 0 degrees. It is going to the negative side. So the positive side is coming at the bottom just because of the graphic part. Anyway what I would like to do is I will circle 4 right out CPP also I will put it on the border. Now you can do the following as a trial exercise. The x axis and y axis has no neighbor. It doesn't say this is x this is y. Secondly it is bound to a 10 by 10 mechanism. Why should I do that? Depending upon the size of the window, I should be able to determine the start point and end point for my x. Similarly I should be able to determine that just getting that I require. Suppose it was a 15 by 15 mechanism or a 20 by 20 mechanism. Then my sin x curve unfortunately will be still not like that because it is written in absolute terms. And that is another reason I am trying to carry that whenever you are solving a problem, don't try to think that the specifications given in the problem in terms of values alone try to generalize them as much as possible so that the same program can work for multiple or different data points that you have. A larger problem which I believe some batches have been created as a project is a general graph plot where I want to plot not only sin x. I will say I want to plot cos x. I will say I want to plot something else. I should be able to take that function. And if I have a function definition myself, I will generate it. But there the harder problem is determine the bounds, determine the portion that you want to display and to ensure that the displayed portion occurs within the window that you have. Ok, next we look at certain features which were complicated from expressive discussion in the class but these are important features. We have been declaring arrays and generally the array initialization has been done to either include statement that you provide to calculus of the initialization of the values of the array elements or we assign them in an iterative fashion typically we don't want to assign them, let's say zero or any fixed class. In general it is a painful process to initialize arrays. C++ provides a simpler mechanism that when you define an array you could declare its initials in a way. And for example the first declaration here where I am trying to put the evaluation process called let's say C++. So we have five marks for business, five marks for assignment, twenty marks for mid state, thirty-five marks for project and thirty-five marks for it. So let's say I want to put this maximum marks for different evaluation and I could initialize an array. I could declare a car array initializing let's say model. I could declare a float array. If I don't define the size of an array which is ordinarily candidate but if I initializing it, the C++ compiler automatically takes the size to be equal to the number of elements that you provide. So if I define one, two and three elements that has size will be taken as if in all marks I give only three values that are not fine although I declare the size to be fine. Then if it's an integral type the value zero will be automatically put into the remaining value. And that feature we can do if we wish to initialize an array to all zero elements I can simply say opening, coming back, closing them in there. Without giving in there. The implication is that I don't give any value. All values are initialized to zero. Unspecified value. Value will be given in all. It is not possible to specify a value of 304 elements and let others be zero. In this case you have to express it which says he was zero for first and second elements and also otherwise that will not. So this is a simplification. You can use the same process for initializing two dimensional arrays, three dimensional arrays and you can put either turning values within one turning value to define individual dimensions or you can specify the values as a continuous sequence in a row major order. If you have multi-dimensional arrays the first row is specified with the second row and the third row is set. Here you can do abstract type which is quite useful for making your program meaningfully readable. It has no other value. Suppose I want to associate names with values and then define an enumeration type with general formatting. I use a tag which is the name. Some identifiers that I choose. These are followed by name, name, name, name, et cetera. List of names. The entire list of names which is explicitly listed that is why it is called enumeration. Enumeration is counting each one explicitly. So when I use this these names become the values for that type. For example I declare a type one month type and let us say I need values like jant, bar, apr, et cetera in a short form or I can give general order. Now these names are the values for the type one month. Obviously internally these names do not mean anything. Some value will have to be associated. So C++ chooses a convention that the first value will be considered to be equal to 0 the second equal to 1 or equal to 2 et cetera. In short, I am actually revaming constant 0, 1, 2, 3, 4, 5, 6 in one particular way for one type. I can define another type in which 0, 1, 2, 3 will get associated with a different name. Since I am using names, each of these names must be unique in the entire program. What it means is I cannot use these names as variable names elsewhere. Now can I use the type definition name month itself as a variable name. Now just as int is a type, root is a type, any of month is a type. And I can declare later any of month says date of birth month. I have date of birth in which I have date, month and year in terms of numbers. I will have to convert them to names which are being put and therefore I can say dop month is equal to Oc or October. Now October is one of the values. Please remember that all these names that I enumerate have a numerical value associated with it and therefore essentially they have integer type value. I do not use them for see in and see out in a normal cell. I will not get Oc to print out if I say see out dop month. It is interesting to see what happens when you say see out dop month. Can you do see in experiment and find out? In general input and output has to be in terms of integer now. But we know what are the integer values associated with these names and therefore we can do it out. It is not necessary that only sequential integer value 0, 1, 2, 3, 4 be associated with these names. You can associate values in a different order. You can associate a specified value or a particular name inside at least that you get. In which case the subsequent names get one value higher than what was prescribed last. Here is an example of that kind of usage. Suppose I define colors. I want to give names not colors. Notice that this is not very understanding. In the case of windows we already see that colors are human names. So when we saw the silenced plotting or drawing lines, drawings, listing, etc. We used to say blue, red, black. What are these? These are names which are defined as an enumerated type or colors. These are symbols as a very specific set of things for seven colors and those seven colors is what you can do in the drawing. Similarly, if I wanted I could define an enumerated set of colors as red, blue, black, yellow, etc. But I can say red equal to 3. If I say red equal to 3, the value associated with the name red will be 3. The next value associated with blue will be 4. The next value associated with black will be 5. Till I redefine something. I can redefine this value for example yellow equal to 0. In which case yellow will be set to 0. The next one pink will be 1. Green will be ordinary 2. But if I say green equal to 4, 4 will be associated with 3. It is permitted to associate the same numerical value with different names. That is your choice. In case you want, let us say shapes of a color, they have the same identification. This is the first name. In exactly which way you use it is your choice or style of color. Just remember it does not add to any computational operations of any type. The names only restrict you that you cannot use these names as variable names or error names or engineers later in your program. However, the programs may become more unique. Consider this. If I was drawing a rectangle with a color 4, I would not know what that color is. Or the color 7. Alternatively, if I decide to draw a rectangle with red color, I will have to know what that value already is. And that is why both for writing programs and for reading and understanding programs, it becomes far more meaningful if I use an appropriate and enumerated type and use the enumerated names wherever those values are given. So, consequently the parameters which are past food, later light or shapes like rectangle, etc. are actually the same sort of colors. But what gets passed internally and new is the corresponding value. Everything that we write at the beginning of our program which starts with a hash sign. So, hash into or hash defined. These are direct keys for the pre-processing. To recapitulate, ordinarily when I say c++, my cloud dot cpt, my program is compiled. But before compilation even begins, c++ still does what is known as pre-processing. Effectively it takes all the text files that you have written in your cloud dot cpt file and rearranges them as per the direct keys given by you. These direct keys usually cause some portions of some of your lines to be replaced by something else or something here. The hash into pre-processing command we have already seen, it will take a source code from some other file in your name and include it physically inside your code. So it is effectively a massive editor is working de facto on the program that you submit to c++ and that editor will replace lines, change lines, insert lines, etc. and create another source file which actually gets compiled. That is what is pre-processing. The pre-processing ordinarily says input this file, input that file, etc. in which case the text from those files gets included and the portion that comes in hash input. But there is an additional facility called pre-processing macro or dialectical macro. These are defined symbolic constants. I can choose a particular macro name and write a sequence of tokens. A token is any simple or set of symbols. So whatever I write here is one sequence. The effective meaning is that in my program if anywhere I use this macro name, then this macro name will be replaced completely lock-stopped by the list of tokens that I have used. So here is an example. And I have said Maxify and my MaxSize is 45,000. In field data MaxSize is a statement that I made in my program. Before this program is compiled, the c++ pre-processing will look at that macro and will replace the text before the compilation starts to make this field data 45,000. So this MaxData word is physically replaced by whatever string you have written. So that becomes 45,000. I will use this for example. Suppose I have five arrays to be declared. All of which have a size related to my problem size. And let's say the problem that is given to me is 45,000 size problem. So I will declare all those five arrays with 45,000. Now, if let me want to exchange this problem to say 50,000 lock. And let's say critical of memory. So 50,000 can be solved. But I will declare all my arrays with 45,000. In such a case what I will do is I will simply replace one defined statement with the top and MaxSize 45,000 and simply recompile my macro. It is not uncommon to have such a macro included or in a separately edited file. Call it some dot edge file. You have my header dot edge. And in my header dot edge you can define MaxSize 1, MaxSize 2, MaxSize 3, etc. And in your main program you declare all other dimensions, etc. using those size names. So when you say have improved my whatever dot edge. All these sizes will get included. Then the macro will recursively work on those definitions and edit your entire program again to replace those macros with appropriate statement. So this simplifies generalization of your program. This is not the only thing. Actually you are familiar with function definitions. I could write a single line function. There is also a motion of an inline function. Those of you who are interested can read that up. But essentially we know the function definition. A function definition called absolute value will calculate the absolute value of a variable. Whether it is negative it will calculate because minus of that value this positive will return that value. That's how we calculate absolute value. Suppose I don't want to use the mathematical function. Then I can calculate this absolute value by the statement. If x is positive the value is x. If x is negative the value is minus x. It is as simple as that. But suppose I have to do this absolute calculation really time. Now either I use a function or I can use a macro which is a parameter. So I can have parameter like that. Here I define a macro name. Then immediately followed by a motion bracket and write the same of parameters. And then I write the list of tokens as you saw. The list of tokens obviously will have some place one of the parameters appear. Now what the pre-processor does is it scans your entire text. And wherever this macro name appears followed by a bracket of actual parameters. It will take those actual parameters and it will replace that entire line by this token string. But replacing every occurrence of that parameter inside this list by the actual parameter that we have. This makes easy for you to write your own simple code which gets expanded automatically without having to write anything. For example suppose I have defined absolute x as x greater than or equal to 0 question mark. I am using a question mark. If the value of x is positive x is assigned as a result. If the value of x is negative minus x is assigned as a result. If I write this macro and they go in my program. I said there is equal to absolute y or n is equal to absolute x. Anyway in macro. Then automatically the pre-processor before giving the program some confirmation will replace this entire line. There is equal to y greater than or equal to 0 question mark y to less minus. Notice that this kind of writing will permit you to find out an absolute value of either an integer or a floating point number. Because that actual type of variables etc. don't enter into picture. It's a pure editor. So if y and z they are floating point this will be done as the floating point. If they were integers it will be done as the floating point. And it will not be an absolute. This is an example. You can write any complex formula like that. But please note that this replacement is replacement that the text will have. There is no semantic analysis being done. There is no validity for operations etc. being checked. That will be done by the compiler. So if you get a compiler killer saying that there is some problem with compiler by greater than or equal to 0. You should not feel worried whereas this comes from. Because I am not using this statement in my program. I use this statement. But effectively whenever you use this statement. It is as if you are using this statement with the parametrization. It's an extremely useful facility. I have many professional programmers who do that to define macro. So in shorter macros can be defined both with fixed token set which will be replaced in whatever text you have written. Or it will be parametrized in this way. You have to remember one thing. The bracket must come immediately after the macro. Suppose I give a space in between macro and the bracket. What could happen? Suppose I said define absolute brand. Open bracket x something something. You know what will happen? It will take the pre-processor. It will take the macro name to be absolute without any parameter. And it will take opening bracket x closing bracket as the first over. So independent of what you write. The moment you write z is equal to absolute in bracket y. Actually its expansion will be z is equal to in bracket x this this this. And then finally in bracket y. x does not exist in your program. You have to be very careful when you give parameterized macros. The beginning of the parameter bracket will be bracket. Must not have any brand between it and the bracket. Otherwise that bracket should be treated as a token. You discuss the string class and some simple operations. That happens with the string class. As I said the traditional handling of strings in C++ has been that I artificially create a baxar as 0 at the end of the set of characters which are stored in an array. And I take that as a string. And all my operations are centered around using that thing. However, then I have a full fledged object oriented parameter at my disposal. It is possible for me to define additional classes. Additional functionality for those classes. I define them in terms of additional data types or exact data types. One example of what has been provided by the C++ library is called the string library. So when it is library it uses its own representational string. It may use an array of baxar as 0 etc. But we are not privy to how the string is internally driven. However, it permits us to define a string of characters and it permits us to define several operations on strings as objects. So here is an example. I have to say include string. Please note this is different from saying include C string. The name C string is what we were including so far to use functions like string length etc etc. And that is because those are all functions. What is known as the classic C style character string represented by arrays with baxar as 0 here. Whereas string library is pure nature string. It is this string library which permits us to use strings as objects and perform operations on those objects using operations that have been defined in this class which is different from the native operations or the C string library objects. So here are the definitions of string variable. I can simply say string is equal to str1, str. When I say str1 is equal to computer I am assigning a string to this variable. Note that this is not an array of character. This is a variable of type string. In another variable of type string I can simply say str2 is equal to program. Since these are type variables of the appropriate type the operators including the string operators C in and C out are coordinated to operate upon this. It is part of the string library. So when I say C out string1, black string2 I will get some people black programming which is written out of the C out. What is the most crucial operation that I would like to do on these strings? I will like to concatenate these strings. So I have first string last string. I will prepare a single string which includes first string and last string more. How do I do this concatenation in C type of strings? The way I do it is I will say the first string from the first string array when I say 1 by 1 then I reach the tax line signal of the first string. I stop there and I start the second string till I reach the tax line signal of the second string. So this is what I will be able to do. Deploying two different follow-ups copying these things, maintaining index for the third array, simply etc. However, in an object-oriented paradigm if I have a class of strings and the class has also defined certain operations called concatenation. I can do that all. The standard C++ string class library uses the plus symbol as a concatenation of it. It is added to value. Here the interpretation is I am actually adding second string to first string. It is not in terms of mathematical addition but tax-tap was in the second string in front of the first string. And therefore the plus symbol you say is just defined by the design itself. I can define this symbol to be in this object. They have used the first object. Whenever you are doing something additional to whatever the symbol much only means then that is probably str1 str2 and a first string str3. I assigned str1 as to say in my book str3 is equal to str1 plus str3. So now the automatic addition is in there. The plus symbol is used as an overloaded object. That is why the title says overloaded class. But this will probably concatenate these two strings in a variable called str3. I can actually output that variable. And so clearly when I output that variable the output that I will get will have a low bar, low blank say str3 equal to this str3 is equal to str1 plus a string containing 100 plus s because I can concatenate a string constant so I know the string there is. So a string constant in short is anything that appears on the table top. It will come from a single guide number. It's a string. Some of the things that we can do the richness of these things some of these actions we proceed further. But we will see how we ourselves in general is expected to extensively use the system piece that we have done in the program in terms of classes. In fact, let's say we are modeling that we are modeling that we are modeling the entity class in the modeling paradigm and in the program we actually neglect a class. In the entity model we describe only the attributes of the class in C plus class we go one step forward. The model we describe are actually groups which are known as data elements or member elements of the class but you additionally describe the functions which will operate and the functions which can be able to do some passive processing between class. We should study that in a class in class.