Skip to content

Kuuuna98/Text-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Editor📑

Implemented a text editor-based console. 0

Functional specification

  • Use design pattern Singletone.
  • The "test.txt" file will be loaded when the program starts. Next, print the first page.
  • Maximum 20 lines, 75 byte(including spaces) per a page.
  • The user enters the action to perform at the "입력" prompt. (The factors are separated by commas.)
  • Spaces in parentheses treated as input errors.
  • (콘솔메시지) displays a message about the exception situation for each input.
  • The output of each line is adjusted according to the results of the insert, delete, and change operations.
  • Except for keyword 't', It is re-printed after working according to user input.
  • For 'p' and 'n', which are functions of turning pages, move the 20 line to the maximum unit. If there are two lines left to output, add two new lines to the current 18 lines (line number 3-20) and output them to the screen.
  • Error handling: I tried to prevent programs from terminating abnormally due to user input.

Keywords and Examples

  • n: next page
    • ex) n 1
  • p: previous page
    • ex) p 2
  • i: insert word
    • ex) i(1,10,hello) -- "hello" inserted in the 10th position on first line 3
  • d: delete word
    • ex) d(2,10) -- It deleted a word in the 10th position on the second line. 4
  • c: change word
    • ex) c(hello,bye) --It find all "hello" in "test.txt" and change to "bye". 5
  • s: search word
    • ex) s(or) -- Re-print the screen so that the first "or" word found by navigating from the beginning of the file is first located on the first line of the output window. 6
  • t: exit program after save file
    • ex) t 7

ClassDiagram

다이어그램

About

A text editor that is OOD term project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published