Ppt on object-oriented programming examples

Object Oriented Programming Lect. Dr. Daniel POP Universitatea de Vest din Timişoara Facultatea de Matematică şi Informatică.

Techniques Unstructured programming Procedural programming Modular programming Data abstraction Object-oriented programming Generic programming 7Programming IIObject-Oriented Programming test.c // data void main(int argc, char* argv[]) { // local data // statements } Unstructured Programming Simple / small application consisting of one main program Program = sequence of commands (statements) which modify global data Drawback: unmanageable as program gets bigger; a lot of copy/paste-ed code Example: in/


Dr. Amel Ksibi Object-oriented programming with JAVA.

Object-oriented programming with JAVA PLAN Chapter 1: Object-oriented programming Chapter 2: Java Platform Chapter 3: Java Basics Chapter 4: Advanced java programming Chapter 1 Object-Oriented Programming A brief history of computing Object orientation paradigm Object oriented principles What is object oriented programming? Benefits of object oriented programming/is type. o Declarations do not create new objects. Java : Objects & Classes Creating an Object: o Example: public class Dog{ Private String name; /


Based on Deitel How To Program slides 1.  Computer use is increasing in almost every field  Computing costs have been decreasing dramatically due to.

, screen, mouse, hard drive, memory, DVD drives and processing units)  The programs that run on a computer are referred to as software ◦ (for example, applications such as word processors, payroll systems, spreadsheets, e-mail systems, games, etc.)  Object-oriented programming (which models real-world objects with software counterparts), available in C# and other major programming languages (Java, C++, SmallTalk etc.), can greatly enhance productivity 4  Instructions for/


Object Oriented Software Development 2. C# object oriented programming basics.

2. C# object oriented programming basics 9 C# class example code OOBasicsDemo project Employee.cs Object Oriented Software Development 2. C# object oriented programming basics 10 Class diagrams Object Oriented Software Development 2. C# object oriented programming basics 11 class name attributes methods private – cannot be accessed by other objects public – can be accessed by other objects Object diagrams Object Oriented Software Development 2. C# object oriented programming basics 12 each object here is an/


INF120 Basics in JAVA Programming AUBG, COS dept, Fall semester 2013 Reference books: Malik D.S., Java Programming, From Problem Analysis to Program Design,

by the machine The machine sells: candies, chips, gum, and cookies Write a program for this candy machine so that it can be put into operation 35Java Programming: From Problem Analysis to Program Design, 4e Object-Oriented Design Example 2 (continued) 36Java Programming: From Problem Analysis to Program Design, 4e Object-Oriented Design Example 2 (continued) Algorithms Computer programs implement algorithms. So, what is an algorithm? Algorithms definitions Definition 1: A step/


Course Notes for CS 0401 Intermediate Programming (with Java) By John C. Ramirez Department of Computer Science University of Pittsburgh.

at debug.ppt – it has some of the things we just mentioned 85 Lecture 9: Intro. to Object-Oriented Programming (OOP) Object-Oriented Programming consists of 3 primary ideas:  Encapsulation and Data Abstraction Operations on the data are considered to be/’ point of view See SuperClass.java, SubClass.java, Subby.java and ex19.java 204 Lecture 22: Inheritance Example As another example  Compare MixedNumber class and MixedNumber2 class  Both utilize the RationalNumber class from the Lewis & Loftus text /


Lecturer: Dr. AJ Bieszczad Chapter 1 COMP 150: Introduction to Object-Oriented Programming 1-1 l Background information »important regardless of programming.

