20182312 2019-2020-1 "Object-oriented programming and data structures" Experimental Report 6

20182312 2019-2020-1 "Object-oriented programming and data structures" Experimental Report 6

Course: "Programming and Data Structures"
Class: 1823
Name: Wu Dongze
Student ID: 20182312
experiments Teacher: Johnny
experiment Date: October 21, 2019
Compulsory / Elective: Compulsory

1. Experimental content

1. list practice required to achieve the following functions:

Some integer input via the keyboard, the establishment of a list;
these numbers is your student number in sequence out of double digits. Coupled with today's time.
For example, your student number is 20172301
Today time is 2018/10/1, 16:23:49 sec
figure is
20, 17,23,1, 20, 18,10,1,16,23,49
print all the elements of the list, the total number of elements and output.
In your program, please use a special variable name to record the total number of elements, the variable name is your name. For example, you called Zhang Third, then the variable name is
int nZhangSan = 0; // initialized to 0.
finish this step, your program checked into source control (git push).
2. list practice required to achieve the following functions:

Achieve node insertion, deletion, output operations;
continue you on a program to expand its functionality, each finished a new feature, or written more than 10 lines of new code, you check in code committed to the source server;
read from disk take a file, the file has two numbers.
Digital read from a file 1, bit 5 is inserted into the list, and the total number of digital printing, and elements. Keep this list, proceed to the next operation.
Digital read from the file 2 is inserted into the list of 0, and the total number of printed numbers, and elements. Keep this list, and proceed to the next operation.
Just delete numbers from the list and print the total number 1. All figures and elements.
3. list practice required to achieve the following functions:

Using bubble sort or selection to sort the list are ordered according to numerical values;
if you learn number is odd, selecting bubble sort, selection sort or selection.
In each round of sorting, the total number of print elements, and all elements of the current list.
Continue to expand in the program (2) obtained with the same program file, write different functions to achieve this function. Still with nZhangSan (your name) to represent the total number of elements.
4. The realization of experiments (1) and (2) in the android

The implementation of experiment (3) on the platform android

2. Experimental procedure and results

Experiment 6.1


Experiment 6.2


Experiment 6.3


Experiment 6.4 6.5 (get together)

3. Experimental problems encountered in the process and settlement process

  • Question 1: Selection Sort how to achieve that.
  • Problems Solution 1: selecting a minimum number to be sorted in one of a first inserted into the linked list.
  • Question 2: file read and write

  • Problem 2 Solution: Digital input problems, understand the difference between append and write the get.

Other (perception, thinking, etc.)

A lot of things need to review things I did not review, lead time before the code changes before read a long logic inputs linked list traversal and file reads are forgotten, though only on a lesson, but it and I usually laziness are closely related, I will go over a lot of this sort of Java is actually a very simple idea, but for the realization and use of linked lists various methods made me feel very difficult, or to actively self-knock code. .

Reference material

Guess you like

Origin www.cnblogs.com/shouko/p/11768518.html