SlideServe
Menu
Préférences
© SlideServe · v2026

310201 Fundamental Programming

gaia avatar
16 diapositives · 411 Views · Jul 16, 2014

310201 Fundamental Programming. Final Review. The place of programming. The software development life cycle Analysis of problem Specification Design of algorithm Coding of program Testing and Debugging Documentation Maintenance. The five types of statement. Input Output Assignment

310201 Fundamental Programming - slide 1
01 / 16310201 Fundamental Programming
1 / 17

Télécharger la présentation

310201 Fundamental Programming
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. 310201Fundamental Programming Final Review

  2. The place of programming • The software development life cycle • Analysis of problem • Specification • Design of algorithm • Coding of program • Testing and Debugging • Documentation • Maintenance

  3. The five types of statement • Input • Output • Assignment • Selection • Repetition

  4. Selection • If … Else … • Switch

  5. if-else statement if ((Age < 18) && (Sex=‘M’)) { cout<<“A male child“<<endl; } else { cout<<“A male adult“<<endl; }

  6. Switch statement switch ( CharMenuSelection ) { case 'a': case 'A': ProcessSelectionA; break; case 'b': case 'B': ProcessSelectionB; break; default: ProcessOther; }

  7. Repetition • While loops • Do … While loops • For loops

  8. While loop Sum = 0 ; Number = 5; while (Number > 0) { Sum += Number; Number -= 1; } cout <<“The sum is “<<Sum <<endl;

  9. do-while loops if a task must be performed at least once, we can perform the test at the end of the loop using do-while do { cout << “Select a number between 1 and 5“; cin >> Num; } while ((Num<1) || (Num>5));

  10. For loops for( int Counter = 0; Counter < 5; Counter++ ) { cout << “Counter = “ << Counter << endl; }

  11. Operators • Arithmetic +, -, *, /, % • Relational ==, !=, >, >=, <, <= • Logical &&, ||, !

  12. Variable Types • Integer – int, long • Floating point – float, double • Character – char • Boolean - bool

  13. Modularization (1) • Functions • Library functions • Function headers • Prototypes • Calling functions

  14. Modularization (2) • Global Variables • Local Variables • Parameters and Arguments • Passing by Reference • Passing by Value • Return Values

  15. Arrays • Declaring Arrays • Using Arrays • Passing Arrays to Functions • Strings • Multidimensional Arrays

  16. Summary We’ve finished!