[Music] okay so in addition to what we discussed earlier for the problem analysis so again we have the problem it starts the problem and then we analyze the problem after analyzing the problem we we perform the algorithm by using either sudhold or flowchart once we implement the algorithm we can already do the coding using the c so when we coded in c plus plus okay so again we are going to perform and use preprocessor directive and then the compiler will compile it okay to test if there are syntax errors so again if there are errors
we edit the code or we debug it and then go and proceed again preprocessor and then go back to the compiler and on this case if the compiler have no syntax errors already okay again it will perform and create an executable code using the linker and the loader and finally it will execute okay so again if it's executed and we have errors meaning this error is not really the syntax error but rather the um logical error okay we can already do the coding or again we can perform the analysis what's uh the problem when we
code or there are maybe there are still problems logically like for example if you use the logical operations or the comparison operators incorrectly so you need to perform again the algorithm design before you do the holding but if there are no problems during the execution that means we can actually get the correct results okay so again if you have any concerns or challenge with this particular topic you may consult me during our time and during our my consultation time okay so again you need to thoroughly understand the problem and then you understand also the problem
requirements okay so let's say for example um the require user interaction how are you going to manipulate the data and what is your expected output okay then if the problem is very complex you need to divide it into sub problems and then when you divide it into sub problems you go back to understanding the problem requirements okay so you need to again uh require what's the user interaction how are we going to manipulate the data and for each sub problem sub problems what must be the output now if problem was broken into sub problems he
can also perform and design algorithm for each sub problem then if all those sub problems are okay and correct you can actually uh test the algorithm those all are algorithms for a sample data okay and most of the time at some time most of the time you need to use mathematical analysis okay so again once the algorithm is designed incorrect and you already verify it by using your algorithm you can already write the equivalent code in high level language using c plus of course this time of course you need to enter the program using the
text editor of that particular compiler so again make sure that uh you can actually get this uh bloodshed a bloodshed devc plus plus for free in the internet so again we use blood shed dev c plus plus and then you get the version eleven point something okay okay so once you enter the code to that to an editor you can actually run the code through the compiler again compiler will translate it automatically into machine language so if the compiler generate error errors so that means you need to look at the code and remove those errors
so again you go back to the editor and then you debug it and then run again the code through the compiler so hopefully when there are no syntax error already you can actually generate the equivalent machine code and then the linker machine code uh will create the dot xfi for you okay and then once we already created the that xa or the uh memory for execution we can already execute the program okay so again the compiler guarantees that the program follows the rules of the language or the keywords like for example in c plus plus
we use c out and c in right so that's actually the language of cps class okay so take note that compiler does not guarantee that the program will run correctly because as mentioned a while ago okay it is syntactically correct but when we already execute and run the code and we input something on the code or we import a data on that particular problem and the result is incorrect it's not anymore a syntax error okay and that is actually what we called a logical error okay so by next meeting i'm going to give you an
example of this on how to perform an algorithm in uh using flowchart and so to code okay and then i'll be giving you also the discussion of the basic c plus plus elements already so and how are we going to perform this example in a flowchart in suitable okay so this one i'm going to give this this and this all right although here's already the equations but how are we going to make use of an algorithm and how are we going to use the c plus plus containing this syntaxes or these keywords in c plus
plus okay now let's proceed to programming methodologies so there are two popular approaches to program design we call it structured design and object-oriented design so mostly cs126-8 will use structured design okay so structure decide design is actually dividing a problem into smaller sub problems so for structured programming we use what we call the word functions so this is on week 10 or week 9 okay user defined function okay so it implements a structured design when you say structured design the approach is actually from top to bottom okay then stepwise refinement so it's like uh the
associativity is always from left to right and then it can perform also modular programming as mentioned a while ago we call it as a function right while object-oriented programming identifies components called objects and specify relevant data and possible operations to be performed on that data so in this case um for object oriented programming instead of using function they use methods okay so when you say object-oriented programming okay it implements ood ood stands also stands for object-oriented programming language okay actually c plus plus is both structured and also was designed to implement the object-oriented uh programming
once you finish cs126-8 okay and you pass the subject for one two six continue to one to seven you will be able to differentiate already the structured to object oriented since on 127 we are going to perform and discuss some of uh some of an object-oriented syntaxes for c plus plus okay so again and see i saw a standard c plus flash and she stands for american national standard institute while iso is international standard organizing short so again c plus plus evolved from c c language was uh designed by dennis ricci while c plus plus
was designed by john strauss bell laboratories c c plus plus programs were not always portable from one compiler to another so many to see there are different types of compiler for c plus plus okay so not all compilers will be portable when you um like for example you use vishwa c plus plus and then you were going to uh transfer it into bloodshed or blood bloodshed fc some compilers are not always the same right when you run and execute the program say for example i use void main syntax because i use visual c plus plus
okay so visual studio c plus plus accepts void mean but for dev c plus plus void is not accepted for the mean okay so that means again c plus plus or not always portable from one compiler to another and then in mid 1998 the ansi and the iso organization play standardized c plus plus language okay so that's our chapter one in summary we discusses um the [Music] computer systems as hardware and the software and then the computer we define the computer the central processing you need the primary storage and the operating system okay and then
we discuss as various kind of languages such as machine language assembly language and high level we also discussed the algorithm and you already identified two types of algorithm which is the future in the code and how we solve problem solving in three steps and then we also defined and differentiate the structure design tool and object oriented design [Music] you