 Hello, and welcome to the NPTEL course on an Introduction to Programming through C++. I am Amhiram Ranade, today we are going to continue our discussion of medium size programs and we are going to write a program which will be a graphical editor and solver for circuits. So I should point out, I should observe that computers are often used for designing various objects, circuits, mechanical objects, chemical plants and lots of other things. CAD, CAD or computer aided design systems employ graphical user interfaces which are often abbreviated as GUI. And you have already seen this in our IDE, there are buttons and you have to click buttons to tell the computer what you want to happen or you may also have menus. So our goal for today is to figure out how these things are actually implemented. And we will be doing a very, very preliminary, a baby computer aided design program using which will have a graphical user interface. And it will design and solve very simple circuits, but it will contain the germ of many ideas and you will be or you should be able to extend it to do more complicated things, even things which might be professionally useful. So let me just talk a little bit about the circuits that we are considering. So a circuit is made of components connected to each other at nodes. Here is an example. So in this example, these black disks, so by that I mean these things, this one, this one, this one are called nodes or we will call these nodes and components are current sources or resistors. So for example, this is a resistor, this is another resistor, this is what is called a current source. So you can have many, many other kinds of components, but as we said, this is a baby program and we are only going to consider these two components. Each component is connected between two nodes. As you can see, voltage sources, current sources are connected. So between these two nodes, we have a resistor and also a current source and between these two nodes, we have this resistor and so on. And when we say solving a circuit, what we mean is determining the voltages at the different nodes. So because current is flowing through these components, it will produce voltages or potentials at the nodes. And of course, there will be the question of how much current is flowing through each of these resistors. Or other components that may be there in the circuit. So when we say let us solve this circuit, we mean figure out what are the currents and voltages in it. So our program is going to be quite simple, very simplistic in fact and it will perform the job that I have described, but it will lack many features. The appearance will be functionally adequate, but it would not be elegant or beautiful. It would not draw for example, the circuit, the way you just saw it. It will be a little bit more schematic. But again, the point is to get started and the main ideas will be there and you will be able to build upon them if you wish. Yeah, so you can start with what we present and improve upon it and our goal is to illustrate the basic issues. And I also want to mention that this is going to be another example of medium size programs. So as we write it, you will get another example of how medium size programs have to be organized. So here is what we are going to do. I am immediately going to start off with a demo of our program. So I have written the program and I will show it to you and then we will see, I will lead you towards its design. So in the demo, we will actually use the program to design a very simple circuit and we will also use the program to solve the circuit that we design and then we will talk about the design of the program. So the program will consist of a main loop and then it will have some data structures and we will discuss how the functionality is divided between the data structures and the main program. And as I said, the organization will follow sort of the general principles that we have been talking about as far as designing medium size programs is concerned. So what have we discussed so far? So we have said that CAD or computer rated design is an important application of computers. Computer based design programs often use graphical user interfaces because these are very convenient. You see what you are doing and pictorially seeing something is very convenient and very, so it tells you exactly what is going on in a very nice way. We are going to design a baby CAD program which will be useful for designing and solving resistive circuits. In particular circuits which contain resistors and current sources. And next I am going to show you a demo of the program but before that let us take a quick break.