Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

You’re asked to read a file a line at a time. For each line, you have to split it into fields. Which of the following sets of pseudo class definitions is likely to be more orthogonal?

class Split1 {
    constructor(fileName) # opens the file for reading
    def readNextLine() # moves to the next line
    def getField(n) # returns the nth field in the current line
}
Source by steadbytes.com #
 
PREVIOUS NEXT
Tagged: #asked #read #file #line #For #split #Which #sets #pseudo #class #definitions
ADD COMMENT
Topic
Name
9+3 =