Programs and algorithms (graphical data structures-using java[first chapter])

Source: Internet
Author: User

First, the difference:

  The program can allow the existence of an infinite loop , such as the job scheduler in the general operating system (Job Schduler), after startup, unless the shutdown or an exception occurs, it will remain in the execution wait loop. But the algorithm must be limited , which is the biggest difference between the two.

Ii. four principles for judging the quality of programming languages:

High readability

Low average cost (coding, execution, compilation, maintenance, learning, commissioning, and update costs)

High reliability (High code stability)

High level of write-up

Iii. three features of object-oriented programming:

Encapsulation: Wraps a static property value with a dynamic behavior method in the class to which this object is "referenced"

Inheritance: primary refers to parent class subclasses (Overrides (overriding): Subclasses rewrite parent class methods)

A subclass can inherit only one parent class, and a parent class can be inherited by multiple subclasses

Interfaces are multiple implementations, a class can implement multiple interfaces at the same time but only inherit one parent class

Polymorphic

Four, algorithm effectiveness analysis:

4.1 Time Complexity: Https://baike.baidu.com/item/%E6%97%B6%E9%97%B4%E5%A4%8D%E6%9D%82%E5%BA%A6/1894057?fr=aladdin (Baidu Connection)

  F (N) =n! (factorial) n-times with a time complexity of n

4.2 Space Complexity: Https://baike.baidu.com/item/%E7%A9%BA%E9%97%B4%E5%A4%8D%E6%9D%82%E5%BA%A6/9664257?fr=aladdin (Baidu Connection)

V. Abstract class

To include one or more abstract methods (without a method body): To implement an abstract class in a subclass

Programs and algorithms (graphical data structures-using java[first chapter])

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.