Using the foo class from the previous tutorial as a base class, we are going to introduce a new class called fooed that inherits from foo. Here are the two classes without any methods.
Wednesday, June 29, 2011
Class Inheritance
Tuesday, June 28, 2011
OOP Recursive Decent Parsing III
we are going to use the Production class as the base class for each one of our productions. Polymorphism with the Production class will come in shortly. Now the most basic production we have here is number. It’s a terminal production and can be implemented quite easily.
Sunday, June 26, 2011
OOP Recursive Decent Parsing II
#include <istream> #include <deque> #include <locale> #include "Parser.h" /** * static functions */
Monday, June 20, 2011
OOP Recursive Decent Parsing I
First off we need to define what our parser is going to do; we need to a construct a set of terminals and non-terminals to work with, in other words a “grammar.” Let’s look at the following grammar.
Wednesday, June 15, 2011
c++ Combination and Permutation
#include <iostream.h>
#include <stdio.h>
#include <conio.h>
long int fak (long int x);
void main()
{
Monday, June 13, 2011
Sorting Data with Bubble Sort methods
Ordering is one of the basic process that is often discussed in algorithms and data structures. And one of the simplest classical algorithms in terms of sorting (sorting) is the Bubble Sort algorithm. In spite of some deficiencies which make these algorithms are not widely used in the sorting process in the application, but not be denied, this algorithm can be described as the pioneer of the sorting algorithm. Within the courses algorithms and Data structures in various colleges can also be included in the sorting algorithm using the Bubble concept as one of the subject.
Monday, June 6, 2011
Sorting By Insertion
Problem
Given the set of n numbers randomly sort them by the method of insertion.
input and output
N = an integer array of array [1 ...100] of
Integer
K, j, temp = integer
Algorithm
Subscribe to:
Posts (Atom)