Politechnika Śląska - strona 323

Default assignment operator

  • Politechnika Śląska
  • dr inż. Piotr Fabian
  • Computer Programming
Pobrań: 0
Wyświetleń: 441

Default assignment operator  if we do not define an assignment operator, then the compiler generates one, that simply copies objects field by field - it does not work for const fields - it does not work for reference fields - it simply copies pointer...

Operators as functions

  • Politechnika Śląska
  • dr inż. Piotr Fabian
  • Computer Programming
Pobrań: 0
Wyświetleń: 490

Operators as functions  at least one argumen t of the operator should be an object  all the arguments are operator function parameters  there is no this  declaring int operator...

Operators as methods

  • Politechnika Śląska
  • dr inż. Piotr Fabian
  • Computer Programming
Pobrań: 0
Wyświetleń: 420

Operators as methods  object of the class is the first argument of the operator  we declare all arguments, but the first one  declaring int point::operator...

Operators vs Methods

  • Politechnika Śląska
  • dr inż. Piotr Fabian
  • Computer Programming
Pobrań: 0
Wyświetleń: 427

Operators vs Methods  different syntax for declaring, defining an calling  no default arguments allowed (exception: function call operator)  there is a fixed number of arguments for specific operator (exception: function call operator)  there is a traditional semantics (meaning) of operators ...

Paradigm of the object oriented programming

  • Politechnika Śląska
  • dr inż. Piotr Fabian
  • Computer Programming
Pobrań: 0
Wyświetleń: 266

Paradigm of the object oriented programming object oriented programming — a programming paradigm using "objects" - data structures consisting of data fields and methods together with their interactions A problem is seen as a set of objects and as a relations among objects. ...

What is Data Abstraction

  • Politechnika Śląska
  • dr inż. Piotr Fabian
  • Computer Programming
Pobrań: 0
Wyświetleń: 364

What is Data Abstraction  Strong division between the interface and the implementation helps to reuse and share the code  Modification of the implementation does not require modifications of the rest of the program (if the interface remains the same) ...

What is OOP

  • Politechnika Śląska
  • dr inż. Piotr Fabian
  • Computer Programming
Pobrań: 0
Wyświetleń: 497

What is OOP  OOP means Object Oriented Programming  Promotes strong associations between data and methods of manipulating data  Inheritance - relationships between objects - children inherit properties of their ancesors, may add and change ...

Automating Program Compilation

  • Politechnika Śląska
  • dr inż. Piotr Fabian
  • Fundamentals of Computer Programming
Pobrań: 0
Wyświetleń: 308

Automating Program Compilation  Compiling a program made of one source file is easy  A program made of few sources is a bit more complex: - compilation  only modified files need to be compiled, it saves time! - linking  What to do in case of hundreds of files... ...

DATE

  • Politechnika Śląska
  • dr inż. Piotr Fabian
  • Fundamentals of Computer Programming
Pobrań: 0
Wyświetleń: 504

 __DATE__ - This macro expands to a string constant that describes the date on which the preprocessor is being run. The string constant contains eleven characters and looks like "Nov 29 2011" . ...

Error handling

  • Politechnika Śląska
  • dr inż. Piotr Fabian
  • Fundamentals of Computer Programming
Pobrań: 0
Wyświetleń: 518

Error handling  Many library functions assign an error code to the variable errno  It may be checked for detailed information  Other functions provide a way to print error messages void perror( const char * string ); ...