Gazzie. An obsessed music freak. 18 years of age.^_^. Long brown/black hair. Easily entertained. Skinny. Loud. Acclaimed Prince Gaz by Arwen! Member of the Unfortunate Family Tree and Secret Keeper of it as well. Lives in America, unfortunately. Owner of an iPod Touch. Is glomped everday! Born into this [world] on 12/19/1989 as it seems it be, Sagittarius. Member of [Slytherin].
   

<< September 2009 >>
Sun Mon Tue Wed Thu Fri Sat
 01 02 03 04 05
06 07 08 09 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30


If you want to be updated on this weblog Enter your email here:



rss feed



 
Wednesday, September 30, 2009
Computer Science Notes v.9
Psuedocode Functionality

Variables
-Names of place to store values

Assignment
- Storing the value of an expression into a variable.

Output

Input

Repetition

Selection
-Making a choice to execute or skip a statement (or group of statements)

Selection
-Choose to execute one statement (or group of statements) or another statement (or group of statements)

NumberRead   number1    number2
3
                                55               70            55     70
                                  2                1               1       2
                                33               33            33     33
Data
3
55 70
2 1
33 33
numberOfPairs
3

C++ (AHHHHHHHHHHHHHHHHHHHHH)

#include <iostream>
using namespace std;

void main ()
{
   int numberread, number1, number2, numberofpairs;

   cout << "How many pairs of values are to be read";
   cin >> numberofpairs;
 numberread=0;

while(numberread < numberofpairs)
{
   cout << "Enter two numbers separated by a blank; press return";
 cin >> number1;
 cin >> number2;
if (number1 < number2)
 cout << number1 << " " << number2;
else
   cout << number2 << " " << number1;
 numberread = numberread + 1;
}
}

Top-Down Design

Top-Down Design
-Problem-Solving technique in which the problem is divided into subproblems; the process is applied to each subproblem.

Modules
-Self-contained collection of steps, that solve a proble or subproblem

Abstract Ste-
-An algorithmic step containing unspecified details

Concrete Step
-An algortithm step in which all details are specified.

Problem
-Create a list that....etc


Posted at 09:34 am by lemony

 

Leave a Comment:

Name


Homepage (optional)


Comments




Previous Entry Home Next Entry