Advertisement
Guest User

Untitled

a guest
May 1st, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. class File:
  2.  
  3.     def __init__(self):
  4.         self._filePath = ""
  5.         self._fileName = ""
  6.         self._numLines = 0
  7.  
  8.     def getPath(self):
  9.         return self._filePath
  10.  
  11.     def setPath(self, newPath):
  12.         self._filePath = str(newPath)
  13.  
  14.     def getName(self):
  15.         return self._fileName
  16.  
  17.     def setName(self, newName):
  18.         self._fileName = str(newName)
  19.  
  20.     def getLines(self):
  21.         return self._numLines
  22.  
  23.     def setLines(self, newLines):
  24.         self._numLines = int(newLines)
  25.  
  26.     def __str__(self):
  27.         outputString = "Path to File: " + self._filePath + "Filename: " + self._fileName + "Number of Lines: " + str(self._numLines)
  28.         return outputString
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement