This document introduces a module on programming concepts in C++. The module will cover object-oriented programming principles, C++ basics, classes, inheritance, pointers, and more. Students will learn to apply OOP to model real-world systems. Their knowledge will be assessed through a final exam and group project, both testing their ability to explain and apply core OOP concepts and develop class structures.
The document summarizes and compares several major object-oriented programming languages: Smalltalk, C++, Eiffel, and Java. Smalltalk was designed for interactive use and has a fully integrated development environment, while C++ was designed for production use and has less integration. Eiffel focuses on ensuring code correctness but had poor tooling. Java became popular for web development due to its portability and is expected to further object-oriented adoption.
This document introduces a module on programming concepts in C++. The module will cover object-oriented programming principles, C++ basics, classes, inheritance, pointers, and more. Students will learn to apply OOP to model real-world systems. Their knowledge will be assessed through a final exam and group project, both testing their ability to explain and apply core OOP concepts and develop class structures.
The document summarizes and compares several major object-oriented programming languages: Smalltalk, C++, Eiffel, and Java. Smalltalk was designed for interactive use and has a fully integrated development environment, while C++ was designed for production use and has less integration. Eiffel focuses on ensuring code correctness but had poor tooling. Java became popular for web development due to its portability and is expected to further object-oriented adoption.
This chapter discusses software design patterns, including why they evolved to capture recurring design solutions, defines a design pattern as describing communicating objects and classes that solve general problems, and describes fundamental GRASP patterns that assign responsibilities to experts, creators, or controllers to achieve high cohesion and low coupling.
This chapter discusses dynamic modeling techniques used to describe the behavior of object-oriented systems. It introduces sequence diagrams and collaboration diagrams, which show how objects interact and communicate through messages. Sequence diagrams focus on the time-ordering of messages while collaboration diagrams emphasize the relationships between objects. The chapter also covers different types of messages and events that can be depicted in dynamic models.
This chapter introduces activity diagrams and discusses where they are used. Activity diagrams can model workflows, operations, and dynamic aspects of a system. They contain activities, transitions, synchronization bars, and decision activities. Activity diagrams are suitable for analyzing use cases, understanding workflow, and modeling multithreaded applications. They are not suitable for showing object collaboration or lifetime behavior.
This chapter introduces state diagrams and their components. It discusses how state diagrams describe the states of an object and transitions between states triggered by events. It covers initial and final states, actions, activities, and different types of events. The chapter also discusses transitions between states and the use of guard conditions. Finally, it introduces concepts of nested and concurrent states.
Class diagrams using UML can model the static view of a system by showing how classes are related through relationships like association and generalization. The chapter introduces class diagram notation and discusses how to identify problem domain classes and the different relationships that can exist between classes like association, aggregation, composition, and generalization. It also covers how to model classes, attributes, operations, and relationships in UML class diagrams.
The document summarizes a chapter about use case modeling. It describes use cases and actors, relationships between use cases, and use case descriptions. Use case modeling involves identifying functional requirements, drawing diagrams showing actors and use cases, and writing use case descriptions in a conversational style to document interactions between actors and the system. Relationships like include, extend, and generalization are used to show how use cases relate to each other.
This document introduces a module on programming concepts in C++. The module will cover object-oriented programming principles, C++ basics, classes and objects, inheritance, pointers, and more. Students will learn to apply OOP to model real-world systems. Their knowledge will be assessed through a final exam and group coursework assignments focusing on programming and class design.
This document discusses aggregation and collection classes in Java. It introduces the concept of the "has-a" relationship between classes, where one class contains instances of other classes. It provides examples of classes like Employee that have attributes represented by other classes like PersonalDetails and JobDescription. It discusses encapsulation and exposing functionality through wrapper methods. It also introduces the concepts of ownership and aggregation vs composition. Finally, it discusses using arrays and collections to store and access groups of objects in a 1-to-many relationship.
This document discusses reading from and writing to files in Java programs. It explains how to open a file using a Scanner or PrintWriter object, read/write data using methods like next() and println(), and close the file when finished. It recommends storing file data in memory structures, processing it, then writing the results back to improve efficiency over sequential file access. Proper file handling and exception handling are also emphasized.
This document introduces GUI development in Java using the Abstract Window Toolkit (AWT) and Java Foundation Classes (JFC). It discusses containers, layout managers, events, and event handling. The key GUI components introduced are JFrame for top-level windows, JPanel for grouping components, and using layout managers like BorderLayout and GridLayout to position components. It also covers adding event listeners to components to handle user interactions.
The document discusses exception handling in Java. It defines an exception as an event that disrupts normal program flow, such as dividing by zero. Exceptions are handled using try, catch, and finally blocks. Catch blocks handle specific exception types. Checked exceptions must be handled, while unchecked exceptions do not require handling but can cause program termination. The document provides examples of exception handling for input/output errors and file processing.
This document discusses abstract classes and interfaces in Java. It introduces abstract classes using a drawing package example, showing how abstract classes like Shape can be extended by classes like Rectangle and Circle. Interfaces are also introduced, explaining that they specify what an object can do without defining how. Classes can implement multiple interfaces to take on those required behaviors.
This lecture introduces Java programming and covers: the Java Virtual Machine; object oriented concepts like classes and instances; the structure of a Java program; and using the Scanner class for input/output. Key topics are compiling Java code, executing bytecode on the JVM, and the basics of classes, methods, and objects.
The document summarizes and compares several major object-oriented programming languages: Smalltalk, C++, Eiffel, and Java. Smalltalk was designed for interactive use and has a fully integrated development environment, while C++ was designed for production use and has less integration. Eiffel focuses on ensuring code correctness but has not been widely adopted. Java became very popular and may become the main language for web programming due to its portability.
This document introduces multi-threading in Java. It discusses that threads allow a program to have multiple paths of execution. Threads can be created by extending the Thread class or implementing the Runnable interface. The key method for threads is run, which contains the logic to be executed. The document covers starting threads, potential problems with threads accessing shared resources, and techniques for thread synchronization like synchronized methods, waits and notifies.
This chapter introduces state diagrams and their components. It discusses how state diagrams describe the states of an object and transitions between states triggered by events. It covers initial and final states, actions, activities, and different types of events. The chapter also discusses transitions between states and the use of guard conditions. Finally, it introduces concepts like substates, concurrent state diagrams, and ways for orthogonal components to communicate in concurrent state models.
Class diagrams using UML model the static relationships between classes in a system. They show classes, attributes, operations, and relationships like associations and generalizations. Associations describe links between classes, like a customer ordering products. Generalizations define inheritance between superclasses and subclasses, where the subclass inherits structure and behavior from the parent class.
The document discusses the Decorator design pattern, which allows additional responsibilities to be attached to an object dynamically at runtime. It provides examples of how the Decorator pattern can be used to add features like borders and scrolling to views. The Decorator pattern provides a more flexible alternative to inheritance for extending object functionality compared to traditional inheritance which can result in explosion of classes.