-
Notifications
You must be signed in to change notification settings - Fork 0
/
MultiplesXY.py
35 lines (26 loc) · 1.37 KB
/
MultiplesXY.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# --------------------------------------------------------------------------------------------------------------------*
# Author: AratioD @2016
# MULTIPLES OF X AND Y
# Data Structure: One Main program and three class files.
# Main class: MultiplesXY.py
# Data class file 1/3: ReadFile.py: Class: ReadFile
# Data class file 2/3: Calculate.py: Class: Calculate
# Data class file 3/3: WriteFile.py: Class: HypotenusePrintClass
# --------------------------------------------------------------------------------------------------------------------*
# IMPORT all four classes
from ReadFile import ReadFile
readfile = ReadFile()
from Calculate import Calculate
calculate = Calculate()
from WriteFile import WriteFile
writefile = WriteFile()
# MAIN PROGRAM---------------------------------------------------------------------------------------------------------*
# Read the input data name from keyboard and returns the file name
inputDatafileName = readfile.readInputFile()
# Calculated the row amount of the file
rowAmount = readfile.howManyLinesAreInTheInputFile(inputDatafileName)
# Prepares input data to file transforms it to array
xAndYconstraint = readfile.prepareDataForCalculation(inputDatafileName, rowAmount)
resultDeposit = calculate.findTheMultiples(xAndYconstraint)
# Sort data and write results into file
writefile.writeDataIntoFile(resultDeposit)