Tổng hợp tài liệu Công Nghệ Thông Tin tham khảo cho học sinh, sinh viên.
Classes Image and ImageIcon – used to load and display images Displaying images Graphics method drawImage – used to draw image referenced by Image object (can be scaled) ImageIcon method paintIcon can be used to draw image referenced by ImageIcon object Loading images Applet method getImage loads an Image into an applet Applet method getDocum...
40 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 627 | Lượt tải: 0
Because Stack extends Vector, all public Vector methods can be called on Stack objects, even if the methods do not represent conventional stack operations. For example, Vector method add can be used to insert an element anywhere in a stack—an operation that could “corrupt” the stack. When manipulating a Stack, only methods push and pop should be us...
108 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 763 | Lượt tải: 0
Queue class that contains a reference to a List Method enqueue calls List method insertAtBack Method dequeue calls List method removeFromFront Method isEmpty calls List method isEmpty Method print calls List method print
68 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 724 | Lượt tải: 0
Linear search Searches each element sequentially If search key is not present Tests each element When algorithm reaches end of array, informs user search key is not present If search key is present Test each element until it finds a match
56 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 684 | Lượt tải: 0
Method call stack used to keep track of method calls and local variables within a method call Just as with nonrecursive programming, recursive method calls are placed at the top of the method call stack As recursive method calls return, their activation records are popped off the stack and the previous recursive calls continue executing Current ...
52 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 924 | Lượt tải: 0
To open a file for reading objects, create a FileInputStream wrapped by an ObjectInputStream FileInputStream provides methods for reading byte-based input from a file ObjectInputStream uses FileInputStream to read objects from file ObjectInputStream method readObject reads in object, which is then downcast to proper type EOFException occurs if ...
82 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 726 | Lượt tải: 0
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ẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 735 | Lượt tải: 0
An ArrayIndexOutOfBoundsException is thrown if the number of points specified in the third argument to method drawPolygon or method fillPolygon is greater than the number of elements in the arrays of coordinates that specify the polygon to display.
74 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 679 | Lượt tải: 0
It is possible to set a Container’s layout to null, which indicates that no layout manager should be used. In a Container without a layout manager, the programmer must position and size the components in the given container and take care that, on resize events, all components are repositioned as necessary. A component’s resize events can be process...
174 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 596 | Lượt tải: 0
Using a superclass reference, we can polymorphically invoke any method specified in the superclass declaration (and in class Object). Using an interface reference, we can polymorphically invoke any method specified in the interface declaration (and in class Object).
90 trang | Chia sẻ: huyhoang44 | Ngày: 17/03/2020 | Lượt xem: 729 | Lượt tải: 0
Copyright © 2024 Tai-Lieu.com - Hướng dẫn học sinh giải bài tập trong SGK, Thư viện sáng kiến kinh nghiệm hay, Thư viện đề thi