Posts

OBJECT ORIENTED ANALYSIS AND DESIGN (OOAD)

Object Oriented Analysis and Design (OOAD): OOAD is a powerful approach for developing complex software systems by breaking them down into manageable objects and their interactions, leading to more robust, maintainable, and reusable code.  Creational Patterns :           1) Singleton           2) Factory           3) Abstract Factory           4) Builder           5) Prototype Structural Patterns :           1)  Adapter           2)  Bridge           3)  Composite           4)  Decorator           5) Facade           6) Flyweight           7) Proxy Behavioural Patterns :     ...

Unified Modelling Language (UML)

Image
  UML (Unified Modelling Language]: Unified Modelling Language (UML) is a visual modelling language used to specify, visualize, construct and document the artifacts of software systems.  1) Use case diagrams 2) Class diagrams 3) Packages and Object diagrams 4) Sequence diagrams 5) Collaboration diagrams 6) State chart diagrams 7) Activity diagrams 8) Component and deployment diagrams 1) Use case diagrams: [ Actors , Usecases , Communications] Actors            ->  Figures Usecases           ->  Ovals Communications ->  Lines that link actors to use cases 2) Class diagrams: a) Rectangles divided into three parts. [ Classname , Attributes , Operations ] b) Relationships between classes, are the connecting links. c) Three types of relations. [ Association , Aggregate , Generalization ]             3) Packages and Object Diagrams...

SMART POINTERS IN C++

 Smart Pointers: a) A smart pointer is a wrapper over a raw pointer that automatically manages memory, ensuring proper deallocation and preventing memory leaks.   b) Smart pointers are template-based, allowing use with any data type. c) They all are declared in <memory> header file. 1) auto_ptr 2) unique_ptr 3) shared_ptr 4) weak_ptr 1) auto_ptr: a) An object when described using the auto_ptr class, stores a pointer to a single allocated object which ensures that when it goes out of scope, the object it points to must get automatically destroyed.  b) It is based on an exclusive ownership model i.e. two pointers of the same type can’t point to the same resource at the same time.  Example: #include<iostream> using namespace std; class Class_S { public:   void Show() { cout << "Class_S :: Show" << endl; } }; int main() {               //raw pointer          ...

MICROSOFT FOUNDATION CLASSES

MFC: CObject is the base class for most of the MFC Classes. Features: i) RUNTIME_CLASS ii) Serialize What is a Message Map?             a)  Message Maps are the way by which MFC handles the application messages. b ) Gets message from the OS, translates the message and dispatches the message to the window procedure. c ) In MFC, 'Run' method, starts the message map. d ) Classes derived from 'CCmdTarget' can contain a message map.               .h  -> DECLARE_MESSAGE_MAP()                                              a) Declares MessageMap Structure.      b) Tells the application that the class in which this is called is going to have a   messagemap and handle messages.     c) Adds three member...