• Java - Data structuresJava - Data structures

    Duplicate elimination Because duplicate values follow the same “go left” or “go right” decisions, the insertion operation eventually compares the duplicate with a same-valued node The duplicate can then be ignored Tightly packed (or balanced) trees Each level contains about twice as many elements as the previous level Finding a match or determ...

    ppt68 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1216 | Lượt tải: 0

  • Java - Searching and sortingJava - Searching and sorting

    Four steps to developing a loop from a loop invariant Set initial values for any loop control variables Determine the condition that causes the loop to terminate Modify the control variable so the loop progresses toward termination Check that the invariant remains true at the end of each iteration

    ppt56 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1212 | Lượt tải: 0

  • Java - RecursionJava - Recursion

    Recursive Backtracking – process of using recursion to return to earlier decision point If one set of recursive calls does not result in solution, program backs up to previous decision point and makes different decision, often resulting in another set of recursive calls Examples Maze problem Eight-Queens problem

    ppt52 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1309 | Lượt tải: 0

  • Java - Files and streamsJava - Files and streams

    JFileChooser – class used to display a dialog that enables users to easily select files Method setFileSelectionMode specifies what user can select from JFileChooser FILES_AND_DIRECTORIES constant indicates files and directories FILES_ONLY constant indicates files only DIRECTORIES_ONLY constant indicates directories only Method showOpenDialog d...

    ppt82 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1299 | Lượt tải: 0

  • Java - Exception handlingJava - Exception handling

    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

    ppt90 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1145 | Lượt tải: 0

  • Java - Graphics and java 2d™Java - Graphics and java 2d™

    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...

    ppt74 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1329 | Lượt tải: 0

  • Java - Gui components: Part 1Java - Gui components: Part 1

    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)

    ppt174 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1204 | Lượt tải: 0

  • Java - Object - Oriented programming: PolymorphismJava - Object - Oriented programming: Polymorphism

    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.

    ppt90 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1433 | Lượt tải: 0

  • Java - Object - Oriented programming: InheritanceJava - Object - Oriented programming: Inheritance

    Class Object methods clone equals finalize getClass hashCode notify, notifyAll, wait toString

    ppt89 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1260 | Lượt tải: 0

  • Java - Classes and objects: A deeper lookJava - Classes and objects: A deeper look

    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...

    ppt118 trang | Chia sẻ: nguyenlam99 | Ngày: 05/01/2019 | Lượt xem: 1163 | Lượt tải: 0