20172327 2018-2019-1 "program design and data structure" Fourth Week study summary

Source: Internet
Author: User

20172327 2018-2019-1 "program design and data structure" Fourth week study summary textbook study contents summary sixth chapter list

List Collection


1. Linked lists and list comparisons: Linked lists are an implementation strategy that uses references to create links between objects. A list collection is a conceptual representation that lists can be implemented by linked lists and arrays.

2. Stacks and queues are linear structures whose elements can only be added and deleted at the end. The list collection is more generalized, and elements can be added and removed at the middle and end of the list.

3. The list of collections is divided into 3 types:
Sequence list (ordered list): its elements are sorted by an intrinsic characteristic of the element.
Unordered lists (unordered list): Elements do not have an intrinsic order between them, and they are sorted by their position in the list.
Index list (indexed list): its elements can be referenced by a numeric index.

List in the Java API


The list provided in the 1.Java collection API is primarily a support index list.

The 2.Java API does not have any classes that can directly implement the ordered list described above.

Both 3.Arraylist and LinkedList implement the Java.util.List interface.

Method Description
Add (E Element) Add an element to the end of the list
Add (int index,e Element) Inserts an element at the specified index
Get (int index) Returns the element at the specified index
Remove (int index) Deletes the element at the specified index
Remove (E Object) Deletes the first occurrence of a specified object
Set (int index,e element) Overrides the element at the specified index
Size () Returns the number of elements in a list

List ADT


1. Many common operations can be defined for all types of lists, the difference between these operations is how to add elements.

2.

Removelast
action description
removefirst
remove
first view elements at the front of the list
last view elements at the end of the list
contains
isEmpty Determine if the list is empty
size Determine the number of elements in the list


3. Ordered list when you add elements, you only need to use Add, where the location depends on its key value. Unordered list Add operation has three variants: Addtofront (element added to the front of the list) Addtorear (element added to the end of the list) Addafter (add element behind a known element)

Problems in teaching materials learning and the solving process
    • Question 1:
Problems in code debugging and the resolution process
    • Issue 1: When I implemented the Arrayorderedlisttest test, I encountered the problem of displaying the last number when I was shown as null.
      Image
    • To solve the analysis, when I check the front ArrayList class, I found that when I show last, I will rear-1 accidentally written rear, so it reads the final one behind, so it must be empty.
Code escrow pairing and mutual evaluation

Correct use of markdown syntax (plus 1 points)
Complete features in the template (plus 1 points)
Problems and solutions in textbook learning (plus 3 points)
Problem and resolution in code debugging, no problem
Feelings, experience real (add 1 points)
Reviews seriously, can point out the blog and the Code of the problem (plus 1 points)

    • 20172317
      Based on the scoring criteria, I scored the above blog: 4 points. The score is as follows:
    • 20172320
      Based on the scoring criteria, I scored the above blog: 8 points. The score is as follows:

      • Pairs of learning content
        • The 6th chapter of the textbook
        • Finish after-class self-test questions, and refer to the answer study
        • Complete after-school exercises
        • Complete programming Project: At least complete PP6.8, PP6.11, PP6.17
Other (sentiment, thinking, etc., optional)

This weekly hours a bit of trouble, the stack is OK, is the list a bit confused.

Learning progress Bar
lines of code (new/cumulative) Blog Volume (Add/accumulate) Learning Time (new/cumulative) Important Growth
Goal 5000 rows 30 Articles 400 hours
First week 0/0 1/1 8/8
Second week 1306/1306 1/2 20/28
Third week 1291/2597 1/3 18/46
Week Four 4361/6958 2/3 20/66

Reference: Why is it so difficult to estimate software engineering applications, software engineering estimation methods

    • Planned study time: 10 hours

    • Actual learning time: 8 hours

    • Improved situation:

(See more modern software engineering courseware
Software engineer Competency Self-evaluation table)

Resources
    • Java Programming and Data Structure Tutorial (second edition)

    • Tutorial on Java Programming and data Structure (second edition) Learning Guide
    • Java Objects and reference variables
    • Why Java does not support multiple inheritance

20172327 2018-2019-1 "program design and data structure" Fourth Week study summary

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.