hello quizlet
Home
Subjects
Expert solutions
Create
Study sets, textbooks, questions
Log in
Sign up
Upgrade to remove ads
Only $35.99/year
EX2 Ch 9 Class and Method Design
Flashcards
Learn
Test
Match
Flashcards
Learn
Test
Match
Terms in this set (15)
Characteristics of Object-oriented Systems Analysis and Design
Classes
Instantiated classes are objects
Classes are defined with attributes, states & methods
Classes communicate through messages
Encapsulation & information hiding
Polymorphism & dynamic binding
Inheritance
Polymorphism
The ability to take on several different forms
Same message triggers different methods in different objects
Dynamic binding
Methods—the specific method used is selected at run time
Attributes—data type is chosen at run time
Implementation of X is language specific
Decisions made at run time may induce run-time errors
Need to ensure semantic consistency
Inheritance
Permits reuse of existing classes with extensions for new attributes or operations
Types
Single inheritance -- one parent class
Multiple inheritance -- multiple parent classes (not supported by all programming languages)
Redefinition of methods and/or attributes
Not supported by all programming languages
May cause inheritance conflict
Designers must know what the chosen programming language supports
Object Interaction
Dynamic modeling is about objects—their interactions and how the objects change through interaction.
In an object-oriented virtual system the only possible way of interaction is through sending and receiving messages.
Messages
X are instructions and information sent to objects in the expectation that the recipient objects will carry out certain actions.
Operations (aka Messages, Functions)
X are actions that an object performs. X are invoked when the object receives a message to perform an action.
An X is implemented or actually carried out by the object responsible for the X.
polymorphism; one X => more than one method.
Parameters
or arguments, specify the data that must be supplied to an object to carry out a specific operation:
Examples:
orderDrink(drink, quantity)
orderAppetizer(Appetizer)
getMenu()
orderMainCourse(whisky, on the rocks, many)
Accessor Operations
**X change or return the value of an attribute.
The get operation returns the value of the attribute to the public.
The set operation changes the value of the attribute.
Examples
getName( )
getAddress( )
setName (name)
setAddress (address)
Return Value
is the reply that a message may get from the receiving object after an operation is complete.
Example
name = getName( )
address = getAddress( )
Design Criteria
***A set of metrics to evaluate the design
GOAL:
Low coupling, high cohesion, low connascence
Coupling
refers to the degree of the closeness of the relationship between classes
Close X means that changes in one part of the design may require changes in another part
Cohesion
refers to the degree to which attributes and methods of a class support a single object
Types:
Method X
Does a method perform more than one operation?
Performing more than one operation is more difficult to understand and implement
Class X
Do the attributes and methods represent a single object?
Classes should not mix class roles, domains or objects
Connascence
refers to the degree of interdependency between objects
For example, if I change something in module A that requires a change in module B, then module A and B are connected via some kind of X.
X literally means "Born Together".
Adding Specifications
***Review the current set of analysis models
All classes included are both sufficient and necessary to solve the problem
No missing attributes or methods
No extra or unused attributes or methods
No missing or extra classes
Examine the visibility of classes
Private—not visible
Public—visible to other classes
Protected—visible only to members of the same super class
Decide on method signatures:
Name of the method
Parameters or arguments to pass
Type of value(s) to be returned
Define constraints that must be preserved by the objects
Preconditions, post-conditions, & invariants
Decide how to handle constraint violations
Sets found in the same folder
EX2 Ch 8 Moving to Design
16 terms
EX2 Ch 10 Data Management
15 terms
EX2 Ch 11 Human-Computer Interaction
24 terms
EX2 Ch 12 Software Quality Assurance and Testing
18 terms
Other sets by this creator
EX2: WK8 Object Oriented Programming
25 terms
EX2: WK6 Object Oriented Programming
21 terms
EX2: WK7 Object Oriented Programming
25 terms
EX2: WK5 Object Oriented Programming
24 terms
Verified questions
physics
1 mol of molecular nitrogen gas expands in volume very quickly, so no heat is exchanged with the environment during the process. If the volume increases from 1.00 L to 1.50 L, determine the work done on the environment if the gas's temperature dropped from $22.0^{\circ} \mathrm{C}$ to $18.0^{\circ} \mathrm{C}$. Assume ideal gas behavior. Calculate the root-mean-square speed of air molecules at room temperature $\left(22.0^{\circ} \mathrm{C}\right)$ from the kinetic theory of an ideal gas.
computer science
Refer to the following class. Public Class Point. {, private int myX; private int myY; public Point (), {, myX=0; myY=0; }. public Point(int x, int y), {, myX=x; myY=y; }, public int getX(), {, return myX; }, public int getY(), {, return myY; }, }. Suppose we want to ad to the Point class a method with the following signature. // Sets the x coordinate of the point to the given value public void setX(int x). Which statement should be in the body of the method? (A) x=myX; (B) myX=x; (C) myX=0; (D) x=0; (E) myX=myY;
biology
The light-independent reactions of photosynthesis are also known as the a. ATP cycle.$\hspace{2.3cm}$ c. carbon cycle. b. Calvin cycle.$\hspace{2cm}$ d. sugar cycle.
physics
Two children, Jason and Betsy, ride on the same merry-go-round. Jason is a distance R from the axis of rotation; Betsy is a distance 2R from the axis. (a) Is the angular speed of Jason greater than, less than, or equal to the angular speed of Betsy? (b) Choose the best explanation from among the following: A. The angular speed is greater for Jason because he moves more slowly than Betsy. B. The angular speed is greater for Betsy since she must go around a circle with a larger circumference. C. The angular speeds are the same because it takes the same amount of time for Jason and Betsy to complete a revolution.
Recommended textbook solutions
Fundamentals of Database Systems
7th Edition
•
ISBN: 9780133970777
(1 more)
Ramez Elmasri, Shamkant B. Navathe
687 solutions
Service Management: Operations, Strategy, and Information Technology
7th Edition
•
ISBN: 9780077475864
James Fitzsimmons, Mona Fitzsimmons
103 solutions
Information Technology Project Management: Providing Measurable Organizational Value
5th Edition
•
ISBN: 9781118898208
Jack T. Marchewka
346 solutions
Computer Organization and Design MIPS Edition: The Hardware/Software Interface
5th Edition
•
ISBN: 9780124077263
(5 more)
David A. Patterson, John L. Hennessy
220 solutions
Other Quizlet sets
REGISTRY REVIEW FINAL
70 terms
AU- OB (Cooley: Osteoclastogenesis)
66 terms
J1100 Exam 1
43 terms