Need to be alert and test thoroughly »think about test cases and predict results before executing the code Lecturer: Dr. AJ Bieszczad Chapter 1 COMP 150: Introduction to Object-Oriented Programming 1-38 Logic Error Examples l Algorithm Error: »averageOfFiveScores = SumOfScores/2 (should divide by 5) l Implementation Error: »typed in wrong symbol in source code - sum = a - b; (should be sum = a + b/


Object Oriented Programming Object Persistence. Object Oriented Programming Introduction One of the most critical tasks that applications have to perform.

Toplink make it easier to define mappings. Some OR frameworks, including Hibernate and OJB, are compliant with the ODMG 3.0 standard for interfacing with a database. Object Oriented Programming Hibernate Mapping Example Object Oriented Programming Writing a Persistence Layer Object Oriented Programming Advantages of Persistence Layer Entity classes can be re-used in other applications which use different databases Entity classes are easier to read and understand without any/


Object Oriented Programming Lect. Dr. Daniel POP Universitatea de Vest din Timişoara Facultatea de Matematică şi Informatică.

shared between two whole instances. Aggregation is identified by the phrase “ is-part-of ”. Aggregation cannot be circular, i.e. an object cannot be part of itself. Example: A car has a color and a radio/mp3 player. 7Programming IIObject-Oriented Programming Composition DEFINITION [Composition] Composition is a relationship between part and whole in which part may not be independent of the whole. Composition/


OOAD Unit-2 Object Model. Foundations of the Object Model Structured Design Methods evolved – For Developer (who build complex systems) – Using Procedural.

exist invariant properties that characterize an object and its behavior. An elevator, for example, is characterized by invariant properties including [that] it only travels up and down inside its shaft. Any elevator simulation must incorporate these invariants, for they are integral to the notion of an elevator Object-Oriented Programming (OOP) Definition Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of/


2 Object-Oriented Analysis and Design and the Unified Process Objectives  The Primary focus of this chapter is on how to develop detailed Object- oriented.

User Interface Classes and the Internal Classes, but it would result in highly cohesive Classes with a defined set of responsibilities for each. 31 Object-Oriented Analysis and Design and the Unified Process Object-Oriented Event-Driven Program flow 32 Object-Oriented Analysis and Design and the Unified Process Example of a Single Use Case Controller for a single Use Case (Look Up Item Availability Use Case) 33/


K.Subieta. Object-Oriented Query Languages and Views, slide 1 Sept. 2000 Tutorial: Object-Oriented Query Languages and Views Part 1: Basic concepts and.

with sets/bags. They are modeled by the same name assigned to many objects on the same hierarchy level; Relational structures: each tuple is understood as an object with subobjects; K.Subieta. Object-Oriented Query Languages and Views, slide 38 Sept. 2000 What is binding? For example: procedure name occurring in a program is substituted by a call of a machine code; variable name is substituted/


SNU IDB Lab. 1 Great Ideas of CS with Java Part 1 WWW & Computer programming in the language Java Ch 1: The World Wide Web Ch 2: Watch out: Here comes.

. C++, Java, and many more contemporary PLs ** properties… ** definition of methods… ** use other classes… Class myClass SNU IDB Lab. 34 OO Programming paradigm (3) Conceptual Understanding of Object-oriented Programming Bike Class An Instance of Bike Class SNU IDB Lab. 35 OOP Example (1) Programming “Organ”  Building a class “Organ” Public class Organ {Data Keys, Stops, Other; Public void PlayNote(P x) { … Java Code for PlayNote/


Object Model OOAD. Foundations of the Object Model Structured Design Methods evolved – For Developer (who build complex systems) – Using Procedural PL.

exist invariant properties that characterize an object and its behavior. An elevator, for example, is characterized by invariant properties including [that] it only travels up and down inside its shaft. Any elevator simulation must incorporate these invariants, for they are integral to the notion of an elevator Object-Oriented Programming (OOP) Definition Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of/


Tutorial 1: CAMLE: Caste-centric Agent-Oriented Methodology of Software Development -- Meta-model, Languages and Environment Hong Zhu Dept. of Computing.

systems –Modeling: language CAMLE and modeling environment –Specification: Language SLABS –Programming: Agent/object oriented programming in SLABSp Pure agent-oriented programming in CAOPLE –Language –CAVM: virtual machine Conclusion –Future research directions Part 1: Background 1. What is agent orientation? – Illustrate through an example Solution in structured approach Solution in object-oriented approach Solution in agent-oriented approach More details will be covered in part 3 24/3/2009 4 Introductive/


Lecturer: Dr. AJ Bieszczad Chapter 6 COMP 150: Introduction to Object-Oriented Programming 6-1 l Array Basics l Arrays in Classes and Methods l Programming.

int[7]; b[2] = new int[4]; Lecturer: Dr. AJ Bieszczad Chapter 6 COMP 150: Introduction to Object-Oriented Programming 6-44 Programming Example : Employee Time Records The class TimeBook uses several arrays to keep track of employee time records: public class TimeBook /employees on day i Lecturer: Dr. AJ Bieszczad Chapter 6 COMP 150: Introduction to Object-Oriented Programming 6-45 Programming Example : Employee Time Records Nested Loops with Multidimensional Arrays The method computeWeekHours uses nested for/


1 Collections Chapter 22 Y.Daniel Liang Introduction to Java Programming Sixth Edition and Cay Horstmann Object-Oriented Design & Patterns.

such cases. Additionally, it is required that invoking the hasCode method multiple times returns the same integer during one execution of the program Y.Daniel Liang Introduction to Java Programming Sixth Edition and Cay Horstmann Object-Oriented Design & Patterns 18 Example TestSets This example creates: 1. A HashSet filled with strings, and uses an iterator to traverse the elements in the list. 2. 2. A LinkedHashSet/


1 3D Game Programming 王銓彰 2005.

render the scene vp.Object(vID); vp.Render(cID, TRUE, TRUE); // perform double-buffering gw.Object(gID); gw.SwapBuffers(); } The Timer Callback 73 Introduction to TheFly3D A real-time 3D graphics programming library A real-time 3D graphics programming library Using C++ /track the bounding box But need run-timely to track the bounding box AABB Application Example - AABB 198 Oriented bounding box (OBB) Oriented bounding box (OBB) Need intersection calculation using the transformed OBB geometric data Need /


ECP 4206 Object Oriented Programming with C++ Lecturer/Tutor: Chan Mun Leong, Mohd Haris Lye

Object Following is an example of a class and its instance (object) Variables Height Weight Gender name Methods getName(…) getGender(…) Height = 165 Weight = 70 Gender = male Name = Tom Methods getName(…) getGender(…) class PersonObject p of the class Person 3 rd 5/10 Design Strategies In Object-Oriented Programming/ using Hierarchy Genericity Polymorphism Design Strategies In Object-Oriented Programming The diagram here shows how the object oriented software structures is used to implement the design/


An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 9 Event-Driven Programming with Graphical User Interfaces.

about component construction details – Concentrate on actions desired GUI Components – Examples of best principles of object-oriented programming – Represent objects with attributes and methods Instantiating objects – Occurs when using GUI components – Each object belongs to a prewritten class 12An Object-Oriented Approach to Programming Logic and Design User-Initiated Actions and GUI Components (cont’d) 13An Object-Oriented Approach to Programming Logic and Design Abbreviated version of how a Button class/


Are you in the right course? Software Engineering 430 Object Oriented Modeling September 10, 2015SE 430: Lecture 11 of 94.

actually be done in any language: even C, COBOL, or assembler  There are languages that provide better support for OO programmingExamples: Smalltalk, Java, C++, C#  These languages support the notions of class, object, messaging, inheritance, encapsulation, polymorphism  In object oriented programming, reuse of existing libraries is very important  OO programs often create new objects as needed (and destroy them when they are no longer active), so OO/


Company Confidential 1 A Course on Object Oriented Concepts Prepared for: *Stars* New Horizons Certified Professional Course.

the differences between Structured programming approach and Object Oriented Programming approach. To understand best practices in Object oriented design Course Plan Comparison of various programming techniques Introduction to Object Oriented Concepts What is an Object Abstraction, Encapsulation, Message Passing Class, Access Specifiers, Examples UML Class diagrams Course Plan Advanced Object Oriented Concepts Relationships Inheritance Abstract Classes Polymorphism Object Oriented Design Methodology Trends/


7-Oct-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic : User Interface Components with.

can examine which is active Air Force Institute of Technology Electrical and Computer Engineering 7-Oct-159 Object-Oriented Programming Design Button Example public class ButtonTest1 extends JFrame { public ButtonTest1() { // Create a JPanel with a box /for counters or status fields) Air Force Institute of Technology Electrical and Computer Engineering 7-Oct-1512 Object-Oriented Programming Design Label Example public class LabelTest1 extends JFrame { public LabelTest1() { // Create a JPanel with a box /


An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 3 Making Decisions.

: – Use parentheses to override default order of operations – Use parentheses for clarity – Use nested if statements instead of AND s and OR s Example of using nested if follows 41An Object-Oriented Approach to Programming Logic and Design 42An Object-Oriented Approach to Programming Logic and Design Nested decisions that determine movie patron discount Figure 3-23 Summary All decisions evaluate Boolean expressions Can compare any two/


BCS 2143 Object Oriented Programming Defining Your Own Classes (Part 1)

own classes customized for our applications. Learning how to define our own classes is the first step toward mastering the skills necessary in building large programs. Classes we define ourselves are called programmer- defined classes. BCS 2143 Object Oriented Programming Example : Class Diagram for Bicycle Method Listing We list the name and the data type of an argument passed to the method. Method Listing We/


Object Oriented Programming with C++/ Session 6 / 1 of 44 Multiple Inheritance and Polymorphism Session 6.

{ private: int radius; public: void draw()//redefined in derived class {cout<<"Draw circle";} }; Object Oriented Programming with C++ / Session 6 / 25 of 44 Example(Contd.) class square: public Shapes{ private: int length; public: void draw()//redefined in derived /have a virtual destructor function to free memory space effectively under dynamic binding. Object Oriented Programming with C++ / Session 6 / 42 of 44 Example class Alpha{ private: char* alpha_ptr; public: Alpha()//constructor cannot be virtual /


Programming Languages Third Edition Chapter 5 Object-Oriented Programming.

extension of the type of data that operations can apply to: –Examples: overloading and parameterized types Application framework: a collection of related software resources (usually in object-oriented form) for developer use –Examples: Microsoft Foundation Classes in C++ and Swing windowing toolkit in Java Programming Languages, Third Edition8 Software Reuse and Independence (cont’d.) Object-oriented languages have another goal: –Restricting access to internal details of software/


© M. Winter COSC 3P91 – Advanced Object-Oriented Programming 1.11.1 COSC 3P91 Advanced Object-Oriented Programming Super Course Instructor: Michael Winter.

Pair(Pair p) { first = p.getFirst(); second = p.getSecond(); } // constructor © M. Winter COSC 3P91 – Advanced Object-Oriented Programming 1. 30 Generics – Example (cont’d) public X getFirst() { return first; } // getFirst public void setFirst(X x) { first = x; }/ long nextLong() // alternative distribution public double nextGaussian() } © M. Winter COSC 3P91 – Advanced Object-Oriented Programming 1. 57 Random - Example static public int weightedDistribution(int[] weights) { int sum = 0; for(int i = 0;/


An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 1 An Overview of Computer Programming.

Expressed as verb phrases Examples of relationships: “Has a,” “is a,” “creates a” Class – A general category that describes entities – May be reused from other programs or modified 18An Object-Oriented Approach to Programming Logic and Design Writing and Testing Programs Writing a program involves several subtasks – Developing the program logic – Coding the program – Translating the program into machine language – Testing the program 19An Object-Oriented Approach to Programming Logic and Design Writing/


Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.

Using Java: A Class-Centered Approach, Enhanced Edition4 One-Dimensional Arrays List of related values with same data type –Stored using single group name Array declaration example: double prices[]; prices = new double[6]; Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition5 One-Dimensional Arrays (continued) Using new operator: –Array elements automatically initialized to: 0 for numerical built-in types false/


Lecturer: Dr. AJ Bieszczad Chapter 5 COMP 150: Introduction to Object-Oriented Programming 5-1 l Programming with Methods l Static Methods and Static Variables.

Include a constructor that has no parameters. »Include your own default constructor. Lecturer: Dr. AJ Bieszczad Chapter 5 COMP 150: Introduction to Object-Oriented Programming 5-26 Programming example: PetRecord Lecturer: Dr. AJ Bieszczad Chapter 5 COMP 150: Introduction to Object-Oriented Programming 5-27 Constructor Example from PetRecord public class PetRecord { private String name; private int age; //in years private double weight; //in pounds... public PetRecord(String initialName/


Object Oriented Software Development 8. Exceptions, testing and debugging.

about a run-time error Exception-handling involves writing code which is executed when an exception is thrown Interrupts normal flow of execution Object Oriented Software Development 8. Exceptions, testing and debugging 5 Exceptions examples SimpleExceptions project Program.cs InfoSaver.cs Object Oriented Software Development 8. Exceptions, testing and debugging 6 Exception handling This code tries to open a file Will cause an error if the/


Using UML, Patterns, and Java Object-Oriented Software Engineering Chapter 10, Mapping Models to Code.

Forward engineering Refactoring Reverse engineering Model space Model transformation System Model (in UML) Another System Model Program (in Java) Another Program Yet Another System Model Bernd Bruegge & Allen H. Dutoit Object-Oriented Software Engineering: Using UML, Patterns, and Java 8 Model Transformation Example Object design model before transformation: Object design model after transformation: Advertiser +email:Address Player +email:Address LeagueOwner +email:Address PlayerAdvertiserLeagueOwner User/


Object Oriented Programming with C++/ Session 5/ 1 of 41 Inheritance Session 5.

void fn(){ int a; a = privA;//error:not accessible a = protA;//valid a = pubA;//valid } }; Object Oriented Programming with C++/ Session 5 / 22 of 41 Example (Contd.) class C : private A{//privately derived class public: void fn() { int a; a = privA;//error/protA;//valid a = pubA;//valid } }; void main() { int m; B obj1; //object of publicly derived class Object Oriented Programming with C++/ Session 5 / 23 of 41 Example (Contd.) m = obj1.privA;//error:not accessible m = obj1.protA;//error:not accessible m /


An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 5 Arrays.

– The larger the array, the greater the efficiency improvement achieved by leaving the search loop early Figure 5-11 shows improved version of price-finding example 28An Object-Oriented Approach to Programming Logic and Design Figure 5-11 29An Object-Oriented Approach to Programming Logic and Design Program exits loop once value has been found and number of comparisons does not exceed SIZE Improved version of price-finding/


Lecturer: Dr. AJ Bieszczad Chapter 9 COMP 150: Introduction to Object-Oriented Programming 9-1 l Overview of Streams and File I/O l Text File I/O l Binary.

specify delimiters (the character or characters that separate words) –the default delimiters are "white space" (space, tab, and newline) Lecturer: Dr. AJ Bieszczad Chapter 9 COMP 150: Introduction to Object-Oriented Programming 9-20 Example: StringTokenizer l Display the words separated by any of the following characters: space, new line ( ), period (.) or comma (,). String inputLine = SavitchIn.readLine(); StringTokenizer wordFinder = new StringTokenizer(inputLine, " .,"); //the second/


An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 12 Manipulating Larger Quantities of Data.

value – Descending order Arranging records from highest to lowest value 4An Object-Oriented Approach to Programming Logic and Design Understanding the Need for Sorting Data (cont’d) Examples of situations in which sorting is needed – Student records In ascending / placed in any physical location on disk Example: Figure 12-21 42An Object-Oriented Approach to Programming Logic and Design Figure 12-21 Using Indexed Files (cont’d) 43An Object-Oriented Approach to Programming Logic and Design Figure 12-21 stores/


Object Oriented Analysis and Design using UML. L19-Design.

object linking and embedding, or OLE) plays the role of DCOM object. Object-Oriented Database Systems The object-oriented database management system is a marriage of object-oriented programming and database technology to provide what we now call object-oriented databases. Object-Oriented/B. Component diagram – cont’d Component diagram shows component types not instances of component Example: An executable file containing application MyApplication –component type. Component instances are running instances of /


An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 6 Using Methods.

methods – Multiple methods with the same name but different parameter lists – Have different signatures Polymorphism – Ability of a method to act appropriately according to the context – Example of polymorphism: overloaded methods Figure 6-15 37An Object-Oriented Approach to Programming Logic and Design Figure 6-15 – Two overloaded versions of the printBill() method – Array is sent to methods three times Figure 6-16 38An/


An Object-Oriented Approach to Programming Logic and Design Chapter 1 An Overview of Computers and Logic.

Object-Oriented Approach to Programming Logic and Design 35 Understanding Data Types (continued) Example: DoubleNumber class allows the user to enter a number and see the result when the value is doubled. An Object-Oriented Approach to Programming Logic and Design 36 Summary Hardware and software accomplish four major operations: Input, Processing, Output, and Storage Computer programming languages are used to write machine instructions Object-oriented programming, or OOP, focuses on objects/


Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.

, Enhanced Edition4 Data Values and Arithmetic Operations General data types: –Primitive –Reference Literal –Value that explicitly identifies itself –Example: 1 “xyz” Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition5 Data Values and Arithmetic Operations (continued) Figure 2.1: Primitive data types Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition6 Data Values and Arithmetic Operations (continued) Figure 2.2: Reference/


An Object-Oriented Approach to Programming Logic and Design Chapter 3 Using Methods and Parameters.

is void Return type is placed in the header before the method name Example : public static numeric predictRaise(numeric money) An Object-Oriented Approach to Programming Logic and Design 22 Creating Methods that Return Values (continued) Method can only/Methods can be written to ensure that the data conforms to required standards Example: ensuring that all phone numbers have area codes An Object-Oriented Approach to Programming Logic and Design 31 Organizing Classes Data fields: –No special order required,/


An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 4 Looping.

the prompt – Limit the number of attempts – Force (override) the input to a specific value after a certain number of attempts Example: Figure 4-18 on next slide 36An Object-Oriented Approach to Programming Logic and Design 37An Object-Oriented Approach to Programming Logic and Design Program limits the number of times the user can input the month of their birth Figure 4-18 Validating a Data Type/


Object Oriented Programming with C++/ Session 1/ 1 of 50 Basic Object Oriented Concepts Session 1.

properties, common behaviour and common relationships. n The term class is an abbreviation of “class of objects”. Example, A class of persons, class of animals, class of processes. n Each object is said to be an instance of its class. Object Oriented Programming with C++/ Session 1/ 16 of 50 Objects and Classes Abstract into Polygon class Properties: Vertices Border colour Fill colour Methods: Draw Erase Move/


COMP 150: Introduction to Object-Oriented Programming Lecturer: Dr. AJ Bieszczad 4-1 Chapter 4 l Class and Method Definitions l Information Hiding and.

are compared! This is rarely what you want to do! Use the classs.equals() method to compare the values of class variables COMP 150: Introduction to Object-Oriented Programming Lecturer: Dr. AJ Bieszczad 4-40 Chapter 4 Example: Comparing Class Variables Use.equals method (not the double-equals sign) to compare values //User enters first string String firstLine = SavitchIn.readLine(); //User enters second string/


2 Object-Oriented Analysis and Design with the Unified Process Objectives  This chapter provides you with a broader understanding of some important issues.

Utility and Service Classes. (Example: System Class, Windows menus, Authentication and Security Classes, Error-handling Classes) b) Statechart helps Analyst to define the “Method Logic” They provide components that allow the Designer to describe additional documentation to help the Programmer to write program Code later. The “Action-expressions” in Statecharts contain information that help define Method Logic. 4 Object-Oriented Analysis and Design with/


DCS2133 Object Oriented Programming Graphical User Interface & Event-Driven Programming.

listener to related item Eg: okButton.addActionListener (this); 4.Include actionPerfomed method in class implements ActionListener public void actionPerformed(ActionEvent evt){ // event handling statements come here } …. } DCS2133 Object Oriented Programming Example – Ch14ButtonFrameHandler import javax.swing.*; import java.awt.*; // for class Container import java.awt.event.*;// for ActionListener interface STEP 1 class Ch14JButtonFrameHandler extends JFrame implements ActionListener { // STEP 2 private/


COMP 150: Introduction to Object-Oriented Programming 1 Lecturer: Dr. AJ Bieszczad l Event-Driven Programming and GUIs l Swing Basics and a Simple Demo.

alternatives offered to user l Button—looks like a button that can be pressed COMP 150: Introduction to Object-Oriented Programming 4 Lecturer: Dr. AJ Bieszczad Event-Driven Programming l Programs with GUIs often use Event-Driven Programming l Program waits for events to occur and then responds l Examples of events: »Clicking a mouse button »Dragging the mouse »Pressing a key on the keyboard l Firing an/


Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Aspect-Oriented Software Development (AOSD)

) AI (semantic networks 79) Composition Filters with superimposition (2001) Law of Demeter (1988) Adaptive programming (1992) AspectJ (2000) http://trese.cs.utwente.nl History of AOP languages Object Oriented Analysis and Design 29 AspectJ  A general purpose AO programming language  just as Java is a general-purpose OO language  unlike examples in ECOOP ’ 97 paper domain specific languages for each aspect  an integrated extension to/


Object Oriented Analysis and Design 1 Chapter 6 Design Patterns  Creational Design Patterns  Structural Design Patterns  Behavioral Design Patterns.

.util package provides an Observable class and an Observer interface: Object Oriented Analysis and Design 84 Example: A GUI Observes a Person Object Oriented Analysis and Design 85 Example: A GUI Observes a Person Object Oriented Analysis and Design 86 Example: Java AWT 1.1 Event Model Object Oriented Analysis and Design 87 Example: event-driven programming Object Oriented Analysis and Design 88 Example: event-driven programming import javax.swing.*; import java.awt.event.*; import java.awt/


Ads by Google