201621123014 Java programming Nineth Week of study summary

Source: Internet
Author: User
Tags set time

1. Summary of this week's study 1.1 summarize the set and generic related content in the way you like (mind mapping or other).

For:

2. Written work

Collection of this homework question set

1. Deletion of the specified element in the list (title of the topic) 1.1 Experimental summary. and answer: List at least 2 ways to delete elements in the list.

A: Use next() the way to enter line to the space at the interval to extract the elements of line, the deletion of the element is used to equals() traverse each element of the linked list, if the criteria are removed with remove.
method of Deleting an element: Removes the specified element with remove or clears all elements with clear.

2. Count the number of words in the text and sort them by the number of occurrences (problem set) 2.1 pseudocode (Do not copy code, otherwise deduct)

A: Create a HashMap linked list map, enter a word and put the word into map until you enter "!!!!! "At the end of the word, the input words are judged, if the same word is already the corresponding value is added one, not add to the map and set the initial value of 1.

2.2 Experimental Summary

For:

Adding a word to the same method as 5-2, the word into the hash table, in the processing of the newly added word, the first to determine whether the word has, if there is a corresponding value of +1, if not the word into a hash table, and set a value of 1; Then use the Sort method in collection to sort the output.

3. Inverted index (problem set)

The subject is more difficult, do not come out does not matter. But must have own thinking process, must have the submission result.

3.1 Your code runs the result

A: Only the parts of the previous sort have been completed.

3.2 pseudocode (do not copy code, otherwise deduct)

A: Create a list of lists; Enter a string, add elements from the string to list, and enter "!!!!! "When you stop, you Collections.sort sort the list by word, and each word is searched for in the input, if it exists, it is marked, and the output is finally put."

3.3 Experimental Summary

A: Use sort to sort the input strings, each of which traverses the string query on the first line, and the last output. About the search, want to directly query the string in line with "You is", but found in the answer as long as a line containing "you" "is" the word can be counted as a match, several trials do not make this effect, so reference to the classmate's code.

4.Stream and Lambda

Write a student class that has the following properties:

Private Long ID;
private String name;
private int age;
Private Gender gender;//enum type
Private Boolean JOINSACM; Have you participated in the ACM contest?
Creates a collection object, such as a list

4.1 Writing a search method using traditional methods list

A: Because name and gender do not affect filtering, these two properties are ignored when comparing.

4.2 Use the stream () in Java8, filter (), collect () to write the code with the same 4.1, and test (to show the test data). When building a test collection, in addition to the normal student object, add some null to the collection, and the method you write should handle the null instead of throwing an exception. (: The school number appears)

The contents of main are the same in the two small questions.

5. Generic type: Generalstack

The Generalstack of jmu-java-05-collection of title set

5.1 code for Generalstack interface

For:

5.2 What are the benefits of generics compared to arraylistintegerstack in previous assignments?

A: Generics can make code easier by not needing to specify the element type.

3. Code Cloud and PTA

Topic Set: jmu-java-05-Collection

3.1. Code cloud codes Submission record

In the Code cloud Project, select statistics-commits history-set time period, and then search for and

3.2 PTA Problem set complete situation diagram

Two graphs are required (1. Ranking chart. 2.PTA Submission list diagram)

3.3 count The amount of code completed this week

The weekly code statistics need to be fused into a single table.
Can you achieve your goals?

Week Time Total code Amount New Code Volume total number of files number of new files
1 0 0 0 0
2 0 0 0 0
3 313 313 9 9
4 641 328 20 11
5 946 305 25 5
6 1451 505 32 7
7 1969 518 35 3
8 2284 315 43 8
9 2682 344 47 4
4. Assess how much you understand Java

Try to evaluate how much you understand Java from the following dimensions

Dimension of degree
Grammar Reluctantly completed PTA Topic
Object-oriented design capabilities The ability to model problems is not high
Application capabilities Do a simple graphical interface
Number of lines of code so far Calculate the title of the blog Park, about 3600 lines

201621123014 Java programming Nineth Week of 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.