Program Termination and Return Codes
In the world of computer programming, programmers develop computer applications with a beginning, middle, and an end. In this commentary, we shall concentrate on the end of the program, or more specifically, how the program ends. In programming, the end of the program is better known as the Program Termination and there are three types of termination. The three types of program termination are Normal Termination, Abnormal Program Termination, and Return Codes.
Normal Termination
The ideal termination of a program is a normal termination, which simply means that the program has concluded the way it was intended to conclude. This also means that there were no errors during the program execution.
Abnormal Program Termination
The most undesirable end to a program is an abnormal program termination. An abnormal termination means that the program did not end how the programmer intended. Instead, this means that the program failed due to some type of error.
Return Codes
The return code of a process in computer programming is a small number passed from a child process (or callee) to a parent process (or caller) after it has finished carrying out a particular process or assigned job.
In Java, the System.exit(int rc) is utilized the program termination. This code will automatically and immediately end any program that is currently running. This program termination can be utilized as both a normal termination strategy and an abnormal termination strategy, because it ensures an instantaneous conclusion to any program that is online. System Exit is a useful return code that can be utilized at any point when attempting to end a program.
In C++, return codes similar to those utilized in Java are utilized to ensure that a program is being properly executed. In this language, there are numbers set aside to symbolize each of the many exit codes. An example is subscript 1, which identifies all simple errors like dividing by zero, while subscript 128 defines an illegal argument against exiting the program. With these codes, both abnormal and normal program termination can happen.
In Visual Basic, the main strategy for return codes is the return sequence. If it is the programmer’s desire to end a program, regardless if the termination is normal or abnormal, then they shall simply enter the return or return expression (“Return Statement (Visual Basic)”). Both of these codes will work and the only parameter that the programmer must identify is whether or not the program or a particular sequence in the program has to be modified. It is essential to remember that the return code is affected by whichever procedure is being used. In a Sub or Set procedure, the Return statement is the equivalent of an Exit Sub or Exit Property statement, and the expression must not be contributed” (Ibid). Even though the return code can be utilized for a variety of program situations, the code must be provided in the correct context in order to properly terminate the program, regardless if it is abnormal or normal.
Total Pageviews
Monday, May 16, 2011
Program Errors
Program Errors
In the world of computer programming, programmers develop computer applications that are intended to perform certain operations and without inaccuracies. In most cases, it will take a programmer more than a single attempt to fabricate a program with no errors or “bugs” as they are known in programming. In the following commentary, we shall focus on three types of program errors that occur in computer programming. The program errors we will address are Design Errors, Syntax Compilation Errors, and Semantic Run-Time Errors. In addition, we examine who three different programming languages address these different errors. The programming languages we will examine are JAVA, Visual Basic, and C++.
Design Errors
Design errors in programming are the more complex errors in programming because they indicate that there is a flaw in the overall scheme of the program and generally affect the overall outcome of the program. To put it simply, the program produces a result that is not the result it was intended to produce. For example, a program may be written to identify all employees over 50, but instead it identifies employees who are female. Design errors in all three programming languages are programming errors.
Syntax Compilation Errors
Syntax Compilation Errors in programming are errors in the syntax of an order of characters or tokens of the given programming language. In most cases, an integrated development environment (IDE) or compiler catches the program’s syntax errors.
In JAVA, the compiler catches the syntax error and then it will issue an error message that includes the syntax that contains the error.
In Visual Basic, the program code is checked as it is typed in the Code Editor window. If an error is made, such as misspelling a word or using a language element improperly, Visual Basic will alert the programmer.
In C++, the compiler catches the syntax error and provides the line number where the actual error occurred and an error message.
Semantic Run-Time Errors
Semantic Run-Time Errors in program are errors that occur when the program is executed or executing and results in the program stopping completely without producing a result.
In JAVA, the run-time errors are handled just like the syntax errors with the exception of involving the compiler since the program would have already been compiled. When the program crashes, JAVA will display the line number of where actual crash took place. In some cases, the line displayed may identify where the error took place, but not necessarily the line of the actual problem.
In Visual Basic, for run-time errors, custom errors can be generated of any data type, including Exception objects. This is carried out by utilizing the “Throw” statement. The error number and message of a caught exception to identify the error are usually displayed, but if an error is not caught, the program terminate.
In C++, the run-time errors are handled just like the syntax errors with the exception of involving the compiler since the program would have already been compiled. When the program crashes, C++ will display the line number of where actual crash took place.
In the world of computer programming, programmers develop computer applications that are intended to perform certain operations and without inaccuracies. In most cases, it will take a programmer more than a single attempt to fabricate a program with no errors or “bugs” as they are known in programming. In the following commentary, we shall focus on three types of program errors that occur in computer programming. The program errors we will address are Design Errors, Syntax Compilation Errors, and Semantic Run-Time Errors. In addition, we examine who three different programming languages address these different errors. The programming languages we will examine are JAVA, Visual Basic, and C++.
Design Errors
Design errors in programming are the more complex errors in programming because they indicate that there is a flaw in the overall scheme of the program and generally affect the overall outcome of the program. To put it simply, the program produces a result that is not the result it was intended to produce. For example, a program may be written to identify all employees over 50, but instead it identifies employees who are female. Design errors in all three programming languages are programming errors.
Syntax Compilation Errors
Syntax Compilation Errors in programming are errors in the syntax of an order of characters or tokens of the given programming language. In most cases, an integrated development environment (IDE) or compiler catches the program’s syntax errors.
In JAVA, the compiler catches the syntax error and then it will issue an error message that includes the syntax that contains the error.
In Visual Basic, the program code is checked as it is typed in the Code Editor window. If an error is made, such as misspelling a word or using a language element improperly, Visual Basic will alert the programmer.
In C++, the compiler catches the syntax error and provides the line number where the actual error occurred and an error message.
Semantic Run-Time Errors
Semantic Run-Time Errors in program are errors that occur when the program is executed or executing and results in the program stopping completely without producing a result.
In JAVA, the run-time errors are handled just like the syntax errors with the exception of involving the compiler since the program would have already been compiled. When the program crashes, JAVA will display the line number of where actual crash took place. In some cases, the line displayed may identify where the error took place, but not necessarily the line of the actual problem.
In Visual Basic, for run-time errors, custom errors can be generated of any data type, including Exception objects. This is carried out by utilizing the “Throw” statement. The error number and message of a caught exception to identify the error are usually displayed, but if an error is not caught, the program terminate.
In C++, the run-time errors are handled just like the syntax errors with the exception of involving the compiler since the program would have already been compiled. When the program crashes, C++ will display the line number of where actual crash took place.
Program Test Data
Program Test Data
When designing applications, one of the programmer’s most important responsibilities is to ensure the program functions the way it is intended to function. In order to ensure this functionality, the programmer must run a series of tests on their application to ensure maximum efficiency. If any anomalies arise in the testing, it can result in then the application freaking out and completely crashing or just not doing anything. In order to run these series or tests, the programmer must utilize a variety of test data. Utilizing the test data should reveal flaws in the program and enable the programmer to make the necessary adjustment to the program.
To examine these tests further, the following commentary shall compare the testing methods for the following programming languages: Visual Basic, Java, and C++. The different types of tests that we will utilize in ensuring the efficiency of the program are Limits or Range Testing, Max or Min Data Type Testing, and Logic or Selection Testing All Paths. Each test serves its own specific purpose and each of the three types of testing strategies test a different area of the designed program. This type of multi testing ensures the program will run at its optimal ability.
Limit/Range Testing and Max/Min Data Type Testing
In all three of these programming languages, the programmer must declare variables to validate the data that is entered into the application. For example, the application can prompt a user for an input of True or False and if the user supplies the number 100, then the application is probably going to freak out and not do what it is supposed to do. In this case, the data type for this input has to be set as a Boolean. A Boolean data type only accepts values equal to True or False. For numeric data types, the declaring of variable would provide the range of numbers that can be entered into the input. Each programming language has its own data types. Java has only three groups of data types, which are Numeric or Integer, Character, and Boolean. Visual Basic has 11 data types, which are Boolean, Byte, Currency, Date, Double, Integer, Long, Object, Single, String, and Variant. C++ has 9 data types, which are Bool, Char, Short, Int, Long, Long Long, Float, Double, and Long Double.
Logic Testing All Paths
Logical testing is a technique of testing software that tests internal structures or workings of an application, as opposed to its functionality. The three programming languages each have a number of ways to test the logical failures, but they all utilize an Integrated development environment or compiler. This means that the programmer will know of any logic errors as soon the syntax is evaluated in the integrated development environment or compiler.
This again proves that even though a programmer wants to release their great application to the world, it is imperative that they take the time to test all aspects of the program to ensure the end user gets what they pay for.
When designing applications, one of the programmer’s most important responsibilities is to ensure the program functions the way it is intended to function. In order to ensure this functionality, the programmer must run a series of tests on their application to ensure maximum efficiency. If any anomalies arise in the testing, it can result in then the application freaking out and completely crashing or just not doing anything. In order to run these series or tests, the programmer must utilize a variety of test data. Utilizing the test data should reveal flaws in the program and enable the programmer to make the necessary adjustment to the program.
To examine these tests further, the following commentary shall compare the testing methods for the following programming languages: Visual Basic, Java, and C++. The different types of tests that we will utilize in ensuring the efficiency of the program are Limits or Range Testing, Max or Min Data Type Testing, and Logic or Selection Testing All Paths. Each test serves its own specific purpose and each of the three types of testing strategies test a different area of the designed program. This type of multi testing ensures the program will run at its optimal ability.
Limit/Range Testing and Max/Min Data Type Testing
In all three of these programming languages, the programmer must declare variables to validate the data that is entered into the application. For example, the application can prompt a user for an input of True or False and if the user supplies the number 100, then the application is probably going to freak out and not do what it is supposed to do. In this case, the data type for this input has to be set as a Boolean. A Boolean data type only accepts values equal to True or False. For numeric data types, the declaring of variable would provide the range of numbers that can be entered into the input. Each programming language has its own data types. Java has only three groups of data types, which are Numeric or Integer, Character, and Boolean. Visual Basic has 11 data types, which are Boolean, Byte, Currency, Date, Double, Integer, Long, Object, Single, String, and Variant. C++ has 9 data types, which are Bool, Char, Short, Int, Long, Long Long, Float, Double, and Long Double.
Logic Testing All Paths
Logical testing is a technique of testing software that tests internal structures or workings of an application, as opposed to its functionality. The three programming languages each have a number of ways to test the logical failures, but they all utilize an Integrated development environment or compiler. This means that the programmer will know of any logic errors as soon the syntax is evaluated in the integrated development environment or compiler.
This again proves that even though a programmer wants to release their great application to the world, it is imperative that they take the time to test all aspects of the program to ensure the end user gets what they pay for.
Translating PDL – Program Design Language into QBASIC Code in Programming
Program Design Language, also referred to as PDL for short, is a common technique for fabricating and detailing different systems and operations in software. Program Design Language can be associated to pseudocode, except that Program Design Language is devised in basic language, minus the terminology that would indicate that a programming language was utilized. Some of the common terms utilized in Program Design Language are ASSIGN, WRITE, DISPLAY, PRINT, COPY, DELETE, IF, ELSE, OTHERWISE, LOOP, and WHILE.
QBASIC is an integrated development environment, or IDE for short, and interpreter for an alternative of the BASIC programming language, which is based on QuickBASIC. Programming code that is entered into QBASIC is compiled to a transitional form and then this transitional form is instantaneously interpreted on demand within QBASIC. Some of the common terms utilized in the QBASIC programing language are INPUT, LOOP, ANSWER, LEFT, WHILE, UNTIL, FOR, NEXT, IF and THEN.
Translating Program Design Language to QBASIC, in most cases, should be a rather simple process. This especially true because the two have very similar attributes. As mentioned earlier, Program Design Language is a plain English programming language and QBASIC is a very high-level programming language, which means it is pretty much English. Some common terms that both these languages share are words like IF, ELSE, END, and RETURN. Since the two languages are so close in comparison, translating the would involve taking the code written in Program Design Language and finding the correct the terms in QBASIC that are correlated to the action you are complete.
Translating PDL – Program Design Language into QBASIC Code outside of Programming:
The concept of translating Program Design Language to QBASIC is a concept that people can apply in a variety of areas outside of the programming world. Since there are a number of environments that the concept of translating Program Design Language to QBASIC can be applied, we shall utilize a business world example best correlate the concept of translating to the world outside of programming.
In the business world, maybe the finance department’s operational analysts need to put together a report called the “Daily Operating Report” for the company’s managers and directors to review on a daily basis. It is likely that there is a lot of financial detail, which would require a lot of paper space. Most of this detail would probably overwhelm a good number of the directors and managers.
Program Design Language, also referred to as PDL for short, is a common technique for fabricating and detailing different systems and operations in software. Program Design Language can be associated to pseudocode, except that Program Design Language is devised in basic language, minus the terminology that would indicate that a programming language was utilized. Some of the common terms utilized in Program Design Language are ASSIGN, WRITE, DISPLAY, PRINT, COPY, DELETE, IF, ELSE, OTHERWISE, LOOP, and WHILE.
QBASIC is an integrated development environment, or IDE for short, and interpreter for an alternative of the BASIC programming language, which is based on QuickBASIC. Programming code that is entered into QBASIC is compiled to a transitional form and then this transitional form is instantaneously interpreted on demand within QBASIC. Some of the common terms utilized in the QBASIC programing language are INPUT, LOOP, ANSWER, LEFT, WHILE, UNTIL, FOR, NEXT, IF and THEN.
Translating Program Design Language to QBASIC, in most cases, should be a rather simple process. This especially true because the two have very similar attributes. As mentioned earlier, Program Design Language is a plain English programming language and QBASIC is a very high-level programming language, which means it is pretty much English. Some common terms that both these languages share are words like IF, ELSE, END, and RETURN. Since the two languages are so close in comparison, translating the would involve taking the code written in Program Design Language and finding the correct the terms in QBASIC that are correlated to the action you are complete.
Translating PDL – Program Design Language into QBASIC Code outside of Programming:
The concept of translating Program Design Language to QBASIC is a concept that people can apply in a variety of areas outside of the programming world. Since there are a number of environments that the concept of translating Program Design Language to QBASIC can be applied, we shall utilize a business world example best correlate the concept of translating to the world outside of programming.
In the business world, maybe the finance department’s operational analysts need to put together a report called the “Daily Operating Report” for the company’s managers and directors to review on a daily basis. It is likely that there is a lot of financial detail, which would require a lot of paper space. Most of this detail would probably overwhelm a good number of the directors and managers.
Similar to the translation from Program Design Language to QBASIC, the operational analysts would need to translate all the financial data into language that is understood by the directors and managers. To do this, the he analysts would need to summarize the financial data and transform it into a report that would allow directors and managers to quickly read and easily understand the information. The report would enable the directors and managers to quick and educated decisions to help them sustain efficiently running departments. A prime example of translating some that is not readable to something that is readable.
Sunday, May 15, 2011
Solving Simple Problems Using Algorithms and a Program Design Language
Solving Simple Problems Using Algorithms and a Program Design Language in Programming
An algorithm is a series of meticulous directives for solving a problem in a predetermined amount of time. Algorithms are utilized to do calculations, data processing, and automated reasoning. An algorithm will begin with an initial start or input and then it will progress through each step, individually and sequentially, that is needed to arrive at the correct answer. Next, the algorithm will then produce the solution and, finally, the program will come to an end. In computer programming, algorithms can be expressed in many kinds of notation, including natural languages, pseudocode, flowcharts, programming languages or control tables. For the purpose of this paper, we will focus on flowcharts and pseudocode.
A flowchart is a schema that illustrates the algorithm, displaying the steps as boxes of various kinds, and their order by connecting these with arrows. Programmers utilize flowcharts in devising and detailing complicated processes. Similar to other diagram types, flowcharts help visualize the happenings and in so doing, help the programmer to comprehend a process, and perhaps enable them to identify anomalies.
Pseudocode is a synthetic and easy language that facilitates the development of algorithms for programmers. Pseudocode is a “text-based” detail (algorithmic) design tool. Pseudocode is designed to allow non-programmers to comprehend the code. Programmers often incorporate Pseudocode into the program above the written code. For the most part, it is like a comment that indicates what the piece of code is going to do. There are no real standards for the correct method for writing Pseudocode.
Solving Simple Problems Using Algorithms and a Program Design Language outside of Programming:
An algorithm is a series of meticulous directives for solving a problem in a predetermined amount of time. Algorithms are utilized to do calculations, data processing, and automated reasoning. An algorithm will begin with an initial start or input and then it will progress through each step, individually and sequentially, that is needed to arrive at the correct answer. Next, the algorithm will then produce the solution and, finally, the program will come to an end. In computer programming, algorithms can be expressed in many kinds of notation, including natural languages, pseudocode, flowcharts, programming languages or control tables. For the purpose of this paper, we will focus on flowcharts and pseudocode.
A flowchart is a schema that illustrates the algorithm, displaying the steps as boxes of various kinds, and their order by connecting these with arrows. Programmers utilize flowcharts in devising and detailing complicated processes. Similar to other diagram types, flowcharts help visualize the happenings and in so doing, help the programmer to comprehend a process, and perhaps enable them to identify anomalies.
Pseudocode is a synthetic and easy language that facilitates the development of algorithms for programmers. Pseudocode is a “text-based” detail (algorithmic) design tool. Pseudocode is designed to allow non-programmers to comprehend the code. Programmers often incorporate Pseudocode into the program above the written code. For the most part, it is like a comment that indicates what the piece of code is going to do. There are no real standards for the correct method for writing Pseudocode.
Solving Simple Problems Using Algorithms and a Program Design Language outside of Programming:
Algorithms and a Program Design Language are tools that one can apply in a number of places outside of the programming world. Now, even though there are a number of environments that the algorithms and a Program Design Language, we shall utilize the business world example and a personal life example to best correlate these tools to the world outside of programming.
In the business world, maybe department head would like to make a simple calculation to see how much an employee has earned for a specific pay period given the fact that the employee had worked a set number of hours. This problem would require an algorithm to calculate the applicable wages given the specific pre-existing circumstances. For the purpose of keeping things simple, the desired algorithm can be incorporated without requiring the addition of any pseudocode.
For the personal life example, maybe a student is attempting to determine their grade in a computer science class. The student could utilize a straightforward algorithm to determine whether or not they need to take the final exam to complete the class with an acceptable grade. Similar to the business world example, the pseudocode can be left out but an applicable algorithm would be necessary.
These are two prime examples of how the application of Algorithms and Program Design Language to answer simple problems in a non-programming environment.
In the business world, maybe department head would like to make a simple calculation to see how much an employee has earned for a specific pay period given the fact that the employee had worked a set number of hours. This problem would require an algorithm to calculate the applicable wages given the specific pre-existing circumstances. For the purpose of keeping things simple, the desired algorithm can be incorporated without requiring the addition of any pseudocode.
For the personal life example, maybe a student is attempting to determine their grade in a computer science class. The student could utilize a straightforward algorithm to determine whether or not they need to take the final exam to complete the class with an acceptable grade. Similar to the business world example, the pseudocode can be left out but an applicable algorithm would be necessary.
These are two prime examples of how the application of Algorithms and Program Design Language to answer simple problems in a non-programming environment.
Elementary Program Design Structure Model
Elementary Program Design Structure Model in Programming
In computer programming, the Elementary Program Design Structure Model is the most fundamental structure model. This very simple structure model is comprised of three basic parts, the setup (beginning), the process (middle), and the wrap up (end).
The initial part of this structure model is the setup. In the Setup part of the Elementary Program Design Structure Model, the objective is to declare the different variables needed and open the files necessary in RAM to execute the next step in the model. The setup occurs only once, and only at the start of the program.
The next part of the structure model is the process. In the Process part of the structure model, the objective of this part of the program is to execute the actual instructions of the program. This step is comprised of arithmetic expressions, loops, arrays, or logical expressions. The process may occur once, twice, or even more times until the objectives of the program have been achieved. The repetition of a process is called a loop, which means that the instructions shall be executed continuously until the process results in a desired outcome. At the process conclusion, the program moves to the final step in the model.
The final part of the structure is the Wrap up. Similar to the setup, the wrap up is simple and occurs only once in the program. In the Wrap up part of the structure model, any files opened in during the execution of the program are closed and RAM is freed of consumption.
Elementary Program Design Structure Model outside of Programming
The Elementary Program Design Structure Model is a concept model that can be utilized in a number of places outside of the programming world. Now, even though there are a variety of areas that the Elementary Program Design Structure Model can be applied, let us focus on one non-programming application.
In computer programming, the Elementary Program Design Structure Model is the most fundamental structure model. This very simple structure model is comprised of three basic parts, the setup (beginning), the process (middle), and the wrap up (end).
The initial part of this structure model is the setup. In the Setup part of the Elementary Program Design Structure Model, the objective is to declare the different variables needed and open the files necessary in RAM to execute the next step in the model. The setup occurs only once, and only at the start of the program.
The next part of the structure model is the process. In the Process part of the structure model, the objective of this part of the program is to execute the actual instructions of the program. This step is comprised of arithmetic expressions, loops, arrays, or logical expressions. The process may occur once, twice, or even more times until the objectives of the program have been achieved. The repetition of a process is called a loop, which means that the instructions shall be executed continuously until the process results in a desired outcome. At the process conclusion, the program moves to the final step in the model.
The final part of the structure is the Wrap up. Similar to the setup, the wrap up is simple and occurs only once in the program. In the Wrap up part of the structure model, any files opened in during the execution of the program are closed and RAM is freed of consumption.
Elementary Program Design Structure Model outside of Programming
The Elementary Program Design Structure Model is a concept model that can be utilized in a number of places outside of the programming world. Now, even though there are a variety of areas that the Elementary Program Design Structure Model can be applied, let us focus on one non-programming application.
The non-programming application that we will focus on is a family road trip. Like a program, a road trip takes planning and it has, or should have, a setup, a process, and a wrap up. The setup of the trip would consist of things like packing, printing a map, filling up the car with fuel, and identifying who is going. Failure to set everything up for the trip can result in a horrible trip, or even worse, having to cancel the trip because someone was left behind.
The process of the trip would be the actual road trip, which would consist of things like driving, eating snacks, and stopping for bathroom breaks. The process is crucial to the trip because if nobody drives, the trip would instantly end. Failing to stop for bathroom breaks would result in unwanted accidents and potentially end the trip.
The wrap up of the trip would consist of the arriving at the desired destination, unpacking, and enjoying in the actual destination. It is clear that the Elementary Program Design Structure Model can help ensure a successful family trip.
Program Hierarchy
Program Hierarchy in Programming:
The definition of hierarchy is a collection of items in which the items are symbolized as being above, below, or at the same level as one another. Essentially, hierarchy is an ordered set or a chart, which organizes objects, names, values, categories, etc. A hierarchy structure is a great tool for programmers to utilize because it facilitates the design and fabrication of a program or system. In addition, the organization of each chart features a graphical representation on how inputs operate in the program or system, how outputs are generated, and what steps or modules are crucial for the conversion between receiving inputs and generating outputs.
The definition of hierarchy is a collection of items in which the items are symbolized as being above, below, or at the same level as one another. Essentially, hierarchy is an ordered set or a chart, which organizes objects, names, values, categories, etc. A hierarchy structure is a great tool for programmers to utilize because it facilitates the design and fabrication of a program or system. In addition, the organization of each chart features a graphical representation on how inputs operate in the program or system, how outputs are generated, and what steps or modules are crucial for the conversion between receiving inputs and generating outputs.
The great features of a program hierarchy chart would be most useful to a programmer who is interested in illustrating and then evaluating the processes and sequences of his/her designed program. The process of illustrating and evaluating a program sequence initially necessitates that the main algorithm, the function, and rationale behind the actual program, be meticulously written out in either narrative form, or diagrammatic form, or utilizing a combination of the narrative an diagrammatic form. Once the primary algorithm has been defined, it is imperative that for the programmer to distinguish the required type of input data (the information that will go in to the program) and the anticipated type of output data (the information expected to be produced by the program). Linking these three components using a flow chart will fulfill the program hierarchy process and provide the programmer the precise overview of the program’s data flow of data as it relates to the program’s inputs and outputs.
Program Hierarchy outside of Programming:
The Program Hierarchy is not just confined to the world of computer programming, in fact, this system can be utilized in a number of areas outside of computer programming. Now, even though there are a variety of areas that the Program Hierarchy can be applied outside of programming, we are going to focus on only three areas (work, school, home) because of their strong resemblance to the data flow structure technique. In this example, the program hierarchy system would have the same advantages of data organization and identification to a business setting.
Program Hierarchy outside of Programming:
The Program Hierarchy is not just confined to the world of computer programming, in fact, this system can be utilized in a number of areas outside of computer programming. Now, even though there are a variety of areas that the Program Hierarchy can be applied outside of programming, we are going to focus on only three areas (work, school, home) because of their strong resemblance to the data flow structure technique. In this example, the program hierarchy system would have the same advantages of data organization and identification to a business setting.
In the business setting, a company may implement the program hierarchy to plan and pair the salaries for payroll every week. This would require incorporating the correct inputs (i.e. number of employees in the company and the number of hours worked by each employee) and entering the values into the main algorithm, which multiplies pay per hour, minus the applicable taxes and miscellaneous voluntary and involuntary deductions for every company employee.
In a school setting, a school administrator could implement the program hierarchy in discussing new strategies on how to best utilize money received from fundraising activities by identifying possible alternatives and how these alternatives will affect the school community.
In the home setting, a person can implement the program hierarchy to scrutinize the effects of doing household tasks to endorse a sense of self-reliance and to enhance their awareness of how much time is needed each week to fulfill the daily tasks.
Saturday, May 14, 2011
Systems and Program Mapping Tools
Systems and Program Mapping Tools in Programming:
One of the most essential elements involved in computer programming is the overall organization of the system or program. To facilitate the task of keeping programs or systems organized, programmers have three very significant and valuable tools. These tools are System Flow, Structure Chart, and Detail Program Logic and they are System and Program Mapping tools.
System Flow Chart
A System Flow Chart is pictorial illustration of the physical flow of information through the entire program or system. The System Flow Chart is most utilized in analysis and outline of the program or system. The chart consists of symbols, such as lines and other symbols, to symbolize the arrangements of processes within the system or program, as well as the inputs and outputs to a process.
Structure Chart
A Structure Chart is a design utensil that graphically illustrates the correlation between processing modules in a program or system. The Structure Chart also defines the hierarchy of components modules and the data that is exchanged between them and consists of an analysis of the input-to-output changes and an analysis of operation. In addition, a Structure Chart depicts the association of processing modules in computer software. The Structure Chart can also be considered is a design tool, which shows the connections between program modules and the system module that interrelates and illustratively depicts the information that is communicated between various modules.
Detail Program Logic
A Detail Program Logic is a diagram chart that displays the flow of the logic proceeding through the modules. The diagram also depicts the branching logic that is in the program. Through the use of this diagram, the programmer should be able to identify how the different logic effects the variables inside of the program.
Systems and Program Mapping Tools outside Programming:
The Systems and Program Mapping Tools are diagrams that are not just confined to the world of computer programming, in fact, these concepts can be applied in a number of areas outside of computer programming. Now, even though there are a variety of areas that the Systems and Program Mapping Tools can be applied outside of programming, we are going to focus on an instance that would benefit a great deal from logical and relationship charting.
The non-programming environment example we will on, is the daily operations of a business. Let us imagine an outside person has been asked to look into business whose daily operations are struggling and are in need of improvement. In most cases, businesses have organizational charts that are valuable tools to govern relationships between people and their obligations. These charts can also help identify any unproductive areas within the business, which can hinder the company’s capability to perform efficiently.
Using company’s organizational chart and a variety of other methods (e.g. interviewing employees, observing processes, etc.) the outside person could potentially identify areas of weakness, such as employees who report to multiple people or even employees who do not report to anyone. These examples could result in inadequacies in certain areas, which would then make the organization inefficient. After the outside person determines all the elements of the organization chart, the company processes, and the outliers that are the basis of the company’s inadequacies, the outside person can recreate the organizational structure to eliminate the relationships and processes that were hindering the company’s ability to perform at an acceptable level.
Cohesion and Coupling Concept in Programming
Cohesion and Coupling Concept in Programming:
In computer programming, Coupling, also known as dependency, is the extent of which every single module in a program is dependent on all of the other modules. Cohesion, on the other hand, is a measure of how strongly-related the operability communicated by the source code of a software module is. The program quality metrics of coupling and cohesion were the creation of Larry Constantine, who was one of the original developers of Structured Design. The two metrics of Coupling and Cohesion commonly transpire simultaneously. Together these concepts point out the characteristics a program module should have.
Coupling identifies the interconnections between the varieties of modules. For example, low coupling is indicative of a well-structured computer system and an effective design. Combining low coupling with high cohesion reinforces the overall goals of high readability and sustainability. Coupling can be "low" (also "loose" and "weak") or "high" (also "tight" and "strong"). Some coupling types are as follows:
Ø Content coupling (high)
Ø Common coupling
Ø External coupling
Ø Control coupling
Ø Stamp coupling (Data-structured coupling)
Ø Data coupling
Ø Message coupling (low)
Ø No coupling
In contrast, Cohesion illustrates how associated operations within a module are. For example, low cohesion infers that the module carries out tasks that are not really connected to one another, which means problems can arise as the module evolves. Cohesion is a qualitative metric that means that the source code syntax to be evaluated is examined using specific guidelines to establish a cohesion classification. Some Cohesion types are as follows:
Ø Coincidental cohesion (worst)
Ø Logical cohesion
Ø Temporal cohesion
Ø Procedural cohesion
Ø Communicational cohesion
Ø Sequential cohesion
Ø Functional cohesion (best)
Cohesion and Coupling Concept outside Programming:
The Cohesion and Coupling concepts are concepts that are not just confined to the world of computer programming, in fact, these concepts can be applied in a number of areas outside of computer programming. Now, even though there are a variety of areas that the Cohesion and Coupling concepts can be applied outside of programming, we are going to focus on just one because of its strong resemblances to software applications.
The non-programming environment example we will utilize to better explain the Cohesion and Coupling concepts is the workflow process. In the workflow process, weak coupling of actions will likely lead to a reduction in the information that must be exchanged between actions in the workflow process. In addition, a decrease in the probability of execution errors is to be expected. In contrast, people would comprehend and execute tasks that are vastly cohesive in a more efficient manner than they would if sizeable amounts of isolated work were being compiled together.
Since the formation of large activities would likely lead to a reduction in the level of coupling and the fabrication of smaller tasks will augment cohesion, high cohesion and loose coupling would likely produce the appropriate balance in the process to enhance both performance quality and sustainability of a workflow model.
Friday, May 13, 2011
Top-Down Design – Unitizing a Problem into Modules
Top-Down design in Programming:
Top-Down Design is a strategy that is developed with a focus on advanced analysis. Top-Down Design, also known as step-wise design, is a programming approach where programmers examine a program or system in its entirety and then meticulously analyze the every part of the program to acquire a better understanding of the compositional sub-systems that make up the program. Programmers then take these compositional sub-systems and analyze and refine them even more to reach the program’s fundamental elements. By taking this programming approach, which is the backbone of conventional procedural languages, programmers are able to effectively focus on a single module at a time, rather than the entire program at once. Programmers, essentially, transform the complex pieces of the program and then divide them into successively smaller pieces.
To write a program using the Top-Down Design, programmers utilize the method of writing a main procedure that identifies all of the key operations the procedure will need. The next step in this process is for the programmer or programmers to thoroughly examine the requirements of each operation and then replicate each of these steps. This process will ultimately lead to the grouped sub-routines executing the simplified procedures that can be simply and concisely coded. Once each of the different sub-routines is coded, the program will be ready for testing. Establishing how the program will collaborate at the high level, the lower level work can be independent. Identifying how the lower level concepts will assimilate into higher level concepts will clearly define the interfaces.
Top-Down Design outside Programming:
Even though Top-Down Design works great in the world of programming, the strategy is not confined to the world of programming. There are a variety of instances, outside of programming, where a person can apply Top-Down Design strategy. An example of where someone can apply Top-Down Design strategy would be in the preparation of a big dinner, such as Christmas dinner or Thanksgiving dinner. For many people, these dinners are very important their execution the execution of these dinners has to be perfect. In most cases, these dinners require a lot of food preparation. The person responsible for preparing the dinners usually has to prepare the main dish, a turkey or ham or sometimes both, and then a variety of side dishes, such as mashed potatoes, green bean casserole, pies, stuffing, etc.
Utilizing the Top-Down Design strategy in this process can aid in its successful completion. The person responsible for preparing the dinner can implement the strategy by dividing the dinner into portions based on the time it takes to prepare the item. It would probably be best to identify and separate the items that take the longest to prepare. Once all the items have been grouped and sorted, the preparer will need to gather the ingredients and utensils required to prepare each item. Once everything is in order and all items necessary are where they should be, the preparer can start the actual meal preparation one group at a time.
Subscribe to:
Posts (Atom)