muhammad afiq bin mohd zimahdi - job sheet 05

12
Fundamental of C++ Question / Discussion 1. Open programming C++

Upload: aana-solehah

Post on 22-Jan-2016

26 views

Category:

Documents


0 download

DESCRIPTION

Yeah HAHAHA ! . Dev-C++ Programming

TRANSCRIPT

Page 1: Muhammad Afiq Bin Mohd Zimahdi - Job Sheet 05

Fundamental of C++

Question / Discussion

1. Open programming C++

Page 2: Muhammad Afiq Bin Mohd Zimahdi - Job Sheet 05

2. Open Dev-C++

Page 3: Muhammad Afiq Bin Mohd Zimahdi - Job Sheet 05

3. Write this program

/*this is a program that computes te sum of two integernumber*/

#include <iostream>#include <stdlib.h>int main()

{int X , Y , sum;std::cout <<"nEnter first numer:";std::cin >> X ;std::cout <<"nEnter second number:";std::cin >> Y ;sum = X + Y;std::cout <<"\nsum =" <<sum ;return 0 ;

}

Page 4: Muhammad Afiq Bin Mohd Zimahdi - Job Sheet 05

4. Run The project

Page 5: Muhammad Afiq Bin Mohd Zimahdi - Job Sheet 05

5. Save the file under Fiq C++

Page 6: Muhammad Afiq Bin Mohd Zimahdi - Job Sheet 05

6. Compilation Process

Page 7: Muhammad Afiq Bin Mohd Zimahdi - Job Sheet 05

7. Execute the program

Page 8: Muhammad Afiq Bin Mohd Zimahdi - Job Sheet 05

8. Insert the data and the result SUM show up

Page 9: Muhammad Afiq Bin Mohd Zimahdi - Job Sheet 05

Question / Discussion

9. How ToI . Compilation process

You also can Click F9 to Keyword on Keyboard.

Page 10: Muhammad Afiq Bin Mohd Zimahdi - Job Sheet 05

ii. Execute the program

Page 11: Muhammad Afiq Bin Mohd Zimahdi - Job Sheet 05

2.What is C++ Programming

C++ is an object oriented programming (OOP) language, developed by Bjarne Stroustrup, and is an extension of C language. It is therefore possible to code C++ in a "C style" or "object-oriented style."

Conclusion:-

Conclusion

Generalization and abstraction are two of the fundamental bricks in building reusable code.

When patterns of work are generalized, they can be captured as templates. They can then

be tested thoroughly for the most general cases and set free as reusable components. The

C++ algorithms, containers, function objects, and predicates work together to provide the

developer with the tools necessary for generic programming. Although generic programming

puts a higher burden on the supplier and producer of the component, it relieves a significant

burden on the consumer of the component. This give-and-take between supplier and

consumer ultimately improves the quality of available software.