Website chia sẻ tài liệu, ebook tham khảo cho các bạn học sinh, sinh viên
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: 1216 | 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: 1410 | Lượt tải: 0
UML class diagrams Solid diamonds attached to association lines indicate a composition relationship Hollow diamonds indicate aggregation – a weaker form of composition
78 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1238 | Lượt tải: 0
Model system behavior Use case diagrams Model interactions between user and a system State machine diagrams Model the ways in which an object changes state Activity diagrams Models an object’s activity during program execution Communication diagrams (collaboration diagrams) Models the interactions among objects Emphasize what interaction...
99 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1376 | Lượt tải: 0
Software generally viewed as a product You buy a software package from a software vendor, then install that software on your computer and run it as needed Upgrade process cumbersome and expensive Software as a service (SAAS) Software runs on servers elsewhere on the Internet When server is updated, all clients worldwide see the new capabilitie...
60 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1402 | Lượt tải: 0
Bước 4: Xử lý sự kiện tính giá bán khi Click chuột vào button “Tính giá bán” Double click chuột lên button “Tính giá bán” sẽ chuyển sang chế độ code như sau:
18 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1306 | Lượt tải: 0
Lớp Point: biểu diễn điểm trên màn hình Lớp Dimension: biểu diễn kích thước về chiều rộng và chiều cao của một đối tượng Lớp Rectangle: biểu diễn hình chữ nhật Lớp Polygon: biểu diễn đa giác
25 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1179 | Lượt tải: 0
Java không có kiểu dữ liệu con trỏ như trong C. o Java có một trình dọn dẹp hệ thống sẽ dọn dẹp vùng nhớ cấp phát cho các đối tượng trước khi hủy một đối tượng. o Phương thức finalize() là một phương thức đặc biệt được cài đặt sẵn cho các lớp. Trình dọn dẹp hệ thống sẽ gọi phương thức này trước khi hủy một đối tượng
60 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1537 | Lượt tải: 0
Một phương thức chứa một lời gọi đến chính nó là một phương thức đệ quy Một bài toán đệ quy có thể được giải bằng cách dùng vòng lặp và ngược lại Ví dụ: Một số bài toán đệ quy điển hình • Tính giai thừa • Tìm số fibonacci thứ n • Tháp Hà Nội
27 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1456 | Lượt tải: 0
Các phương thức: – boolean hasMoreTokens():kiểm tra còn mảnh nào không – String nextToken(): Chuyển đến token kế tiếp – String nextToken(String delim): • Ví dụ minh họa: Viết chương trình nhập vào một chuỗi, in các từ trong chuỗi đó ra màn hình, mỗi từ trên một dòng
31 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1324 | Lượt tải: 0