Tổng hợp tài liệu, ebook Công Nghệ Thông Tin tham khảo.
Assertions are conditions that should be true at a particular point in a method Help ensure a program’s validity by catching potential bugs Preconditions and Postconditions are two kinds of assertions Assertions can be stated as comments or assertions can be validated programmatically using the assert statement
90 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 902 | Lượt tải: 0
A general path is a shape constructed from straight lines and complex curves Class GeneralPath Method moveTo specifies the first point in a general path Method lineTo draws a line to the next point in the path Method closePath completes the general path Graphics2D method translate – used to move the drawing origin Graphics2D method rotate – u...
74 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1071 | Lượt tải: 0
JScrollPane has scrollbar policies Horizontal policies Always (HORIZONTAL_SCROLLBAR_ALWAYS) As needed (HORIZONTAL_SCROLLBAR_AS_NEEDED) Never (HORIZONTAL_SCROLLBAR_NEVER) Vertical policies Always (VERTICAL_SCROLLBAR_ALWAYS) As needed (VERTICAL_SCROLLBAR_AS_NEEDED) Never (VERTICAL_SCROLLBAR_NEVER)
174 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 848 | Lượt tải: 0
Several UML modeling tools convert UML-based designs into Java code and can speed the implementation process considerably. For more information on these tools, refer to the Internet and Web Resources listed at the end of Section 2.9.
90 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 985 | Lượt tải: 0
Class Object methods clone equals finalize getClass hashCode notify, notifyAll, wait toString
89 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 903 | Lượt tải: 0
Implementing the ATM system from its UML design (for each class) Declare a public class with the name in the first compartment and an empty no-argument constructor Declare instance variables based on attributes in the second compartment Declare references to other objects based on associations described in the class diagram Declare the shells o...
118 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 919 | Lượt tải: 0
Sequence of messages in a communication diagram Appear to the left of a message name Indicate the order in which the message is passed Process in numerical order from least to greatest
100 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 955 | Lượt tải: 0
Some operations may not have return types yet Remaining return types will be added as design and implementation proceed Identifying and modeling operation parameters Examine what data the operation requires to perform its assigned task Additional parameters may be added later on
88 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1141 | Lượt tải: 0
Activity Diagrams Focus on system behavior Model an object’s workflow during program execution Model the actions the object will perform and in what order UML representation Action state ( rectangle with its left and right sides replaced by arcs curving outwards) Action order ( arrow with a stick arrowhead) Initial state (solid circle) Fina...
95 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 872 | Lượt tải: 0
Identifying attributes Look for descriptive words and phrases in the requirements document Create attributes and assign them to classes Each attribute is given an attribute type Some attributes may have an initial value Some classes may end up without any attributes Additional attributes may be added later on as the design and implementation ...
86 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 979 | Lượt tải: 0