Wednesday, October 27, 2010

Using Visual Studio

Microsoft Visual C++ (often abbreviated as MSVC or VC++) is a commercial integrated development environment (IDE) product engineered by Microsoft for the C, C++, and C++/CLI programming languages. It has tools for developing and debugging C++ code, especially code written for the Microsoft Windows API, the DirectX API, and the Microsoft .NET Framework.

Using DevC++

Dev-C++ is Free Software distributed under the GNU General Public License.
This means you are free to distribute and modify Dev-C++, unlike most Windows software! Be sure the read the license. 



 


Download DevC++

Wednesday, October 13, 2010

Structure Chart

Intro

A structure chart is a top-down modular design tool, constructed of squares representing the different modules in the system, and lines that connect them. The lines represent the connection and or ownership between activities and subactivities as they are used in organization charts.

Sample

Flow chart and Pseudocode

Flowchart:

A flowchart is a type of diagram, that represents an algorithm or process, showing the steps as boxes of various kinds, and their order by connecting these with arrows. This diagrammatic representation can give a step-by-step solution to a given problem. Data is represented in these boxes, and arrows connecting them represent flow / direction of flow of data. Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields

Name the four flowchart structures :

1. Sequence
2. Selection
3. Repetition
4. Case

Symbols of flowchart

A typical flowchart from older computer science textbooks may have the following kinds of symbols:

Start and end symbols
    Represented as circles, ovals or rounded rectangles, usually containing the word "Start" or "End", or another phrase signaling the start or end of a process, such as "submit enquiry" or "receive product".

Arrows
    Showing what's called "flow of control" in computer science. An arrow coming from one symbol and ending at another symbol represents that control passes to the symbol the arrow points to.

Processing steps
    Represented as rectangles. Examples: "Add 1 to X"; "replace identified part"; "save changes" or similar.

Input/Output
    Represented as a parallelogram. Examples: Get X from the user; display X.

Conditional or decision
    Represented as a diamond (rhombus). These typically contain a Yes/No question or True/False test. This symbol is unique in that it has two arrows coming out of it, usually from the bottom point and right point, one corresponding to Yes or True, and one corresponding to No or False.  


With flowcharting, essential steps of an algorithm are shown using the shapes above. The flow of data between steps is indicated by arrows, or flowlines. For example sequence type of flowchart :



Pseudocode :


The purpose of using pseudocode is that it is easier for humans to understand than conventional programming language code, and that it is a compact and environment-independent description of the key principles of an algorithm. No standard for pseudocode syntax exists, as a program in pseudocode is not an executable program. Pseudocode resembles, but should not be confused with, skeleton programs including dummy code, which can be compiled without errors. Common key always used are following : START, READ, SET, COMPUTE/CALCULATE, DISPLAY, END.

Flowcharts can be thought of as a graphical alternative to pseudocode

Example : Repetition flowchart

 

Example : Selection flowchart
 

Example : Pesudocode


Repetition
Selection
 




Problem Solving Skills


 Step 1:

Read the problem, analyze the problem, well-understood what the problems are.

Example :

User enters two numbers. Identify which the bigger number between those two numbers. If nom1 is greater than nom2 then display “First Number entered is bigger”. Else display “Second Number entered is bigger”

Step 2 :

Draw the flowchart and pseudocode, or either one



Step 3 :

Convert flowchart or pseudocode into C++ program.

 
Copyright © C++ Lab