JAVA Authoring Program "5, chapter 62 Content" "6th Chapter" "Development of the Real program"

Source: Internet
Author: User

"Top-line Design" "First high-level design to determine the required classes and methods."

"Understand the process of implementation" "focus on what's going on in the program and visualize what objects need to be" "Flowchart"

"Object-oriented thinking; focus on the" things "that appear in the program, not the" process "

"When you start writing programs" "follows good object-oriented principles and does not allow a single class to perform too many tasks"

You decide which class to create first? Suppose a class needs to use more than one class, and where does it start?

Key Points:

When creating a new class, you need to write down the following 3 things: "pseudocode--test-and real-code":

    1. Pseudo code roughly includes the declaration of the instance variable , the declaration of the method , and the logic (the most important logic defines what will happen)

Common pseudo-code statements: Declare make Compute Invoke repeat/while If Get Set Print

Claim definition calculation call loop judgment get input settings print

    1. Pseudo-code describes what to do rather than how to do it;
    2. Use pseudo-code to help design the test code;
    3. The test code should be written before implementing the method;

To create a Java class:

    • Find out what the class should do
    • Listing instance variables and methods
    • Pseudo code for writing methods
    • Test procedures for writing methods
    • Implementation class
    • Test method
    • debugging or re-engineering
    • Not a reliable invitation to the girls to celebrate the party, such as home?? Seven days hotel to a pitch??

I'll get you a chestnut.

    • Game goal: to the minimum number of guesses to knock down the computer to arrange the dot com target.
    • Game rules: On the 7*7 grid, create 3 goals for the company. Hit 3 times, then sink.
    • Game: "Due to the lack of graphic interface programming, so on this command bar." 】
    • The computer asks you to enter the location you are guessing (for example, A3,B2), and the computer responds with hit or miss or sunk. After clearing all the battleships, the game is over.

JAVA Authoring Program "5, chapter 62 Content" "6th Chapter" "Development of the Real program"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.