Professional Documents
Culture Documents
tt01 Report
tt01 Report
1
1.Topic requirements
“Write a simple text editor using the list ADT (Problem P-6.3, Textbook, page 266).”
2. Program operation
1. Basic structure
2
2. Results
a. Start the program
- Before input
3
- After input string :”bachkhoahochiminh”
b. Left, right
- Before operation
4
- After press right arrow key:
5
c. Delete
- Before operation( cursor position at the last character)
6
d. Insert
- Before operation
7
e. Load previous sting
- Before operation
- After operation
8
3. Program source code
1. Library, function, and variable declaration
2. Main() function
9
3. Input() function
- The function ask for the users ‘s desired operation and implement it right
after recieve the input. In the case the input is invalid, the program will ask
them to input it again.
10
- In the third operation, the random file is input from the user so that we
have to check whether the program can open that file or not. If not, an
announcement will be displayed and user will have to input it again. The
variable “o” is use for this purpose while o = 0 mean no file are currently
opened and o = 1 mean a file is opened.
4. Kb() function
5. Read() function
6. Print() function
11
7. Move() function
8. Insert() function
12
9. Del() function
13