Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CMT2050: Object Oriented Programming and Design www.cs.mdx.ac.uk/staffpages/xiaohong/cmt2050 Dr. Xiaohong Gao Room 2C23 Ext. 2252 ( Seminar Week 1) The.

Similar presentations


Presentation on theme: "1 CMT2050: Object Oriented Programming and Design www.cs.mdx.ac.uk/staffpages/xiaohong/cmt2050 Dr. Xiaohong Gao Room 2C23 Ext. 2252 ( Seminar Week 1) The."— Presentation transcript:

1 1 CMT2050: Object Oriented Programming and Design www.cs.mdx.ac.uk/staffpages/xiaohong/cmt2050 Dr. Xiaohong Gao Room 2C23 Ext. 2252 ( Seminar Week 1) The Programming Cycle

2 2 1. Define objects An object is an entity with a well-defined boundary and identity that encapsulates both state and behaviour. State is represented by attributes and relationships. Behaviour is represented by operations, methods, and state machines. An object is an instance of a class.

3 3 2. Explain the difference between produre programming and oop.  Programs ---- consist of modules, which are parts that can be designed, coded, and tested separately and then assembled.  Procedural Programming (such as C language) ---- the modules are procedures.  In C, a function is a procedure.  C language is a procedural language in which a program’s modules are its functions.  Designing a procedural program is known as top-down design.

4 4  OOP i s another way of thinking about programming.  The focus is on the relationship between data and tasks, rather than on a program’s tasks.  A program contains objects that respond to messages sent to them.  A message (or function call) is simply a request for the object to do something.  In C++, you create objects that contain data and actions or behaviors that the object is capable of performing.  These actions, called methods (or member functions), are implemented by writing functions that are part of object itself.

5 5 3. The Programming Cycle The Debug Cycle The inside of compilation The role of the pre-processor

6 6 Debug cycle

7 7 The inside of compilation

8 8

9 9 The role of pre-processor

10 10 pre-processor files are header files: pre-processor directives including #include header files are usually.h files a header file may contain Þ data structure Þenum definitions Þ prototypes of functions


Download ppt "1 CMT2050: Object Oriented Programming and Design www.cs.mdx.ac.uk/staffpages/xiaohong/cmt2050 Dr. Xiaohong Gao Room 2C23 Ext. 2252 ( Seminar Week 1) The."

Similar presentations


Ads by Google